[PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect

2016-11-01 Thread Cyrill Gorcunov
Signed-off-by: Cyrill Gorcunov --- On top of net-next tree 22ca904ad70afc831d8503e80be1b6558a978759 net/ipv4/raw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-ml.git/net/ipv4/raw.c === --- linux

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-28 Thread Cyrill Gorcunov
On Thu, Oct 27, 2016 at 11:45:37PM -0500, Eric W. Biederman wrote: > > Mind if I add your tested-by? > > To see Linus's tree fail with my patch you can apply the patch below. > That is the essence of what I changed to fix things. Just ignoring > dumpable when an mm exists.

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-28 Thread Cyrill Gorcunov
On Thu, Oct 27, 2016 at 11:45:37PM -0500, Eric W. Biederman wrote: > > Mind if I add your tested-by? > > To see Linus's tree fail with my patch you can apply the patch below. > That is the essence of what I changed to fix things. Just ignoring > dumpable when an mm exists.

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-27 Thread Cyrill Gorcunov
On Fri, Oct 28, 2016 at 12:39:18AM +0300, Cyrill Gorcunov wrote: > On Thu, Oct 27, 2016 at 10:54:34AM -0500, Eric W. Biederman wrote: > > > > > > I can't imagine either of these changes making a practical difference > > to anyone but I am calling them out in case som

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-27 Thread Cyrill Gorcunov
On Fri, Oct 28, 2016 at 12:39:18AM +0300, Cyrill Gorcunov wrote: > On Thu, Oct 27, 2016 at 10:54:34AM -0500, Eric W. Biederman wrote: > > > > > > I can't imagine either of these changes making a practical difference > > to anyone but I am calling them out in case som

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-27 Thread Cyrill Gorcunov
nna test it and will write you the results. Overall looks great, but better be sure and run the tests. Reviewed-by: Cyrill Gorcunov <gorcu...@openvz.org>

Re: [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

2016-10-27 Thread Cyrill Gorcunov
nna test it and will write you the results. Overall looks great, but better be sure and run the tests. Reviewed-by: Cyrill Gorcunov

Re: [PATCH] [net-next] net: ip, diag: include net/inet_sock.h

2016-10-25 Thread Cyrill Gorcunov
On Tue, Oct 25, 2016 at 05:53:22PM +0200, Arnd Bergmann wrote: > The newly added raw_diag.c fails to build in some configurations > unless we include this header: > > In file included from net/ipv4/raw_diag.c:6:0: > include/net/raw.h:71:21: error: field 'inet' has incomplete type >

Re: [PATCH] [net-next] net: ip, diag: include net/inet_sock.h

2016-10-25 Thread Cyrill Gorcunov
On Tue, Oct 25, 2016 at 05:53:22PM +0200, Arnd Bergmann wrote: > The newly added raw_diag.c fails to build in some configurations > unless we include this header: > > In file included from net/ipv4/raw_diag.c:6:0: > include/net/raw.h:71:21: error: field 'inet' has incomplete type >

Re: [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-25 Thread Cyrill Gorcunov
On Mon, Oct 24, 2016 at 06:11:04PM -0500, Eric W. Biederman wrote: > Kees Cook <keesc...@chromium.org> writes: > > > On Mon, Oct 24, 2016 at 1:29 PM, Cyrill Gorcunov <gorcu...@gmail.com> wrote: > >> On Mon, Oct 24, 2016 at 02:01:30PM -0500, Eric W. Biederman wr

Re: [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-25 Thread Cyrill Gorcunov
On Mon, Oct 24, 2016 at 06:11:04PM -0500, Eric W. Biederman wrote: > Kees Cook writes: > > > On Mon, Oct 24, 2016 at 1:29 PM, Cyrill Gorcunov wrote: > >> On Mon, Oct 24, 2016 at 02:01:30PM -0500, Eric W. Biederman wrote: > >>> So I am probably going to t

Re: [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-24 Thread Cyrill Gorcunov
On Mon, Oct 24, 2016 at 02:01:30PM -0500, Eric W. Biederman wrote: > > Adding the containers list because that is the general place for these > kinds of discussions. Thanks! > Cyrill Gorcunov <gorcu...@gmail.com> writes: > > > Hi Eric! A few days ago we've noticed

Re: [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-24 Thread Cyrill Gorcunov
On Mon, Oct 24, 2016 at 02:01:30PM -0500, Eric W. Biederman wrote: > > Adding the containers list because that is the general place for these > kinds of discussions. Thanks! > Cyrill Gorcunov writes: > > > Hi Eric! A few days ago we've noticed that our zombie00 test cas

[ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-24 Thread Cyrill Gorcunov
Hi Eric! A few days ago we've noticed that our zombie00 test case started failing: https://ci.openvz.org/job/CRIU/view/All/job/CRIU-linux-next/406/console --- Run zdtm/static/zombie00 in h = Start test ./zombie00 --pidfile=zombie00.pid

[ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access

2016-10-24 Thread Cyrill Gorcunov
Hi Eric! A few days ago we've noticed that our zombie00 test case started failing: https://ci.openvz.org/job/CRIU/view/All/job/CRIU-linux-next/406/console --- Run zdtm/static/zombie00 in h = Start test ./zombie00 --pidfile=zombie00.pid

Re: [PATCH v7] net: ip, diag -- Add diag interface for raw sockets

2016-10-23 Thread Cyrill Gorcunov
On Sat, Oct 22, 2016 at 06:55:27PM -0400, David Miller wrote: > From: Cyrill Gorcunov <gorcu...@gmail.com> > Date: Fri, 21 Oct 2016 13:03:44 +0300 > > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications.

Re: [PATCH v7] net: ip, diag -- Add diag interface for raw sockets

2016-10-23 Thread Cyrill Gorcunov
On Sat, Oct 22, 2016 at 06:55:27PM -0400, David Miller wrote: > From: Cyrill Gorcunov > Date: Fri, 21 Oct 2016 13:03:44 +0300 > > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > u

[PATCH v7] net: ip, diag -- Add diag interface for raw sockets

2016-10-21 Thread Cyrill Gorcunov
@linux-ipv6.org> CC: Patrick McHardy <ka...@trash.net> CC: Andrey Vagin <ava...@openvz.org> CC: Stephen Hemminger <step...@networkplumber.org> Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org> --- include/net/raw.h |6 include/net/rawv6.h

[PATCH v7] net: ip, diag -- Add diag interface for raw sockets

2016-10-21 Thread Cyrill Gorcunov
ure unintentionally changed. CC: David S. Miller CC: Eric Dumazet CC: David Ahern CC: Alexey Kuznetsov CC: James Morris CC: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Andrey Vagin CC: Stephen Hemminger Signed-off-by: Cyrill Gorcunov --- include/net/raw.h |6 include/net/ra

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-13 Thread Cyrill Gorcunov
On Thu, Oct 13, 2016 at 09:43:57AM -0600, David Ahern wrote: > On 10/13/16 1:16 AM, Cyrill Gorcunov wrote: > > On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote: > >> From: Cyrill Gorcunov <gorcu...@gmail.com> > >> Date: Wed, 12 Oct 2016 09:53:2

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-13 Thread Cyrill Gorcunov
On Thu, Oct 13, 2016 at 09:43:57AM -0600, David Ahern wrote: > On 10/13/16 1:16 AM, Cyrill Gorcunov wrote: > > On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote: > >> From: Cyrill Gorcunov > >> Date: Wed, 12 Oct 2016 09:53:29 +0300 > >> > >>

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-13 Thread Cyrill Gorcunov
On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote: > From: Cyrill Gorcunov <gorcu...@gmail.com> > Date: Wed, 12 Oct 2016 09:53:29 +0300 > > > I can't rename the field, neither a can use union. > > Remind me again what is wrong with using an anonymo

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-13 Thread Cyrill Gorcunov
On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote: > From: Cyrill Gorcunov > Date: Wed, 12 Oct 2016 09:53:29 +0300 > > > I can't rename the field, neither a can use union. > > Remind me again what is wrong with using an anonymous union? Anon union would be

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-12 Thread Cyrill Gorcunov
On Wed, Oct 12, 2016 at 01:50:22AM -0400, David Miller wrote: > > Macros that look like function calls and are also lvalues tend to be > troublesome. > > I know what you're trying to achieve, you want a named way to access > this so that the intent and semantics are clear. > > But I'd rather

Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-12 Thread Cyrill Gorcunov
On Wed, Oct 12, 2016 at 01:50:22AM -0400, David Miller wrote: > > Macros that look like function calls and are also lvalues tend to be > troublesome. > > I know what you're trying to achieve, you want a named way to access > this so that the intent and semantics are clear. > > But I'd rather

[PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-06 Thread Cyrill Gorcunov
> CC: James Morris <jmor...@namei.org> CC: Hideaki YOSHIFUJI <yoshf...@linux-ipv6.org> CC: Patrick McHardy <ka...@trash.net> CC: Andrey Vagin <ava...@openvz.org> CC: Stephen Hemminger <step...@networkplumber.org> Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.o

[PATCH v6] net: ip, diag -- Add diag interface for raw sockets

2016-10-06 Thread Cyrill Gorcunov
off-by: Cyrill Gorcunov --- Really sorry for delay. Take a look please once time permit, I think the most safe solution is to use macro which wraps @pad access so the userspace progs won't fail on compilation if they keep the reference on this field. include/net/raw.h |6 + include/

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:49:51AM -0700, Eric Dumazet wrote: > > > > 4.7 is pretty widespread, so I've to think... > > Sorry, 4.4.7 it was > > https://www.mail-archive.com/netdev@vger.kernel.org/msg128714.html Ah, thanks for info!

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:49:51AM -0700, Eric Dumazet wrote: > > > > 4.7 is pretty widespread, so I've to think... > > Sorry, 4.4.7 it was > > https://www.mail-archive.com/netdev@vger.kernel.org/msg128714.html Ah, thanks for info!

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:29:08AM -0700, Eric Dumazet wrote: > > > > Oh, crap :( I've been looking into uapi headers, found that we > > use anonymous unions (for example include/uapi/linux/bcache.h) > > and thought it will be safe (and my test builds didn't fail). > > Are you happen to know

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:29:08AM -0700, Eric Dumazet wrote: > > > > Oh, crap :( I've been looking into uapi headers, found that we > > use anonymous unions (for example include/uapi/linux/bcache.h) > > and thought it will be safe (and my test builds didn't fail). > > Are you happen to know

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:02:11AM -0700, Eric Dumazet wrote: > > This is a bit different of course, since struct tc_fq_qd_stats is only > one way : Kernel produces the content and gives it to user space. > > User space should probably not need to initialize such a structure, but > who knows

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:02:11AM -0700, Eric Dumazet wrote: > > This is a bit different of course, since struct tc_fq_qd_stats is only > one way : Kernel produces the content and gives it to user space. > > User space should probably not need to initialize such a structure, but > who knows

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 05:57:12AM -0700, Eric Dumazet wrote: ... > Note that some programs could fail to compile with the added union > anyway. > > Some gcc versions are unable to compile a static init with an union > > struct inet_diag_req_v2 foo = { .pad = 0, sdiag_family = AF_INET, }; > >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 05:57:12AM -0700, Eric Dumazet wrote: ... > Note that some programs could fail to compile with the added union > anyway. > > Some gcc versions are unable to compile a static init with an union > > struct inet_diag_req_v2 foo = { .pad = 0, sdiag_family = AF_INET, }; > >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:50:31AM -0400, Jamal Hadi Salim wrote: > > struct tcp_info. Yeah I see. As I said naming pads will be safe but to do so we will have to compile on every arch we support and make sure the implicit pad remains here. > Sorry - i didnt mean to drag this for long; but the

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:50:31AM -0400, Jamal Hadi Salim wrote: > > struct tcp_info. Yeah I see. As I said naming pads will be safe but to do so we will have to compile on every arch we support and make sure the implicit pad remains here. > Sorry - i didnt mean to drag this for long; but the

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:27:24AM -0400, Jamal Hadi Salim wrote: > > > > They must initialize it to zero. > > > > What if in the future actually meant to use 0 for > something?;-> For example in Cyrill's case it means PROTO_IP > Not sure if it useful to interpret or not but it is part of the >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:27:24AM -0400, Jamal Hadi Salim wrote: > > > > They must initialize it to zero. > > > > What if in the future actually meant to use 0 for > something?;-> For example in Cyrill's case it means PROTO_IP > Not sure if it useful to interpret or not but it is part of the >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:06:51AM -0400, Jamal Hadi Salim wrote: > > I understood well your point;-> Maybe my response was not clear: > _nobody should be fscking fondling pad fields_ setting them or > otherwise. > Maybe let these programs fail. I asked if you knew any such app which > did

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:06:51AM -0400, Jamal Hadi Salim wrote: > > I understood well your point;-> Maybe my response was not clear: > _nobody should be fscking fondling pad fields_ setting them or > otherwise. > Maybe let these programs fail. I asked if you knew any such app which > did

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:07:01AM -0400, David Miller wrote: ... > > > > I think you miss the point what I'm trying to say: currently end-user > > may have reference to this member (for any reason) and his program > > will compile and run. If we change the name the compilation procedure > >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 08:07:01AM -0400, David Miller wrote: ... > > > > I think you miss the point what I'm trying to say: currently end-user > > may have reference to this member (for any reason) and his program > > will compile and run. If we change the name the compilation procedure > >

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 07:06:26AM -0400, Jamal Hadi Salim wrote: > > > > This structure is uapi, so anyone has complete rights to reference > > @pad in the userspace programs. Sure it would be more clear to remove > > the @pad completely, but if we choose so I think it's better to do > > on top

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 07:06:26AM -0400, Jamal Hadi Salim wrote: > > > > This structure is uapi, so anyone has complete rights to reference > > @pad in the userspace programs. Sure it would be more clear to remove > > the @pad completely, but if we choose so I think it's better to do > > on top

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:43:01AM -0400, Jamal Hadi Salim wrote: ... > > > > Someone may have set it to zero explicitly on source level, and the > > compilation will fail on new kernel then. So no, keeping the name > > is reasonable. > > > > I dont know how compilation will fail but you may be

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:43:01AM -0400, Jamal Hadi Salim wrote: ... > > > > Someone may have set it to zero explicitly on source level, and the > > compilation will fail on new kernel then. So no, keeping the name > > is reasonable. > > > > I dont know how compilation will fail but you may be

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:08:00AM -0400, Jamal Hadi Salim wrote: ... > > @@ -38,7 +38,10 @@ struct inet_diag_req_v2 { > > __u8sdiag_family; > > __u8sdiag_protocol; > > __u8idiag_ext; > > - __u8pad; > > + union { > > + __u8pad; > > + __u8

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
On Wed, Sep 28, 2016 at 06:08:00AM -0400, Jamal Hadi Salim wrote: ... > > @@ -38,7 +38,10 @@ struct inet_diag_req_v2 { > > __u8sdiag_family; > > __u8sdiag_protocol; > > __u8idiag_ext; > > - __u8pad; > > + union { > > + __u8pad; > > + __u8

[PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
t;ava...@openvz.org> CC: Stephen Hemminger <step...@networkplumber.org> Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org> --- Thanks all for feedback! Take a look please once time permit. include/net/raw.h |6 + include/net/rawv6.h|7 + include/uapi/linux/inet_di

[PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Cyrill Gorcunov
sov CC: James Morris CC: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Andrey Vagin CC: Stephen Hemminger Signed-off-by: Cyrill Gorcunov --- Thanks all for feedback! Take a look please once time permit. include/net/raw.h |6 + include/net/rawv6.h|7 + include/u

Re: [PATCH v4] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
On Tue, Sep 27, 2016 at 08:39:59AM -0700, Eric Dumazet wrote: ... > > + } > > + if (sk && !atomic_inc_not_zero(>sk_refcnt)) > > + sk = NULL; > > Minor detail, but note that raw sockets do not use rcu (yet) > > Since you have read_lock(>lock), no writer can suddenly change >

Re: [PATCH v4] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
On Tue, Sep 27, 2016 at 08:39:59AM -0700, Eric Dumazet wrote: ... > > + } > > + if (sk && !atomic_inc_not_zero(>sk_refcnt)) > > + sk = NULL; > > Minor detail, but note that raw sockets do not use rcu (yet) > > Since you have read_lock(>lock), no writer can suddenly change >

[PATCH v4] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
I <yoshf...@linux-ipv6.org> CC: Patrick McHardy <ka...@trash.net> CC: Andrey Vagin <ava...@openvz.org> CC: Stephen Hemminger <step...@networkplumber.org> Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org> --- Guys, take a look please once time permit. I mostly worried

[PATCH v4] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
this attribute and use it for socket matching CC: David S. Miller CC: Eric Dumazet CC: David Ahern CC: Alexey Kuznetsov CC: James Morris CC: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Andrey Vagin CC: Stephen Hemminger Signed-off-by: Cyrill Gorcunov --- Guys, take a look please once time permit. I

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
On Mon, Sep 26, 2016 at 07:54:37PM -0600, David Ahern wrote: > On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > > Something like > > > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > > === > > -

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
On Mon, Sep 26, 2016 at 07:54:37PM -0600, David Ahern wrote: > On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > > Something like > > > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > > === > > -

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-26 Thread Cyrill Gorcunov
On Wed, Sep 21, 2016 at 12:13:43AM +0300, Cyrill Gorcunov wrote: > On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > > for the protocol which > > > > It is rather

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-26 Thread Cyrill Gorcunov
On Wed, Sep 21, 2016 at 12:13:43AM +0300, Cyrill Gorcunov wrote: > On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > > for the protocol which > > > > It is rather

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-20 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > for the protocol which > > It is rather not addressed in ss. I mean, look, when we send out a diag packet > the kernel look ups

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-20 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > for the protocol which > > It is rather not addressed in ss. I mean, look, when we send out a diag packet > the kernel look ups

Re: [REGRESSION] RLIMIT_DATA crashes named

2016-09-17 Thread Cyrill Gorcunov
On Sat, Sep 17, 2016 at 03:09:09PM +0300, Konstantin Khlebnikov wrote: > > > > Seems I don't understand the bottom unlikely... > > This is gcc extrension: > https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html > Here macro works as a function which returns bool no, no, I know for what

Re: [REGRESSION] RLIMIT_DATA crashes named

2016-09-17 Thread Cyrill Gorcunov
On Sat, Sep 17, 2016 at 03:09:09PM +0300, Konstantin Khlebnikov wrote: > > > > Seems I don't understand the bottom unlikely... > > This is gcc extrension: > https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html > Here macro works as a function which returns bool no, no, I know for what

Re: [REGRESSION] RLIMIT_DATA crashes named

2016-09-17 Thread Cyrill Gorcunov
On Sat, Sep 17, 2016 at 11:33:56AM +0300, Konstantin Khlebnikov wrote: > > > > do_just_once just isn't a good name for a global > > rate limited mechanism that does something very > > different than the name. > > > > Maybe allow_once_per_ratelimit or the like > > > > There could be an equivalent

Re: [REGRESSION] RLIMIT_DATA crashes named

2016-09-17 Thread Cyrill Gorcunov
On Sat, Sep 17, 2016 at 11:33:56AM +0300, Konstantin Khlebnikov wrote: > > > > do_just_once just isn't a good name for a global > > rate limited mechanism that does something very > > different than the name. > > > > Maybe allow_once_per_ratelimit or the like > > > > There could be an equivalent

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:55:42PM -0600, David Ahern wrote: > >> Since the display is showing sockets in addition to IPPROTO_RAW: > >> > >> $ ss -A raw > >> State Recv-Q Send-QLocal Address:Port > >> Peer Address:Port > >> UNCONN 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:55:42PM -0600, David Ahern wrote: > >> Since the display is showing sockets in addition to IPPROTO_RAW: > >> > >> $ ss -A raw > >> State Recv-Q Send-QLocal Address:Port > >> Peer Address:Port > >> UNCONN 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:47:57PM -0600, David Ahern wrote: > >> > >> I'm guessing you passed IPPROTO_RAW (255) as the protocol to socket(). If > >> you pass something > >> else (IPPROTO_ICMP for example) it won't work. > > > > True. To support IPPROTO_ICMP it need enhancement. I thought start

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:47:57PM -0600, David Ahern wrote: > >> > >> I'm guessing you passed IPPROTO_RAW (255) as the protocol to socket(). If > >> you pass something > >> else (IPPROTO_ICMP for example) it won't work. > > > > True. To support IPPROTO_ICMP it need enhancement. I thought start

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:30:28PM -0600, David Ahern wrote: > > [root@pcs7 iproute2]# misc/ss -A raw > > State Recv-Q Send-QLocal Address:Port > >Peer Address:Port > > > > ESTAB 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:30:28PM -0600, David Ahern wrote: > > [root@pcs7 iproute2]# misc/ss -A raw > > State Recv-Q Send-QLocal Address:Port > >Peer Address:Port > > > > ESTAB 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 10:06:23AM +0300, Cyrill Gorcunov wrote: > On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > > > Try to be selective in the -K , do not kill tcp sockets ? > > > > I am running > >ss -aKw 'dev == red' >

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 10:06:23AM +0300, Cyrill Gorcunov wrote: > On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > > > Try to be selective in the -K , do not kill tcp sockets ? > > > > I am running > >ss -aKw 'dev == red' >

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > Try to be selective in the -K , do not kill tcp sockets ? > > I am running >ss -aKw 'dev == red' > > to kill raw sockets bound to device named 'red'. Thanks David, Eric! I'll play with this option today and report the

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > Try to be selective in the -K , do not kill tcp sockets ? > > I am running >ss -aKw 'dev == red' > > to kill raw sockets bound to device named 'red'. Thanks David, Eric! I'll play with this option today and report the

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 02:54:57PM -0600, David Ahern wrote: > On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: > >> ss -K is not working. Socket lookup fails to find a match due to a > >> protocol mismatch. > >> > >> haven't had time to track down why

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 02:54:57PM -0600, David Ahern wrote: > On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: > >> ss -K is not working. Socket lookup fails to find a match due to a > >> protocol mismatch. > >> > >> haven't had time to track down why

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 01:53:13PM -0600, David Ahern wrote: > On 9/13/16 11:19 AM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], pac

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 01:53:13PM -0600, David Ahern wrote: > On 9/13/16 11:19 AM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], pac

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
emminger <step...@networkplumber.org> Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org> --- include/net/raw.h |6 + include/net/rawv6.h |7 + net/ipv4/Kconfig|8 + net/ipv4/Makefile |1 net/ipv4/raw.c | 21 net/ipv4/raw_diag.c | 226

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Andrey Vagin CC: Stephen Hemminger Signed-off-by: Cyrill Gorcunov --- include/net/raw.h |6 + include/net/rawv6.h |7 + net/ipv4/Kconfig|8 + net/ipv4/Makefile |1 net/ipv4/raw.c | 21 net/ipv4/raw_diag.c | 226

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
On Tue, Sep 13, 2016 at 11:57:35AM -0400, David Miller wrote: > > > > Thanks for review, David. I updated against net-next. > > Please do not post new versions of patches as replies to existing > discussions. > > Instead, make fresh patch postings to the list. Oh, will do. Sorry for

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
On Tue, Sep 13, 2016 at 11:57:35AM -0400, David Miller wrote: > > > > Thanks for review, David. I updated against net-next. > > Please do not post new versions of patches as replies to existing > discussions. > > Instead, make fresh patch postings to the list. Oh, will do. Sorry for

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-11 Thread Cyrill Gorcunov
On Sat, Sep 10, 2016 at 04:28:40PM -0600, David Ahern wrote: > On 9/10/16 4:05 PM, Cyrill Gorcunov wrote: > > On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: > >> > >> Would you mind adding the destroy capability as well? The udp version > >> shoul

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-11 Thread Cyrill Gorcunov
On Sat, Sep 10, 2016 at 04:28:40PM -0600, David Ahern wrote: > On 9/10/16 4:05 PM, Cyrill Gorcunov wrote: > > On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: > >> > >> Would you mind adding the destroy capability as well? The udp version > >> shoul

[PATCH v2] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread Cyrill Gorcunov
o for review only. Will do testing at Monday. --- From: Cyrill Gorcunov <gorcu...@openvz.org> Subject: [PATCH v2] net: ip, diag -- Add diag interface for raw sockets In criu we are actively using diag interface to collect sockets present in the system when dumping applications. And while for u

[PATCH v2] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread Cyrill Gorcunov
o for review only. Will do testing at Monday. --- From: Cyrill Gorcunov Subject: [PATCH v2] net: ip, diag -- Add diag interface for raw sockets In criu we are actively using diag interface to collect sockets present in the system when dumping applications. And while for unix, tcp, udp[lite], pac

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread Cyrill Gorcunov
On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: > On 9/9/16 12:26 PM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], pac

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-10 Thread Cyrill Gorcunov
On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: > On 9/9/16 12:26 PM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], pac

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Cyrill Gorcunov
On Fri, Sep 09, 2016 at 12:55:13PM -0700, Eric Dumazet wrote: > > + > > + rep = nlmsg_new(sizeof(struct inet_diag_msg) + > > + sizeof(struct inet_diag_meminfo) + 64, > > + GFP_KERNEL); > > + if (!rep) > > There is a missing sock_put(sk) > > > +

Re: [PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Cyrill Gorcunov
On Fri, Sep 09, 2016 at 12:55:13PM -0700, Eric Dumazet wrote: > > + > > + rep = nlmsg_new(sizeof(struct inet_diag_msg) + > > + sizeof(struct inet_diag_meminfo) + 64, > > + GFP_KERNEL); > > + if (!rep) > > There is a missing sock_put(sk) > > > +

[PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Cyrill Gorcunov
umazet <eric.duma...@gmail.com> CC: Alexey Kuznetsov <kuz...@ms2.inr.ac.ru> CC: James Morris <jmor...@namei.org> CC: Hideaki YOSHIFUJI <yoshf...@linux-ipv6.org> CC: Patrick McHardy <ka...@trash.net> CC: Andrey Vagin <ava...@openvz.org> CC: Stephen Hemminger <step

[PATCH] net: ip, diag -- Add diag interface for raw sockets

2016-09-09 Thread Cyrill Gorcunov
: James Morris CC: Hideaki YOSHIFUJI CC: Patrick McHardy CC: Andrey Vagin CC: Stephen Hemminger Signed-off-by: Cyrill Gorcunov --- Take a look please, once time permit. Hopefully I didn't miss something obvious, tested as "ss -n -A raw" for modified iproute2 instance and c/r f

Re: [PATCHv4 6/6] x86/signal: add SA_{X32,IA32}_ABI sa_flags

2016-09-01 Thread Cyrill Gorcunov
On Thu, Sep 01, 2016 at 04:47:23PM +0300, Dmitry Safonov wrote: > Thanks for your replies Oleg, Cyrill, > > 2016-09-01 15:45 GMT+03:00 Cyrill Gorcunov <gorcu...@gmail.com>: > > On Thu, Sep 01, 2016 at 02:27:44PM +0200, Oleg Nesterov wrote: > >> > Hi Oleg, > &

Re: [PATCHv4 6/6] x86/signal: add SA_{X32,IA32}_ABI sa_flags

2016-09-01 Thread Cyrill Gorcunov
On Thu, Sep 01, 2016 at 04:47:23PM +0300, Dmitry Safonov wrote: > Thanks for your replies Oleg, Cyrill, > > 2016-09-01 15:45 GMT+03:00 Cyrill Gorcunov : > > On Thu, Sep 01, 2016 at 02:27:44PM +0200, Oleg Nesterov wrote: > >> > Hi Oleg, > >> > can I have

Re: [PATCHv4 6/6] x86/signal: add SA_{X32,IA32}_ABI sa_flags

2016-09-01 Thread Cyrill Gorcunov
On Thu, Sep 01, 2016 at 02:27:44PM +0200, Oleg Nesterov wrote: > > Hi Oleg, > > can I have your acks or reviewed-by tags for 4-5-6 patches in the series, > > or there is something left to fix? > > Well yes... Although let me repeat, I am not sure I personally like > the very idea of 3/6 and 6/6.

Re: [PATCHv4 6/6] x86/signal: add SA_{X32,IA32}_ABI sa_flags

2016-09-01 Thread Cyrill Gorcunov
On Thu, Sep 01, 2016 at 02:27:44PM +0200, Oleg Nesterov wrote: > > Hi Oleg, > > can I have your acks or reviewed-by tags for 4-5-6 patches in the series, > > or there is something left to fix? > > Well yes... Although let me repeat, I am not sure I personally like > the very idea of 3/6 and 6/6.

Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping

2016-08-28 Thread Cyrill Gorcunov
On Thu, Aug 25, 2016 at 06:21:08PM +0300, Dmitry Safonov wrote: > I added here a new in-kernel fs with ramfs-like options. > Created vdso file in this fs (yet for testing, only 64-bit vdso). > Mapped this file to process's mm on setup_additional_pages. > Just for testing purpose it's done only for

Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping

2016-08-28 Thread Cyrill Gorcunov
On Thu, Aug 25, 2016 at 06:21:08PM +0300, Dmitry Safonov wrote: > I added here a new in-kernel fs with ramfs-like options. > Created vdso file in this fs (yet for testing, only 64-bit vdso). > Mapped this file to process's mm on setup_additional_pages. > Just for testing purpose it's done only for

Re: [RFC PATCH] sunrpc: do not allow process to freeze within RPC state machine

2016-08-04 Thread Cyrill Gorcunov
On Wed, Aug 03, 2016 at 08:54:50PM +0400, Stanislav Kinsburskiy wrote: > Otherwise freezer cgroup state might never become "FROZEN". > > Here is a deadlock scheme for 2 processes in one freezer cgroup, which is > freezing: > > CPU 0 CPU 1 >

<    1   2   3   4   5   6   7   8   9   10   >