Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-09 Thread Daniel Borkmann
On 09/09/2015 10:53 AM, Thomas Graf wrote: On 09/07/15 at 04:54pm, Daniel Borkmann wrote: On 08/17/2015 11:02 PM, David Miller wrote: ... I would seriously rather see us do an expensive full copy of the SKB than to have traffic which is unexpectedly invisible to taps. I've been looking into t

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-09 Thread Thomas Graf
On 09/07/15 at 04:54pm, Daniel Borkmann wrote: > On 08/17/2015 11:02 PM, David Miller wrote: > ... > >I would seriously rather see us do an expensive full copy of the SKB > >than to have traffic which is unexpectedly invisible to taps. > > I've been looking into this issue a bit further, so the co

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-08 Thread David Miller
From: Daniel Borkmann Date: Mon, 07 Sep 2015 16:54:46 +0200 > On 08/17/2015 11:02 PM, David Miller wrote: > ... >> I would seriously rather see us do an expensive full copy of the SKB >> than to have traffic which is unexpectedly invisible to taps. > > I've been looking into this issue a bit fur

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-07 Thread Daniel Borkmann
On 08/17/2015 11:02 PM, David Miller wrote: ... I would seriously rather see us do an expensive full copy of the SKB than to have traffic which is unexpectedly invisible to taps. I've been looking into this issue a bit further, so the copy for the tap seems doable, but while further going throu

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-02 Thread Ken-ichirou MATSUZAWA
On Wed, Sep 02, 2015 at 05:56:36PM +0200, Daniel Borkmann wrote: > you suggest or not), for two reasons: I think (will start experimenting > more with it tomorrow), you would get an out of bounds access here in > case the skb->data is the last slot in the ring buffer and reaches > exactly to the ri

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-02 Thread Daniel Borkmann
On 09/02/2015 01:35 PM, Ken-ichirou MATSUZAWA wrote: Thank you for the reply. On Wed, Sep 02, 2015 at 11:47:26AM +0200, Daniel Borkmann wrote: On 09/02/2015 02:04 AM, Ken-ichirou MATSUZAWA wrote: Talking about skb_copy path, original skb's shared info is accessed only in copy_skb_header, to ge

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-02 Thread Ken-ichirou MATSUZAWA
Thank you for the reply. On Wed, Sep 02, 2015 at 11:47:26AM +0200, Daniel Borkmann wrote: > On 09/02/2015 02:04 AM, Ken-ichirou MATSUZAWA wrote: > >Talking about skb_copy path, original skb's shared info is accessed > >only in copy_skb_header, to get gso related field. As a result of > > It's sti

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-02 Thread Daniel Borkmann
On 09/02/2015 02:04 AM, Ken-ichirou MATSUZAWA wrote: On Wed, Aug 19, 2015 at 04:29:32PM +0200, Daniel Borkmann wrote: On 08/17/2015 11:02 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 14 Aug 2015 12:38:21 +0200 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-09-01 Thread Ken-ichirou MATSUZAWA
On Wed, Aug 19, 2015 at 04:29:32PM +0200, Daniel Borkmann wrote: > On 08/17/2015 11:02 PM, David Miller wrote: > >From: Daniel Borkmann > >Date: Fri, 14 Aug 2015 12:38:21 +0200 > > > >>diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c > >>index 67d2104..4307446 100644 > >>--- a/net/

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-19 Thread Daniel Borkmann
On 08/17/2015 11:02 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 14 Aug 2015 12:38:21 +0200 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 67d2104..4307446 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -238,6 +238,13 @@ static void

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-17 Thread David Miller
From: Daniel Borkmann Date: Fri, 14 Aug 2015 12:38:21 +0200 > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c > index 67d2104..4307446 100644 > --- a/net/netlink/af_netlink.c > +++ b/net/netlink/af_netlink.c > @@ -238,6 +238,13 @@ static void __netlink_deliver_tap(struct sk_buff

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-14 Thread Ken-ichirou MATSUZAWA
Hi, Thank you for taking your time and trying to understand, even though one of samples is wrong. correct one is: rx only mmaped nflog sample: https://gist.github.com/chamaken/dc0f80c14862e8061c06/raw/365c8a106840368f313a3791958da9be0f5fbed0/rxring-nflog.c > >Currently, what happens is

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-14 Thread Daniel Borkmann
On 08/14/2015 12:01 PM, Daniel Borkmann wrote: On 08/14/2015 10:58 AM, Ken-ichirou MATSUZAWA wrote: Hi, Thank you for taking your time. Please let me explain these with code samples on gist. I can not describe and arrange it well, sorry. normal socket nflog sample: https://gist.gi

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-14 Thread Daniel Borkmann
On 08/14/2015 10:58 AM, Ken-ichirou MATSUZAWA wrote: Hi, Thank you for taking your time. Please let me explain these with code samples on gist. I can not describe and arrange it well, sorry. normal socket nflog sample: https://gist.github.com/chamaken/dc0f80c14862e8061c06/raw/2d6da

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-14 Thread Ken-ichirou MATSUZAWA
Hi, Thank you for taking your time. Please let me explain these with code samples on gist. I can not describe and arrange it well, sorry. normal socket nflog sample: https://gist.github.com/chamaken/dc0f80c14862e8061c06/raw/2d6da8fff31ef61af77e68713fdb1d71978746a6/nflog.c set iptables

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-12 Thread David Miller
From: Ken-ichirou MATSUZAWA Date: Wed, 12 Aug 2015 17:28:24 +0900 > It would be better if someone else is working on this. > Or could you help me out? It's a tough work for me. If you are fixing a panic, you must show that panic message and describe in detail the exact sequence of events and sta

[PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-12 Thread Ken-ichirou MATSUZAWA
Hi, It would be better if someone else is working on this. Or could you help me out? It's a tough work for me. Changes from RFC: * remove netlink_skb_zerocopy() I made a big mistake, and ``len <= skb_tailroom(to)'' for mmaped skb is always true in nfqnl_build_packet_message() * copy