[PATCH v2 2/7] Add a general netlink socket parser

Dmitry V. Levin ldv at altlinux.org
Thu Jun 16 10:28:14 UTC 2016


On Wed, Jun 15, 2016 at 12:13:06PM +0300, Dmitry V. Levin wrote:
> On Wed, Jun 15, 2016 at 09:09:19AM +0000, Fabien Siron wrote:
> > Quoting Dmitry V. Levin (2016-06-14 12:00:30)
> > > On Mon, Jun 13, 2016 at 02:37:22PM +0000, Fabien Siron wrote:
> > > > +static void
> > > > +printsockbuf(struct tcb *tcp, int fd, long addr, long addrlen)
> > > > +{
> > > > +     int proto = getfdproto(tcp, fd);
> > > 
> > > This operation costs a few syscalls so it shouldn't be attempted
> > > unless show_fd_path > 1.
> > 
> > Do you actually mean that the netlink parser with sendto and recvfrom will
> > be available only with show_fd_path > 1 (so with the -yy option)?
> 
> What's the alternative?

Sorry, I must've confused getfdproto with something else.
This adds just one getxattr syscall invocation, which is
probably OK to do in verbose(tcp) mode regardless of show_fd_path.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160616/397285e6/attachment.bin>


More information about the Strace-devel mailing list