[PATCH] perf script: Add option to stop printing callchain

2016-11-25 Thread David Ahern
From: David Ahern Allow user to specify list of symbols which cause the dump of callchains to stop at that symbol. Signed-off-by: David Ahern --- tools/perf/Documentation/perf-script.txt | 3 +++ tools/perf/builtin-script.c | 2 ++ tools/perf/util/evsel_fprintf.c | 8

[PATCH] perf trace: Update tid/pid filtering option to leverage symbol_conf

2016-11-25 Thread David Ahern
From: David Ahern <dsah...@gmail.com> Leverage pid/tid filtering done by symbol_conf hooks. Signed-off-by: David Ahern <dsah...@gmail.com> --- tools/perf/builtin-trace.c | 49 +- 1 file changed, 9 insertions(+), 40 deletions(-) diff -

[PATCH] perf trace: Update tid/pid filtering option to leverage symbol_conf

2016-11-25 Thread David Ahern
From: David Ahern Leverage pid/tid filtering done by symbol_conf hooks. Signed-off-by: David Ahern --- tools/perf/builtin-trace.c | 49 +- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin

[PATCH] perf timehist: Handle cpu migration events

2016-11-25 Thread David Ahern
From: David Ahern <dsah...@gmail.com> Add handlers for sched:sched_migrate_task event. Total number of migrations is added to summary display and -M/--migrations can be used to show migration events. Signed-off-by: David Ahern <dsah...@gmail.com> Cc: Namhyung Kim <namhy...@kernel.

[PATCH] perf timehist: Handle cpu migration events

2016-11-25 Thread David Ahern
From: David Ahern Add handlers for sched:sched_migrate_task event. Total number of migrations is added to summary display and -M/--migrations can be used to show migration events. Signed-off-by: David Ahern Cc: Namhyung Kim --- tools/perf/Documentation/perf-sched.txt | 4 ++ tools/perf

[tip:perf/core] perf sched timehist: Add -V/--cpu-visual option

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: a407b0678bc1c39d70af5fdbe6421c164b69a8c0 Gitweb: http://git.kernel.org/tip/a407b0678bc1c39d70af5fdbe6421c164b69a8c0 Author: David Ahern <dsah...@gmail.com> AuthorDate: Wed, 16 Nov 2016 15:06:33 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[tip:perf/core] perf sched timehist: Add -V/--cpu-visual option

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: a407b0678bc1c39d70af5fdbe6421c164b69a8c0 Gitweb: http://git.kernel.org/tip/a407b0678bc1c39d70af5fdbe6421c164b69a8c0 Author: David Ahern AuthorDate: Wed, 16 Nov 2016 15:06:33 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Nov 2016 10:44:09 -0300 perf sched

[tip:perf/core] perf sched timehist: Add call graph options

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 6c973c90852c3fa4b4e76a061ce89dcd373efccc Gitweb: http://git.kernel.org/tip/6c973c90852c3fa4b4e76a061ce89dcd373efccc Author: David Ahern <dsah...@gmail.com> AuthorDate: Wed, 16 Nov 2016 15:06:32 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[tip:perf/core] perf sched timehist: Add call graph options

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 6c973c90852c3fa4b4e76a061ce89dcd373efccc Gitweb: http://git.kernel.org/tip/6c973c90852c3fa4b4e76a061ce89dcd373efccc Author: David Ahern AuthorDate: Wed, 16 Nov 2016 15:06:32 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Nov 2016 10:44:09 -0300 perf sched

