Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-15 Thread Tejun Heo
Hello, On Fri, Jun 10, 2016 at 08:40:34AM +0200, Daniel Wagner wrote: > > [ Cc'ing John, Daniel, et al ] > > > > Btw, while I just looked at scm_detach_fds(), I think commits ... > > > > * 48a87cc26c13 ("net: netprio: fd passed in SCM_RIGHTS datagram not set > > correctly") > > * d84295067fc7

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-10 Thread Eric Dumazet
On Fri, 2016-06-10 at 14:29 +, David Laight wrote: > From: Eric Dumazet > > Sent: 09 June 2016 22:17 > > On Thu, 2016-06-09 at 23:50 +0300, Saeed Mahameed wrote: > > > From: Matthew Finlay > > > > > > > diff --git a/net/socket.c b/net/socket.c > > > index a1bd161..67de200 100644 > > > --- a/

RE: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-10 Thread David Laight
From: Eric Dumazet > Sent: 09 June 2016 22:17 > On Thu, 2016-06-09 at 23:50 +0300, Saeed Mahameed wrote: > > From: Matthew Finlay > > > > diff --git a/net/socket.c b/net/socket.c > > index a1bd161..67de200 100644 > > --- a/net/socket.c > > +++ b/net/socket.c > > @@ -382,6 +382,7 @@ struct file *

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Daniel Wagner
Hi Daniel, > [ Cc'ing John, Daniel, et al ] > > Btw, while I just looked at scm_detach_fds(), I think commits ... > > * 48a87cc26c13 ("net: netprio: fd passed in SCM_RIGHTS datagram not set > correctly") > * d84295067fc7 ("net: net_cls: fd passed in SCM_RIGHTS datagram not set > correctly") >

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Daniel Borkmann
On 06/10/2016 12:21 AM, Daniel Borkmann wrote: On 06/09/2016 11:35 PM, Florian Westphal wrote: Saeed Mahameed wrote: index a1bd161..67de200 100644 --- a/net/socket.c +++ b/net/socket.c @@ -382,6 +382,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) }

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Daniel Borkmann
On 06/09/2016 11:35 PM, Florian Westphal wrote: Saeed Mahameed wrote: index a1bd161..67de200 100644 --- a/net/socket.c +++ b/net/socket.c @@ -382,6 +382,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) } sock->file = file; + file->f_ow

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Eric Dumazet
On Thu, 2016-06-09 at 23:50 +0300, Saeed Mahameed wrote: > From: Matthew Finlay > diff --git a/net/socket.c b/net/socket.c > index a1bd161..67de200 100644 > --- a/net/socket.c > +++ b/net/socket.c > @@ -382,6 +382,7 @@ struct file *sock_alloc_file(struct socket *sock, int > flags, const char *d

Re: [PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Florian Westphal
Saeed Mahameed wrote: > index a1bd161..67de200 100644 > --- a/net/socket.c > +++ b/net/socket.c > @@ -382,6 +382,7 @@ struct file *sock_alloc_file(struct socket *sock, int > flags, const char *dname) > } > > sock->file = file; > + file->f_owner.sock_pid = find_get_pid(task_pid_

[PATCH net-next] nfnetlink_queue: enable PID info retrieval

2016-06-09 Thread Saeed Mahameed
From: Matthew Finlay Allow the netlink_queue_module to get the PID associated with an outgoing connection. Finding the PID based on the tuple in userspace is expensive. This additional attribute makes it convenient and efficient to get the PID associated with the outgoing connection in userspace,