[tip:perf/core] perf sched timehist: Add summary options

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 52df138caaa8daaaf4e0dc64428ef06f303a8dbf Gitweb: http://git.kernel.org/tip/52df138caaa8daaaf4e0dc64428ef06f303a8dbf Author: David Ahern <dsah...@gmail.com> AuthorDate: Wed, 16 Nov 2016 15:06:30 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[tip:perf/core] perf sched timehist: Add -w/--wakeups option

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: fc1469f1b20777929a47f6f8e55bca12c6f142ac Gitweb: http://git.kernel.org/tip/fc1469f1b20777929a47f6f8e55bca12c6f142ac Author: David Ahern <dsah...@gmail.com> AuthorDate: Wed, 16 Nov 2016 15:06:31 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[tip:perf/core] perf sched timehist: Add summary options

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 52df138caaa8daaaf4e0dc64428ef06f303a8dbf Gitweb: http://git.kernel.org/tip/52df138caaa8daaaf4e0dc64428ef06f303a8dbf Author: David Ahern AuthorDate: Wed, 16 Nov 2016 15:06:30 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Nov 2016 10:44:08 -0300 perf sched

[tip:perf/core] perf sched timehist: Add -w/--wakeups option

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: fc1469f1b20777929a47f6f8e55bca12c6f142ac Gitweb: http://git.kernel.org/tip/fc1469f1b20777929a47f6f8e55bca12c6f142ac Author: David Ahern AuthorDate: Wed, 16 Nov 2016 15:06:31 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Nov 2016 10:44:08 -0300 perf sched

[tip:perf/core] perf sched timehist: Introduce timehist command

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 49394a2a24c78ce034fe0e732b1b54922c23fd92 Gitweb: http://git.kernel.org/tip/49394a2a24c78ce034fe0e732b1b54922c23fd92 Author: David Ahern <dsah...@gmail.com> AuthorDate: Wed, 16 Nov 2016 15:06:29 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[tip:perf/core] perf sched timehist: Introduce timehist command

2016-11-23 Thread tip-bot for David Ahern
Commit-ID: 49394a2a24c78ce034fe0e732b1b54922c23fd92 Gitweb: http://git.kernel.org/tip/49394a2a24c78ce034fe0e732b1b54922c23fd92 Author: David Ahern AuthorDate: Wed, 16 Nov 2016 15:06:29 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 23 Nov 2016 10:44:07 -0300 perf sched

Re: [PATCH 1/3] perf sched timehist: Mark schedule function in callchains

2016-11-23 Thread David Ahern
On 11/23/16 8:11 PM, Namhyung Kim wrote: > The sched_switch event always captured from the scheduler function. So > it'd be great omit them from the callchain. This patch marks the > functions to be omitted by later patch. I had this covered by a symbol filter:

Re: [PATCH 1/3] perf sched timehist: Mark schedule function in callchains

2016-11-23 Thread David Ahern
On 11/23/16 8:11 PM, Namhyung Kim wrote: > The sched_switch event always captured from the scheduler function. So > it'd be great omit them from the callchain. This patch marks the > functions to be omitted by later patch. I had this covered by a symbol filter:

Re: net/icmp: null-ptr-deref in icmp6_send

2016-11-22 Thread David Ahern
On 11/22/16 1:11 PM, Cong Wang wrote: > I have no idea what commit 5d41ce29e tried to fix, but we already > use skb->dev a few lines before l3mdev_master_ifindex(), so I don't > understand why skb->dev could be NULL, maybe just for vrf dev? skb->dev can be null depending on when icmp6_send /

Re: net/icmp: null-ptr-deref in icmp6_send

2016-11-22 Thread David Ahern
On 11/22/16 1:11 PM, Cong Wang wrote: > I have no idea what commit 5d41ce29e tried to fix, but we already > use skb->dev a few lines before l3mdev_master_ifindex(), so I don't > understand why skb->dev could be NULL, maybe just for vrf dev? skb->dev can be null depending on when icmp6_send /

Re: net/icmp: null-ptr-deref in icmp6_send

2016-11-22 Thread David Ahern
Sent from my iPhone > On Nov 22, 2016, at 1:11 PM, Cong Wang wrote: > >> On Tue, Nov 22, 2016 at 2:23 AM, Andrey Konovalov >> wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> It seems

Re: net/icmp: null-ptr-deref in icmp6_send

2016-11-22 Thread David Ahern
Sent from my iPhone > On Nov 22, 2016, at 1:11 PM, Cong Wang wrote: > >> On Tue, Nov 22, 2016 at 2:23 AM, Andrey Konovalov >> wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> It seems that skb_dst(skb) may end up being NULL. >> >> As

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-15 Thread David Ahern
On 11/15/16 8:32 AM, Namhyung Kim wrote: > So, are you ok with the name 'wait time'? My thinking is that they > are all waiting for something - timer, resource or cpu. sure.

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-15 Thread David Ahern
On 11/15/16 8:32 AM, Namhyung Kim wrote: > So, are you ok with the name 'wait time'? My thinking is that they > are all waiting for something - timer, resource or cpu. sure.

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-15 Thread David Ahern
On 11/15/16 7:45 AM, Hannes Frederic Sowa wrote: >> @@ -1012,6 +1013,16 @@ static int ip6_dst_lookup_tail(struct net *net, >> const struct sock *sk, >> } >> #endif >> >> +addr_type = ipv6_addr_type(>saddr); >> +if (addr_type == IPv6_ADDR_ANY) >> +return

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-15 Thread David Ahern
On 11/15/16 7:45 AM, Hannes Frederic Sowa wrote: >> @@ -1012,6 +1013,16 @@ static int ip6_dst_lookup_tail(struct net *net, >> const struct sock *sk, >> } >> #endif >> >> +addr_type = ipv6_addr_type(>saddr); >> +if (addr_type == IPv6_ADDR_ANY) >> +return

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-15 Thread David Ahern
On 11/15/16 12:34 AM, Ingo Molnar wrote: > > * Namhyung Kim wrote: > By default it shows the individual schedule events, including the time between sched-in events for the task, the task scheduling delay (time between wakeup and actually running)

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-15 Thread David Ahern
On 11/15/16 12:34 AM, Ingo Molnar wrote: > > * Namhyung Kim wrote: > By default it shows the individual schedule events, including the time between sched-in events for the task, the task scheduling delay (time between wakeup and actually running) and run time for the

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
On 11/14/16 10:33 AM, Hannes Frederic Sowa wrote: > I just also quickly read up on the history (sorry was travelling last > week) and wonder if you ever saw a user space facing bug or if this is > basically some difference you saw while writing out of tree code? I checked the

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
On 11/14/16 10:33 AM, Hannes Frederic Sowa wrote: > I just also quickly read up on the history (sorry was travelling last > week) and wonder if you ever saw a user space facing bug or if this is > basically some difference you saw while writing out of tree code? I checked the

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
On 11/14/16 10:04 AM, Hannes Frederic Sowa wrote: > On 14.11.2016 17:55, David Ahern wrote: >> On 11/14/16 9:44 AM, Hannes Frederic Sowa wrote: >>> On Mon, Nov 14, 2016, at 00:28, Jason A. Donenfeld wrote: >>>> This puts the IPv6 routing functions in parity with t

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
On 11/14/16 10:04 AM, Hannes Frederic Sowa wrote: > On 14.11.2016 17:55, David Ahern wrote: >> On 11/14/16 9:44 AM, Hannes Frederic Sowa wrote: >>> On Mon, Nov 14, 2016, at 00:28, Jason A. Donenfeld wrote: >>>> This puts the IPv6 routing functions in parity with t

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
easy to use the same error handlers for both cases. >> >> Signed-off-by: Jason A. Donenfeld <ja...@zx2c4.com> >> Cc: David Ahern <d...@cumulusnetworks.com> >> --- >> Changes from v2: >> It turns out ipv6_chk_addr already has the device e

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
easy to use the same error handlers for both cases. >> >> Signed-off-by: Jason A. Donenfeld >> Cc: David Ahern >> --- >> Changes from v2: >> It turns out ipv6_chk_addr already has the device enumeration >> logic that we need by simply passing NUL

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-14 Thread David Ahern
On 11/14/16 9:12 AM, Namhyung Kim wrote: > Hello, > > This patchset is a rebased version of David's sched timehist work [1]. > I plan to improve perf sched command more and think that having > timehist command before the work looks good. It seems David is busy > these days, so I'm retrying it by

Re: [PATCHSET 0/7] perf sched: Introduce timehist command, again (v1)

2016-11-14 Thread David Ahern
On 11/14/16 9:12 AM, Namhyung Kim wrote: > Hello, > > This patchset is a rebased version of David's sched timehist work [1]. > I plan to improve perf sched command more and think that having > timehist command before the work looks good. It seems David is busy > these days, so I'm retrying it by

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
feld <ja...@zx2c4.com> > Cc: David Ahern <d...@cumulusnetworks.com> > --- > Changes from v2: > It turns out ipv6_chk_addr already has the device enumeration > logic that we need by simply passing NULL. > > net/ipv6/ip6_output.c | 4 > 1 file changed

Re: [PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-14 Thread David Ahern
the v4 logic with __ip_dev_find in > __ip_route_output_key_hash. In the event that the returned dst is not > for a dst with a dev that has the saddr, we return -EINVAL, just like > v4; this makes it easy to use the same error handlers for both cases. > > Signed-off-by: Jason A. D

Re: [PATCH v2] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
Donenfeld <ja...@zx2c4.com> > Cc: David Ahern <d...@cumulusnetworks.com> > --- > Changes from v1: >This moves the check to the top and now sees if it's a valid address >on _any_ device, not just the one in dst. > > include/net/ipv6.h| 2 ++ > net

Re: [PATCH v2] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
rrors the v4 logic with __ip_dev_find in > __ip_route_output_key_hash. In the event that the returned dst is not > for a dst with a dev that has the saddr, we return -EINVAL, just like > v4; this makes it easy to use the same error handlers for both cases. > > Signed-off-by: Jason A. D

Re: [PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
On 11/13/16 1:19 PM, Jason A. Donenfeld wrote: > I gave v2 my best shot. Hopefully it's adequate, but I have a feeling > it might be best for you to just code up what you have in mind. nah, you are doing fine. one more comment on v2.

Re: [PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
On 11/13/16 1:19 PM, Jason A. Donenfeld wrote: > I gave v2 my best shot. Hopefully it's adequate, but I have a feeling > it might be best for you to just code up what you have in mind. nah, you are doing fine. one more comment on v2.

Re: [PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
feld <ja...@zx2c4.com> > Cc: David Ahern <d...@cumulusnetworks.com> > --- > net/ipv6/ip6_output.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c > index 6001e78..a834129 100644 > --- a/net/ipv6/i

Re: [PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
the v4 logic with __ip_dev_find in > __ip_route_output_key_hash. In the event that the returned dst is not > for a dst with a dev that has the saddr, we return -EINVAL, just like > v4; this makes it easy to use the same error handlers for both cases. > > Signed-off-by: Jason A. D

Re: Source address fib invalidation on IPv6

2016-11-12 Thread David Ahern
On 11/12/16 8:40 AM, Jason A. Donenfeld wrote: > Hi again, > > I've done some pretty in depth debugging now to determine exactly what > the behavior of ipv6_stub->ipv6_dst_lookup is. First I'll start with > ip_route_output_flow, which I believe to be well behaved, and then > I'll show

Re: Source address fib invalidation on IPv6

2016-11-12 Thread David Ahern
On 11/12/16 8:40 AM, Jason A. Donenfeld wrote: > Hi again, > > I've done some pretty in depth debugging now to determine exactly what > the behavior of ipv6_stub->ipv6_dst_lookup is. First I'll start with > ip_route_output_flow, which I believe to be well behaved, and then > I'll show

Re: Source address fib invalidation on IPv6

2016-11-11 Thread David Ahern
On 11/11/16 12:29 PM, Jason A. Donenfeld wrote: > Hi folks, > > If I'm replying to a UDP packet, I generally want to use a source > address that's the same as the destination address of the packet to > which I'm replying. For example: > > Peer A sends packet: src = 10.0.0.1, dst = 10.0.0.3 >

Re: Source address fib invalidation on IPv6

2016-11-11 Thread David Ahern
On 11/11/16 12:29 PM, Jason A. Donenfeld wrote: > Hi folks, > > If I'm replying to a UDP packet, I generally want to use a source > address that's the same as the destination address of the packet to > which I'm replying. For example: > > Peer A sends packet: src = 10.0.0.1, dst = 10.0.0.3 >

Re: net/tcp: null-ptr-deref in __inet_lookup_listener/inet_exact_dif_match

2016-11-02 Thread David Ahern
On 11/2/16 11:21 AM, Eric Dumazet wrote: > Thanks for your report. > > David, please take a look. > > TCP MD5 can call __inet_lookup_listener() with a NULL skb. interesting. I did not test md5 before sending, but doing so now I am not able to trigger the panic with any combination of passwords

Re: net/tcp: null-ptr-deref in __inet_lookup_listener/inet_exact_dif_match

2016-11-02 Thread David Ahern
On 11/2/16 11:21 AM, Eric Dumazet wrote: > Thanks for your report. > > David, please take a look. > > TCP MD5 can call __inet_lookup_listener() with a NULL skb. interesting. I did not test md5 before sending, but doing so now I am not able to trigger the panic with any combination of passwords

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

2016-10-13 Thread David Ahern
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 >> >>> I can't rename the field, neither a can use union. >> >> Remind me again what is wrong with

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

2016-10-13 Thread David Ahern
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 >> >>> I can't rename the field, neither a can use union. >> >> Remind me again what is wrong with using an anonymous

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

2016-09-26 Thread David Ahern
On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > Something like > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > === > --- linux-ml.git.orig/include/uapi/linux/inet_diag.h2016-09-11 > 20:56:18.191584145 +0300 > +++

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

2016-09-26 Thread David Ahern
On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > Something like > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > === > --- linux-ml.git.orig/include/uapi/linux/inet_diag.h2016-09-11 > 20:56:18.191584145 +0300 > +++

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

2016-09-16 Thread David Ahern
On 9/16/16 1:52 PM, Cyrill Gorcunov wrote: > 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 f

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

2016-09-16 Thread David Ahern
On 9/16/16 1:52 PM, Cyrill Gorcunov wrote: > 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 f

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

2016-09-16 Thread David Ahern
On 9/16/16 1:39 PM, Cyrill Gorcunov wrote: > 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 >>>

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

2016-09-16 Thread David Ahern
On 9/16/16 1:39 PM, Cyrill Gorcunov wrote: > 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 >>>

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

2016-09-16 Thread David Ahern
On 9/16/16 1:00 PM, Cyrill Gorcunov wrote: > I created veth pair and bound raw socket into it. > > [root@pcs7 iproute2]# misc/ss -A raw > State Recv-Q Send-QLocal Address:Port > Peer Address:Port

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

2016-09-16 Thread David Ahern
On 9/16/16 1:00 PM, Cyrill Gorcunov wrote: > I created veth pair and bound raw socket into it. > > [root@pcs7 iproute2]# misc/ss -A raw > State Recv-Q Send-QLocal Address:Port > Peer Address:Port

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

2016-09-15 Thread David Ahern
On 9/15/16 4:48 PM, Eric Dumazet wrote: > On Fri, 2016-09-16 at 00:01 +0300, Cyrill Gorcunov wrote: > >> Here I get kicked off the server. Login back >> >> [cyrill@uranus ~] ssh root@pcs7 >> Last login: Thu Sep 15 23:20:42 2016 from gateway >> [root@pcs7 ~]# cd /home/iproute2/ >> [root@pcs7

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

2016-09-15 Thread David Ahern
On 9/15/16 4:48 PM, Eric Dumazet wrote: > On Fri, 2016-09-16 at 00:01 +0300, Cyrill Gorcunov wrote: > >> Here I get kicked off the server. Login back >> >> [cyrill@uranus ~] ssh root@pcs7 >> Last login: Thu Sep 15 23:20:42 2016 from gateway >> [root@pcs7 ~]# cd /home/iproute2/ >> [root@pcs7

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

2016-09-15 Thread David Ahern
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 there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this

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

2016-09-15 Thread David Ahern
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 there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this

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

2016-09-15 Thread David Ahern
On 9/15/16 2:36 PM, Eric Dumazet wrote: > On Thu, 2016-09-15 at 14:25 -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. >>>

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

2016-09-15 Thread David Ahern
On 9/15/16 2:36 PM, Eric Dumazet wrote: > On Thu, 2016-09-15 at 14:25 -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. >>>

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

2016-09-15 Thread David Ahern
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 there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this

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

2016-09-15 Thread David Ahern
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 there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this

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

2016-09-15 Thread David Ahern
(by dsa@) > > CC: David S. Miller <da...@davemloft.net> > CC: Eric Dumazet <eric.duma...@gmail.com> > CC: David Ahern <d...@cumulusnetworks.com> > CC: Alexey Kuznetsov <kuz...@ms2.inr.ac.ru> > CC: James Morris <jmor...@namei.org> > CC: Hideaki YOSH

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

2016-09-15 Thread David Ahern
by dsa@) > > 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 > --- ss -K is n

Re: [PATCH] net: inet: diag: Fix an error handling

2016-09-12 Thread David Ahern
On 9/12/16 12:02 AM, Christophe JAILLET wrote: > diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c > index abfbe492ebfe..795af25cf84c 100644 > --- a/net/ipv4/inet_diag.c > +++ b/net/ipv4/inet_diag.c > @@ -1134,7 +1134,6 @@ int inet_diag_handler_get_info(struct sk_buff *skb, > struct sock

Re: [PATCH] net: inet: diag: Fix an error handling

2016-09-12 Thread David Ahern
On 9/12/16 12:02 AM, Christophe JAILLET wrote: > diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c > index abfbe492ebfe..795af25cf84c 100644 > --- a/net/ipv4/inet_diag.c > +++ b/net/ipv4/inet_diag.c > @@ -1134,7 +1134,6 @@ int inet_diag_handler_get_info(struct sk_buff *skb, > struct sock

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

2016-09-10 Thread David Ahern
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 >> should be close to what is needed for raw sockets. See udp_diag_destroy >>

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

2016-09-10 Thread David Ahern
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 >> should be close to what is needed for raw sockets. See udp_diag_destroy >>

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

2016-09-10 Thread David Ahern
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], packet, netlink it works as expected, > the raw sockets do not have. Thus add it. > > CC: David S.

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

2016-09-10 Thread David Ahern
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], packet, netlink it works as expected, > the raw sockets do not have. Thus add it. > > CC: David S.

Re: net: vrf: Handle ipv6 multicast and link-local addresses

2016-08-03 Thread David Ahern
On 8/3/16 2:27 PM, Geert Uytterhoeven wrote: > On Wed, Aug 3, 2016 at 10:11 PM, David Ahern <d...@cumulusnetworks.com> wrote: >> On 8/3/16 1:57 PM, Geert Uytterhoeven wrote: >>>> +static void vrf_ip6_input_dst(struct sk_buff *skb, struc

Re: net: vrf: Handle ipv6 multicast and link-local addresses

2016-08-03 Thread David Ahern
On 8/3/16 2:27 PM, Geert Uytterhoeven wrote: > On Wed, Aug 3, 2016 at 10:11 PM, David Ahern wrote: >> On 8/3/16 1:57 PM, Geert Uytterhoeven wrote: >>>> +static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device >>>> *vrf_dev, >>>&g

Re: net: vrf: Handle ipv6 multicast and link-local addresses

2016-08-03 Thread David Ahern
On 8/3/16 1:57 PM, Geert Uytterhoeven wrote: >> +static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device >> *vrf_dev, >> > + int ifindex) >> > +{ >> > + const struct ipv6hdr *iph = ipv6_hdr(skb); >> > + struct flowi6 fl6 = { >> > +

Re: net: vrf: Handle ipv6 multicast and link-local addresses

2016-08-03 Thread David Ahern
On 8/3/16 1:57 PM, Geert Uytterhoeven wrote: >> +static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device >> *vrf_dev, >> > + int ifindex) >> > +{ >> > + const struct ipv6hdr *iph = ipv6_hdr(skb); >> > + struct flowi6 fl6 = { >> > +

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-08-02 Thread David Ahern
On 8/2/16 11:03 AM, John Stultz wrote: So bisecting between v4.7 and linus/HEAD with the test above, it seems like: 96c63fa7393d ("net: Add l3mdev rule") is what breaks the tests. The l3mdev rule patch is a bit tangled with the fib_rules one, but if I revert both of those, the only thing that

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-08-02 Thread David Ahern
On 8/2/16 11:03 AM, John Stultz wrote: So bisecting between v4.7 and linus/HEAD with the test above, it seems like: 96c63fa7393d ("net: Add l3mdev rule") is what breaks the tests. The l3mdev rule patch is a bit tangled with the fib_rules one, but if I revert both of those, the only thing that

Re: [PATCH 2/2 v5] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-02 Thread David Ahern
- commit 80ed87c8a9ca ("sched/wait: Introduce TASK_NOLOAD and TASK_IDLE"): Introduces new state 'N' - commit 7dc603c9028e ("sched/fair: Fix PELT integrity for new tasks"): Introduces new state 'n' Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Ols

Re: [PATCH 2/2 v5] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-02 Thread David Ahern
- commit 80ed87c8a9ca ("sched/wait: Introduce TASK_NOLOAD and TASK_IDLE"): Introduces new state 'N' - commit 7dc603c9028e ("sched/fair: Fix PELT integrity for new tasks"): Introduces new state 'n' Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim

[tip:perf/urgent] perf/core: Change log level for duration warning to KERN_INFO

2016-08-02 Thread tip-bot for David Ahern
Commit-ID: 0d87d7ec22a0879d3926faa4f4f4412a5dee1fba Gitweb: http://git.kernel.org/tip/0d87d7ec22a0879d3926faa4f4f4412a5dee1fba Author: David Ahern <d...@cumulusnetworks.com> AuthorDate: Mon, 1 Aug 2016 13:49:29 -0700 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue

[tip:perf/urgent] perf/core: Change log level for duration warning to KERN_INFO

2016-08-02 Thread tip-bot for David Ahern
Commit-ID: 0d87d7ec22a0879d3926faa4f4f4412a5dee1fba Gitweb: http://git.kernel.org/tip/0d87d7ec22a0879d3926faa4f4f4412a5dee1fba Author: David Ahern AuthorDate: Mon, 1 Aug 2016 13:49:29 -0700 Committer: Ingo Molnar CommitDate: Tue, 2 Aug 2016 10:23:57 +0200 perf/core: Change log level

[PATCH] perf: Change log level for duration warning to INFO

2016-08-01 Thread David Ahern
dingly. Signed-off-by: David Ahern <d...@cumulusnetworks.com> --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 356a6c7cb52a..a19550d80ab1 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -

[PATCH] perf: Change log level for duration warning to INFO

2016-08-01 Thread David Ahern
dingly. Signed-off-by: David Ahern --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 356a6c7cb52a..a19550d80ab1 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -448,7 +448,7 @@ stat

Re: [PATCH 1/7] tools lib: Add bitmap_alloc function

2016-08-01 Thread David Ahern
On 8/1/16 12:02 PM, Jiri Olsa wrote: @@ -65,4 +66,13 @@ static inline int test_and_set_bit(int nr, unsigned long *addr) return (old & mask) != 0; } +/** + * bitmap_alloc - Allocate bitmap + * @nr: Bit to set + */ +static inline unsigned long *bitmap_alloc(int nbits) +{ + return

Re: [PATCH 1/7] tools lib: Add bitmap_alloc function

2016-08-01 Thread David Ahern
On 8/1/16 12:02 PM, Jiri Olsa wrote: @@ -65,4 +66,13 @@ static inline int test_and_set_bit(int nr, unsigned long *addr) return (old & mask) != 0; } +/** + * bitmap_alloc - Allocate bitmap + * @nr: Bit to set + */ +static inline unsigned long *bitmap_alloc(int nbits) +{ + return

Re: [PATCH 2/2 v4] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-01 Thread David Ahern
: Add sched latency profiling") Wrong Fixes tag for this change. This is really an update based on kernel changes, the last one being 7dc603c9028ea. Cc: Jiri Olsa <jo...@kernel.org> Cc: David Ahern <dsah...@gmail.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zi

Re: [PATCH 2/2 v4] perf sched: adapt TASK_STATE_TO_CHAR_STR to the latest kernel

2016-08-01 Thread David Ahern
Fixes tag for this change. This is really an update based on kernel changes, the last one being 7dc603c9028ea. Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu --- Changes from v3: Added Fixes: Split patch into 2 pieces. tools/perf/builtin-s

Re: [PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-08-01 Thread David Ahern
<tomoki.sekiyama...@hitachi.com> Fixes: cdce9d738b91e ("perf sched: Add sched latency profiling") Cc: Jiri Olsa <jo...@kernel.org> Cc: David Ahern <dsah...@gmail.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Masami Hir

Re: [PATCH 1/2 v4] perf sched: fix wrong conversion of task state

2016-08-01 Thread David Ahern
: cdce9d738b91e ("perf sched: Add sched latency profiling") Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu --- Changes from v3: Added Fixes: Split the patch into 2 pieces. tools/perf/builtin-sched.c | 5 +++-- 1 file changed, 3 insert

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-07-29 Thread David Ahern
On 7/29/16 10:57 AM, John Stultz wrote: I take Android userspace inserts the same rule multiple times? (ip rule ls) With the patch reverted, and the system working, I see: # ip rule ls 0: from all lookup local 1: from all fwmark 0xc/0xd lookup legacy_system 13000: from all

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-07-29 Thread David Ahern
On 7/29/16 10:57 AM, John Stultz wrote: I take Android userspace inserts the same rule multiple times? (ip rule ls) With the patch reverted, and the system working, I see: # ip rule ls 0: from all lookup local 1: from all fwmark 0xc/0xd lookup legacy_system 13000: from all

Re: [PATCH v3] perf sched: fix wrong conversion of task state

2016-07-29 Thread David Ahern
patches -- as suggested by the 'also' in the description. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama...@hitachi.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: David Ahern <dsah...@gmail.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <a.p.zijls...@chel

Re: [PATCH v3] perf sched: fix wrong conversion of task state

2016-07-29 Thread David Ahern
patches -- as suggested by the 'also' in the description. Signed-off-by: Tomoki Sekiyama Cc: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Masami Hiramatsu --- tools/perf/builtin-sched.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-07-29 Thread David Ahern
On 7/28/16 10:20 PM, David Miller wrote: From: John Stultz Date: Thu, 28 Jul 2016 21:18:16 -0700 After moving my HiKey tree to pre-v4.8-rc, I noticed when using Android that I was getting routing errors after toggling networking on and off (or entering suspend). Wifi

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

2016-07-29 Thread David Ahern
On 7/28/16 10:20 PM, David Miller wrote: From: John Stultz Date: Thu, 28 Jul 2016 21:18:16 -0700 After moving my HiKey tree to pre-v4.8-rc, I noticed when using Android that I was getting routing errors after toggling networking on and off (or entering suspend). Wifi associated, but I got

Re: [PATCH] perf sched: fix wrong conversion of task state

2016-07-28 Thread David Ahern
On 7/27/16 9:10 PM, Tomoki Sekiyama wrote: But that means we cannot handle preemption correctly as far as sched:sched_switch event uses TASK_STATE_MAX to mark preempted tasks. Should we stop using TASK_STATE_MAX for preempted tasks in ftrace and use (1 << 63) or something that doesn't change on

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