Re: [LKP] [net/ipv6] 4ed591c8ab: kernel_selftests.net.fib-onlink-tests.sh.fail

2018-11-02 Thread David Ahern
On 11/1/18 8:11 PM, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: 4ed591c8ab44e711e56b8e021ffaf4f407c045f5 ("net/ipv6: Allow onlink > routes to have a device mismatch if it is the default route") >

Re: [PATCH net-next 0/7] rtnetlink: add RTM_GETADDR2

2018-09-27 Thread David Ahern
On 9/27/18 11:58 AM, Christian Brauner wrote: > Various userspace programs (e.g. iproute2) have sent RTM_GETADDR > requests with struct ifinfomsg. This is wrong and should have been > struct ifaddrmsg all along as mandated by the manpages. However, dump > requests so far didn't parse the netlink

Re: [PATCH] net: ipv6: route: Fix a sleep-in-atomic-context bug in ip6_convert_metrics()

2018-09-03 Thread David Ahern
On 9/1/18 5:19 AM, Jia-Ju Bai wrote: > The kernel module may sleep with holding a spinlock. > > The function call paths (from bottom to top) in Linux-4.16 are: > > [FUNC] kzalloc(GFP_KERNEL) > net/ipv6/route.c, 2430: > kzalloc in ip6_convert_metrics > net/ipv6/route.c, 2890: >

Re: KASAN: use-after-free Read in rtnetlink_put_metrics

2018-08-01 Thread David Ahern
On 8/1/18 10:15 AM, Sabrina Dubroca wrote: > ip -net peerA route add fec0:B::/64 via fec0:A:: mtu 1300 I am on vacation right now with limited access to internet, so not able to take a look. In submitting the fib6_info changes I did tests like this and did not see memleak reports (and verified

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/24/18 11:14 AM, David Miller wrote: > From: David Ahern > Date: Tue, 24 Jul 2018 09:14:01 -0600 > >> I get the impression there is no longer a strong resistance against >> moving the tables to per namespace, but deciding what is the right >> approach to han

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 11:38 AM, Eric W. Biederman wrote: > > Absolutely NOT. Global thresholds are exactly correct given the fact > you are running on a single kernel. > > Memory is not free (Even though we are swimming in enough of it memory > rarely matters). One of the few remaining challenges is for

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 6:33 AM, Eric W. Biederman wrote: > Cong Wang writes: > >> On Tue, Jul 24, 2018 at 8:14 AM David Ahern wrote: >>> >>> On 7/19/18 11:12 AM, Cong Wang wrote: >>>> On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: >>>>> >&g

Re: INFO: rcu detected stall in corrupted

2018-05-21 Thread David Ahern
On 5/21/18 12:13 PM, Eric Dumazet wrote: > > > On 05/21/2018 11:09 AM, David Miller wrote: >> From: syzbot >> Date: Mon, 21 May 2018 11:05:02 -0700 >> >>> find_match+0x244/0x13a0 net/ipv6/route.c:691 >>> find_rr_leaf net/ipv6/route.c:729

Re: WARNING: suspicious RCU usage in rt6_check_expired

2018-04-23 Thread David Ahern
On 4/23/18 7:31 AM, Eric Dumazet wrote: >> stack backtrace: >> CPU: 1 PID: 25958 Comm: syz-executor7 Not tainted 4.16.0+ #11 >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> Google 01/01/2011 >> Call Trace: >>  __dump_stack lib/dump_stack.c:77 [inline] >>  

Re: WARNING: suspicious RCU usage in fib6_info_alloc

2018-04-18 Thread David Ahern
On 4/18/18 3:02 PM, syzbot wrote: > stack backtrace: > CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.16.0+ #5 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Workqueue: ipv6_addrconf addrconf_dad_work > Call Trace: >  __dump_stack

Re: [PATCH] netdevsim: remove incorrect __net_initdata annotations

2018-04-04 Thread David Ahern
On 4/4/18 6:12 AM, Arnd Bergmann wrote: > The __net_initdata section cannot currently be used for structures that > get cleaned up in an exitcall using unregister_pernet_operations: > > WARNING: vmlinux.o(.text+0x868c34): Section mismatch in reference from the > function nsim_devlink_exit() to

Re: [PATCH] selftests/net: enable fragments for fib-onlink-tests

2018-03-08 Thread David Ahern
On 3/8/18 3:17 AM, Anders Roxell wrote: > We miss CONFIG_* fragments so test fib-onlink-tests.sh can do: > ip li add lisa type vrf table 1101 > ip li add veth1 type veth peer name veth2 > > And the follow message occurs if it isn't enabled: > Configuring interfaces > RTNETLINK answers: Operation

Re: [PATCH net 1/1 v2] rtnetlink: require unique netns identifier

2018-02-05 Thread David Ahern
le properties specifiy the same network namespace > --- > net/core/rtnetlink.c | 69 > ++++++++ > 1 file changed, 69 insertions(+) LGTM. Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net 1/1 v1] rtnetlink: require unique netns identifier

2018-02-04 Thread David Ahern
On 2/4/18 5:11 AM, Christian Brauner wrote: > On Sat, Feb 03, 2018 at 11:17:01AM -0800, Stephen Hemminger wrote: >> On Sat, 3 Feb 2018 14:29:04 +0100 >> Christian Brauner wrote: >> >>> +static int rtnl_ensure_unique_netns_attr(const struct sock *sk, >>> +

Re: [PATCH net 1/1 v1] rtnetlink: require unique netns identifier

2018-02-03 Thread David Ahern
On 2/3/18 12:17 PM, Stephen Hemminger wrote: > On Sat, 3 Feb 2018 14:29:04 +0100 > Christian Brauner wrote: > >> +static int rtnl_ensure_unique_netns_attr(const struct sock *sk, >> + struct nlattr *tb[], >> +

Re: [RFC net 1/1] rtnetlink: require unique netns identifier

2018-02-02 Thread David Ahern
On 2/2/18 1:51 AM, Christian Brauner wrote: > diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c > index 56af8e41abfc..d0b7ab22eff4 100644 > --- a/net/core/rtnetlink.c > +++ b/net/core/rtnetlink.c > @@ -1951,6 +1951,18 @@ static struct net *rtnl_link_get_net_capable(const > struct sk_buff

Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-01-30 Thread David Ahern
On 1/30/18 1:57 PM, David Ahern wrote: > On 1/30/18 1:08 PM, Daniel Borkmann wrote: >> On 01/30/2018 07:32 PM, Cong Wang wrote: >>> On Tue, Jan 30, 2018 at 4:09 AM, Dmitry Vyukov <dvyu...@google.com> wrote: >>>> Hello, >>>> >>>>

Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-01-30 Thread David Ahern
On 1/30/18 1:08 PM, Daniel Borkmann wrote: > On 01/30/2018 07:32 PM, Cong Wang wrote: >> On Tue, Jan 30, 2018 at 4:09 AM, Dmitry Vyukov wrote: >>> Hello, >>> >>> The following program creates a hang in unregister_netdevice. >>> cleanup_net work hangs there forever periodically

Re: KASAN: slab-out-of-bounds Read in erspan_xmit

2018-01-23 Thread David Ahern
On 1/23/18 11:50 AM, William Tu wrote: > Hi, > > I'm new to kasan and trying to follow this instruction to reproduce the issue: > https://github.com/google/syzkaller/blob/master/docs/executing_syzkaller_programs.md > > After re-compile my kernel with KASAN related config enable, I run > $

Re: KASAN: slab-out-of-bounds Read in erspan_xmit

2018-01-22 Thread David Ahern
[ cc William Tu ] On 1/22/18 12:58 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 9d6474e458b13a94a0d5b141f2b8f38adf1991ae (Mon Jan 22 02:55:38 2018 +) > tun: add missing rcu annotation > > So far this crash happened 5 times on net-next. > C reproducer is

Re: KASAN: use-after-free Read in erspan_xmit

2018-01-22 Thread David Ahern
[ cc William Tu ] On 1/22/18 12:58 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 9d6474e458b13a94a0d5b141f2b8f38adf1991ae (Mon Jan 22 02:55:38 2018 +) > tun: add missing rcu annotation > > So far this crash happened 9 times on net-next. > C reproducer is

Re: KASAN: use-after-free Read in erspan_build_header

2018-01-22 Thread David Ahern
[ cc William Tu] On 1/22/18 12:58 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 0d665e7b109d512b7cae3ccef6e8654714887844 (Fri Jan 19 12:49:24 2018 +) > mm, page_vma_mapped: Drop faulty pointer arithmetics in check_pte() > > So far this crash happened 11

lightweight netdevs Jan 2018 edition [Re: [PATCH net-next v2] net: core: Expose number of link up/down transitions]

2018-01-22 Thread David Ahern
On 1/22/18 1:46 PM, Florian Fainelli wrote: >> >> Like David Ahern I am strongly against the proliferation of sysfs files >> attached to network devices and the per-netdevice costs associated with >> that. >> >> However, dealing with that is a longer term i

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread David Ahern
On 1/17/18 3:06 PM, Florian Fainelli wrote: > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7bf8b85ade16..9f732c3dc2ce 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -295,10 +295,29 @@ static ssize_t carrier_changes_show(struct device *dev, > struct

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread David Ahern
On 1/17/18 3:52 PM, Jiri Pirko wrote: > Thu, Jan 18, 2018 at 12:06:57AM CET, f.faine...@gmail.com wrote: >> From: David Decotigny >> >> Expose the number of times the link has been going UP or DOWN, and >> update the "carrier_changes" counter to be the sum of these two events.

Re: KASAN: stack-out-of-bounds Read in __nla_put

2018-01-17 Thread David Ahern
On 1/17/18 2:39 AM, Xin Long wrote: > I guess you need to move up your memset(0) a little bit: > > @@ -2427,6 +2443,7 @@ int netlink_rcv_skb(struct sk_buff *skb, int > (*cb)(struct sk_buff *, > nlh = nlmsg_hdr(skb); > err = 0; > > + memset(, 0,

Re: WARNING in netlink_ack (2)

2018-01-12 Thread David Ahern
On 1/12/18 4:34 AM, Xin Long wrote: >> audit: type=1400 audit(1515595879.379:7): avc: denied { map } for >> pid=3498 comm="syzkaller002174" path="/root/syzkaller002174137" dev="sda1" >> ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 >>

Re: general protection fault in fib6_add (2)

2018-01-03 Thread David Ahern
[ +wei...@google.com ] On 1/2/18 3:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 61233580f1f33c50e159c50e24d80ffd2ba2e06b > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console

Re: INFO: task hung in bpf_exit_net

2017-12-19 Thread David Ahern
On 12/19/17 5:47 AM, Dmitry Vyukov wrote: > On Tue, Dec 19, 2017 at 1:36 PM, syzbot > > wrote: >> Hello, >> >> syzkaller hit the following crash on >> 7ceb97a071e80f1b5e4cd5a36de135612a836388 >>

Re: INFO: task hung in cleanup_net

2017-12-19 Thread David Ahern
On 12/19/17 5:47 AM, Dmitry Vyukov wrote: > On Tue, Dec 19, 2017 at 1:33 PM, syzbot > > wrote: >> Hello, >> >> syzkaller hit the following crash on >> e40fd8d6b4d9f59b160faa1736f78fc07533ff37 >>

Re: [PATCH v4 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-13 Thread David Ahern
akub Kicinski <jakub.kicin...@netronome.com> > Cc: Martin KaFai Lau <ka...@fb.com> > Cc: Quentin Monnet <quentin.mon...@netronome.com> > Reviewed-by: David Ahern <dsah...@gmail.com> > --- The updates for attach flags and man page look great. Very user friendly. Thanks for the work on it.

Re: [PATCH net-next] libbpf: add function to setup XDP

2017-12-10 Thread David Ahern
On 12/10/17 1:34 PM, Eric Leblond wrote: >> Would it be possible to print out or preferably return to the caller >> the ext ack error message? A couple of drivers are using it for XDP >> mis-configuration reporting instead of printks. We should encourage >> other to do the same and support it in

Re: [PATCH net-next] libbpf: add function to setup XDP

2017-12-09 Thread David Ahern
On 12/9/17 7:43 AM, Eric Leblond wrote: > + /* started nested attribute for XDP */ > + nla = (struct nlattr *)(((char *)) > + + NLMSG_ALIGN(req.nh.nlmsg_len)); > + nla->nla_type = NLA_F_NESTED | 43/*IFLA_XDP*/; as a part of the move into libbpf can the

Re: [PATCH v3 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-09 Thread David Ahern
On 12/8/17 4:46 PM, Jakub Kicinski wrote: >> +argc -= 2; >> +argv = [2]; >> +prog_fd = prog_parse_fd(, ); >> +if (prog_fd < 0) >> +goto exit_cgroup; >> + >> +for (i = 0; i < argc; i++) { >> +if (strcmp(argv[i], "allow_multi") == 0) { >> +

Re: [PATCH v2 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-08 Thread David Ahern
On 12/8/17 8:39 AM, Quentin Monnet wrote: > I don't believe compatibility is an issue here, since the program and > its documentation come together (so they should stay in sync) and are > part of the kernel tree (so the tool should be compatible with the > kernel sources it comes with). My concern

Re: [PATCH v2 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-07 Thread David Ahern
akub Kicinski <jakub.kicin...@netronome.com> > Cc: Martin KaFai Lau <ka...@fb.com> > Cc: Quentin Monnet <quentin.mon...@netronome.com> > Cc: David Ahern <dsah...@gmail.com> > --- LGTM. Reviewed-by: David Ahern <dsah...@gmail.com>

Re: [PATCH] netlink: Add netns check on taps

2017-12-05 Thread David Ahern
On 12/5/17 3:46 PM, Kevin Cernekee wrote: > Currently, a nlmon link inside a child namespace can observe systemwide > netlink activity. Filter the traffic so that in a non-init netns, > nlmon can only sniff netlink messages from its own netns. > > Test case: > > vpnns -- bash -c "ip link

Re: [PATCH net-next 3/5] bpftool: implement cgattach command

2017-11-30 Thread David Ahern
On 11/30/17 6:43 AM, Roman Gushchin wrote: > + if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, 0)) { > + bpf_object__close(obj); > + close(prog_fd); > + close(cgroup_fd); > + p_err("Failed to attach program"); > + return -1; > +

Re: [PATCH net-next 3/5] bpftool: implement cgattach command

2017-11-30 Thread David Ahern
On 11/30/17 6:43 AM, Roman Gushchin wrote: > @@ -75,12 +80,13 @@ static int do_help(int argc, char **argv) > fprintf(stderr, > "Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" > " %s batch file FILE\n" > + " %s cgattach FILE CGROUP TYPE\n"

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread David Ahern
On 11/24/17 11:32 AM, Eric Dumazet wrote: > On Fri, 2017-11-24 at 10:14 -0700, David Ahern wrote: >> On 11/22/17 5:30 PM, Solio Sarabia wrote: >>> The netdevice gso_max_size is exposed to allow users fine-control >>> on >>> systems with multiple NICs with diffe

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread David Ahern
On 11/22/17 5:30 PM, Solio Sarabia wrote: > The netdevice gso_max_size is exposed to allow users fine-control on > systems with multiple NICs with different GSO buffer sizes, and where > the virtual devices like bridge and veth, need to be aware of the GSO > size of the underlying devices. > > In

Re: [RFC] perf script: modify field selection option

2017-11-20 Thread David Ahern
On 11/20/17 1:53 PM, Stephane Eranian wrote: > Hi, > > I have been using the perf script -F option on the latest perf and I > find it not very convenient to use. I appreciate the + and - prefix to > field names to add or suppress them. But most of the time, I want to > print only one or two

Re: IPv6 issue in next-20171102 - lockdep and BUG handling RA packet.

2017-11-06 Thread David Ahern
On 11/7/17 9:31 AM, Eric Dumazet wrote: > On Mon, Nov 6, 2017 at 4:29 PM, David Ahern <dsah...@gmail.com> wrote: >> On 11/7/17 5:56 AM, valdis.kletni...@vt.edu wrote: >>> I've hit this 6 times now, across 3 boots: >>> >>> Nov 3 11:04:54 turing-police ker

Re: IPv6 issue in next-20171102 - lockdep and BUG handling RA packet.

2017-11-06 Thread David Ahern
On 11/7/17 5:56 AM, valdis.kletni...@vt.edu wrote: > I've hit this 6 times now, across 3 boots: > > Nov 3 11:04:54 turing-police kernel: [ 547.814748] BUG: sleeping function > called from invalid context at mm/slab.h:422 > > Nov 3 20:24:11 turing-police kernel: [ 60.093793] BUG: sleeping

Re: IPv6 issue in next-20171102 - lockdep and BUG handling RA packet.

2017-11-06 Thread David Ahern
On 11/7/17 9:31 AM, Eric Dumazet wrote: > Do you have CONFIG_DEBUG_ATOMIC_SLEEP=y in your .config ? dsa@kenny:mgmt:~/kernel-2.git$ grep CONFIG_DEBUG_ATOMIC_SLEEP kbuild/rcu-lock-debug/.config CONFIG_DEBUG_ATOMIC_SLEEP=y Yep, that is on.

Re: [PATCH] perf script: Add option to display guest samples in host

2017-10-18 Thread David Ahern
On 10/18/17 1:09 AM, Mengting Zhang wrote: > @@ -2771,6 +2772,8 @@ int cmd_script(int argc, const char **argv) > "Show context switch events (if recorded)"), > OPT_BOOLEAN('\0', "show-namespace-events", > _namespace_events, > "Show namespace events (if

[PATCH v2 perf] tools: Update rbtree files

2017-10-13 Thread David Ahern
Update rbtree files to 4.14. Changes made after copy: - update guards in header files - remove rcu references - kept rb_erase_init in rbtree.h Signed-off-by: David Ahern <dsah...@gmail.com> --- v2 - kept rb_erase_init after the update tools/include/linux/rbtree.h

Re: [PATCH perf] tools: Update rbtree files

2017-10-12 Thread David Ahern
hi Arnaldo: On 9/29/17 2:26 PM, David Ahern wrote: > Update rbtree files to 4.14. Haven't seen this one in your perf/core branch. You added the existing version, so assuming an update goes through you as well. > > Changes made after copy: > - update guards in header files &g

Re: [PATCH][net-next] net: mpls: make function ipgre_mpls_encap_hlen static

2017-10-11 Thread David Ahern
_NET_IP_TUNNEL) > -size_t ipgre_mpls_encap_hlen(struct ip_tunnel_encap *e) > +static size_t ipgre_mpls_encap_hlen(struct ip_tunnel_encap *e) > { > return sizeof(struct mpls_shim_hdr); > } > Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH 1/1] xdp: Sample xdp program implementing ip forward

2017-10-03 Thread David Ahern
On 10/3/17 12:37 AM, cjacob wrote: > diff --git a/samples/bpf/xdp3_kern.c b/samples/bpf/xdp3_kern.c > new file mode 100644 > index 000..62d905d > --- /dev/null > +++ b/samples/bpf/xdp3_kern.c > @@ -0,0 +1,204 @@ > +/* Copyright (c) 2016 PLUMgrid 2016 PLUMgrid? > + * > + * This program is

[PATCH perf] tools: Update rbtree files

2017-09-29 Thread David Ahern
Update rbtree files to 4.14. Changes made after copy: - update guards in header files - remove rcu references Signed-off-by: David Ahern <dsah...@gmail.com> --- tools/include/linux/rbtree.h | 59 --- tools/include/linux/rbtree_augmented.h | 58 +-- tools/lib/rb

Re: [PATCH v2 1/4] Add a new element for the struct perf_tool, and add the --per-event-dump option for perf script

2017-09-25 Thread David Ahern
On 9/25/17 8:41 PM, 禹舟键 wrote: > The changelogs are in the cover-letter. > changes in v2: >         - remove the set of script.tool.per_event_dump variable. >         - add the __maybe_unused attribute for the fp argument in the > second patch. >         - remove the fp_selection_helper function

[tip:perf/core] perf sched timehist: Add pid and tid options

2017-09-22 Thread tip-bot for David Ahern
Commit-ID: 0f59d7a352c11712de0f226b46cb82775b4fcece Gitweb: http://git.kernel.org/tip/0f59d7a352c11712de0f226b46cb82775b4fcece Author: David Ahern <dsah...@gmail.com> AuthorDate: Fri, 1 Sep 2017 10:49:12 -0700 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

Re: [PATCH 2/3] Makes all those related functions receive the FILE pointer

2017-09-16 Thread David Ahern
On 9/13/17 9:10 AM, yuzhoujian wrote: > @@ -1621,8 +1634,12 @@ static int process_comm_event(struct perf_tool *tool, > sample->tid = event->comm.tid; > sample->pid = event->comm.pid; > } > - print_sample_start(sample, thread, evsel); > -

Re: [PATCH 1/3] Add a new element for the struct perf_tool, and add the --per-event-dump option for perf script

2017-09-16 Thread David Ahern
On 9/13/17 9:10 AM, yuzhoujian wrote: > @@ -2797,7 +2801,12 @@ int cmd_script(int argc, const char **argv) > > file.path = input_name; > file.force = symbol_conf.force; > - > + for (i = 1; argv[i] != NULL; i++) { > + if (strcmp(argv[i], "-O") == 0) { > +

Re: [PATCH] perf: support running perf binaries with a dash in their name

2017-09-11 Thread David Ahern
-e): > ... > ~ > > Cc: Arnaldo Carvalho de Melo <a...@redhat.com> > Cc: David Ahern <dsah...@gmail.com> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Peter Zijlstra <a.p.zijls...@chello.nl> > Cc: Yao Jin <yao@linux.intel.com> > Signed-

Re: [PATCH] perf sched timehist: Add pid and tid options

2017-09-07 Thread David Ahern
Hi Arnaldo: are you ok with this change? On 9/1/17 11:49 AM, David Ahern wrote: > Add options to only show event for specific pid(s) and tid(s). > > Signed-off-by: David Ahern <dsah...@gmail.com> > --- > tools/perf/Documentation/perf-sched.txt | 8 > to

[PATCH] perf sched timehist: Add pid and tid options

2017-09-01 Thread David Ahern
Add options to only show event for specific pid(s) and tid(s). Signed-off-by: David Ahern <dsah...@gmail.com> --- tools/perf/Documentation/perf-sched.txt | 8 tools/perf/builtin-sched.c | 4 2 files changed, 12 insertions(+) diff --git a/tools/perf/Documentatio

Re: linux-next: Signed-off-by missing for commit in the net-next tree

2017-08-30 Thread David Ahern
On 8/30/17 10:51 AM, Stephen Rothwell wrote: > Hi all, > > Commit > > 1b70d792cf67 ("ipv6: Use rt6i_idev index for echo replies to a local > address") > > is missing a Signed-off-by from its author. > Eric pointed this out last night. The commit message copied output from a command that

Re: boot failure with 4.13.0-rc6 due to ATA errors

2017-08-29 Thread David Ahern
ion(id) <= 7) > + return false; > + return id[ATA_ID_TRUSTED] & (1 << 0); > +} > + > static inline bool ata_id_has_unload(const u16 *id) > { > if (ata_id_major_version(id) >= 7 && > That works for me. Tested-by: David Ahern <dsah...@gmail.com>

Re: boot failure with 4.13.0-rc6 due to ATA errors

2017-08-28 Thread David Ahern
On 8/28/17 1:59 PM, Tejun Heo wrote: > Can you please verify whether 818831c8b22f ("libata: implement > SECURITY PROTOCOL IN/OUT") is the culprit? ie. try to boot the commit > to verify that the problem is there, and try the one prior? That commit is the problem.

boot failure with 4.13.0-rc6 due to ATA errors

2017-08-28 Thread David Ahern
Not sure why mailing list to direct this bug report to, so starting with libata based on the error messages. Some where between v4.12 and 4.13.0-rc6 a Celestica redstone switch fails to boot due to ATA errors: [9.185203] ata1.00: failed to set xfermode (err_mask=0x40) [9.500825] ata1.00:

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/13/17 2:56 PM, Wei Wang wrote: >> Looking at my patch to move host routes from loopback to device with the >> address, I have this: >> >> @@ -2789,7 +2808,8 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg) >> const struct arg_dev_net *adn = arg; >> const struct

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/12/17 1:42 PM, Wei Wang wrote: > Hi Ido, > >>> - if ((rt->dst.dev == dev || !dev) && >>> + if ((rt->dst.dev == dev || !dev || >>> + rt->rt6i_idev->dev == dev) && >> >> Can you please explain why this line is needed? While host routes aren't >> removed from the FIB by

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:25 PM, Wei Wang wrote: > By "a patch to fix that" do you mean after your patch, for every rt6, > rt6->rt6i_idev will be the same as rt6->dst.dev? FIB entries should have them the same device with my patch. The copies done (ip6_rt_cache_alloc and ip6_rt_pcpu_alloc) will have to set

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:10 PM, Wei Wang wrote: > I think we have a potential fix for this issue. > Martin and I found that when addrconf_dst_alloc() creates a rt6, it is > possible that rt6->dst.dev points to loopback device while > rt6->rt6i_idev->dev points to a real device. > When the real device goes

Re: [PATCH v5 00/16] perf tool: add meta-data header support for pipe-mode

2017-07-11 Thread David Ahern
u mappings: intel_bts = 6, cpu = 4, msr = 49, uncore_cbox_10 = 36, > [SNIP] > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.000 MB - ] > ... I like it; much needed functionality. Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next v2 4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

2017-06-26 Thread David Ahern
On 6/26/17 7:45 AM, Matthias Schiffer wrote: > > Please read my patch again, I *am* changing br_port_slave_changelink to > match the new signature (this is the net/bridge/br_netlink.c change > appearing in the diffstat). > Hmmm right you are. sorry for the confusion.

Re: [PATCH net-next v2 4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

2017-06-26 Thread David Ahern
On 6/26/17 2:43 AM, Matthias Schiffer wrote: > On 06/26/2017 06:08 AM, David Ahern wrote: >> On 6/25/17 10:04 PM, David Ahern wrote: >>> On 6/25/17 3:56 PM, Matthias Schiffer wrote: >>>> Add support for extended error reporting. >>>> >>>>

Re: [PATCH net-next v2 5/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate

2017-06-25 Thread David Ahern
On 6/25/17 10:05 PM, David Ahern wrote: > On 6/25/17 3:56 PM, Matthias Schiffer wrote: >> Add support for extended error reporting. >> >> Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> >> --- > > Acked-by: David Ahern <dsah...@gma

Re: [PATCH net-next v2 4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

2017-06-25 Thread David Ahern
On 6/25/17 10:04 PM, David Ahern wrote: > On 6/25/17 3:56 PM, Matthias Schiffer wrote: >> Add support for extended error reporting. >> >> Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> >> --- > > > Acked-by: David Ahern <dsa

Re: [PATCH net-next v2 5/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate

2017-06-25 Thread David Ahern
On 6/25/17 3:56 PM, Matthias Schiffer wrote: > Add support for extended error reporting. > > Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> > --- Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next v2 4/5] net: add netlink_ext_ack argument to rtnl_link_ops.slave_changelink

2017-06-25 Thread David Ahern
On 6/25/17 3:56 PM, Matthias Schiffer wrote: > Add support for extended error reporting. > > Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> > --- Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next v2 3/5] net: add netlink_ext_ack argument to rtnl_link_ops.validate

2017-06-25 Thread David Ahern
On 6/25/17 3:56 PM, Matthias Schiffer wrote: > Add support for extended error reporting. > > Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> > --- Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next v2 2/5] net: add netlink_ext_ack argument to rtnl_link_ops.changelink

2017-06-25 Thread David Ahern
On 6/25/17 3:56 PM, Matthias Schiffer wrote: > Add support for extended error reporting. > > Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next v2 1/5] net: add netlink_ext_ack argument to rtnl_link_ops.newlink

2017-06-25 Thread David Ahern
On 6/25/17 3:55 PM, Matthias Schiffer wrote: > Add support for extended error reporting. > > Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net> > --- Acked-by: David Ahern <dsah...@gmail.com>

Re: [PATCH net-next] net: add netlink_ext_ack support to rtnl_link_ops

2017-06-24 Thread David Ahern
On 6/24/17 5:35 AM, Matthias Schiffer wrote: > The following functions are extended with a netlink_ext_ack argument to > allow extended error reporting: > > * validate > * newlink > * changelink > * slave_validate > * slave_changelink I would prefer separate patches for validate, slave_validate,

Re: net/ipv6: use-after-free in ip6_dst_ifdown

2017-05-31 Thread David Ahern
On 5/31/17 4:49 PM, Cong Wang wrote: == BUG: KASAN: use-after-free in ip6_dst_ifdown+0x3cc/0x400 net/ipv6/route.c:422 Read of size 8 at addr 88006afa4ad8 by task syz-executor6/23554 >>> >>> >>> This one is

Re: [PATCH v1] samples/bpf: Add a .gitignore for binaries

2017-05-18 Thread David Ahern
On 5/17/17 1:18 AM, Alexander Alemayhu wrote: > I have looked into this but found it to be not easy and all attempts to > change the Makefile has resulted in obscure errors :/ > > Getting clang to output in a different directory was easy[0], but I guess > this is not the right approach either.

Re: [PATCH v1] samples/bpf: Add a .gitignore for binaries

2017-05-16 Thread David Ahern
On 5/13/17 3:30 AM, Mickaël Salaün wrote: > > On 13/02/2017 02:43, David Ahern wrote: >> On 2/12/17 2:23 PM, Mickaël Salaün wrote: >>> diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore >>> new file mode 100644 >>> index ..a7562a5ef4c2

Re: [PATCH] net: ipv6: Truncate single route when it doesn't fit into dump buffer.

2017-05-12 Thread David Ahern
On 5/12/17 8:24 AM, David Miller wrote: > From: Jan Moskyto Matejka > Date: Fri, 12 May 2017 13:15:10 +0200 > >> -int rt6_dump_route(struct rt6_info *rt, void *p_arg); >> +int rt6_dump_route(struct rt6_info *rt, void *p_arg, int truncate); > > Please use "bool" and "true"/"false"

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 9:55 PM, Cong Wang wrote: > Why not add a printk and play with my patch to see the difference? I have other things to do. If you believe your patch fixes the problem, send it and let Andrey verify.

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 5:35 PM, Cong Wang wrote: > Ah, we need: > > @@ -4024,7 +4027,7 @@ static struct pernet_operations ip6_route_net_late_ops > = { > > static struct notifier_block ip6_route_dev_notifier = { > .notifier_call = ip6_route_dev_notify, > - .priority = 0, > + .priority =

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 4:02 PM, Cong Wang wrote: > On Wed, May 3, 2017 at 11:22 AM, David Ahern <dsah...@gmail.com> wrote: >> On 5/3/17 11:02 AM, Cong Wang wrote: >>> A quick glance shows we need to simply check local->rt6i_idev >>> since we do the same check for sprt right

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 11:02 AM, Cong Wang wrote: > A quick glance shows we need to simply check local->rt6i_idev > since we do the same check for sprt right above. As I recall, rt6i_idev is set for all routes except null_entry and it is not set on null_entry only because of initialization order. > > diff

Re: net/ipv6: use-after-free in __call_rcu/in6_dev_finish_destroy_rcu

2017-05-02 Thread David Ahern
On 5/2/17 10:58 AM, Andrey Konovalov wrote: > Do you have a patch that I could test? not yet. > > I also reported another issue recently, that might also be related to this > one: > https://groups.google.com/forum/#!topic/syzkaller/Rt0pgY4wfiw different problem. I can still trigger this one

Re: net/ipv6: use-after-free in __call_rcu/in6_dev_finish_destroy_rcu

2017-05-01 Thread David Ahern
On 4/26/17 9:15 AM, Andrey Konovalov wrote: > +David > > I've enabled CONFIG_DEBUG_OBJECTS_RCU_HEAD and this is what I get. > > Apparently the rcu warning is related to the fib6_del_route bug I've > been trying to reproduce: >

Re: perf report warnings on tracepoint events hidden by ui

2017-04-27 Thread David Ahern
On 4/27/17 8:49 PM, Steven Rostedt wrote: > On Thu, 27 Apr 2017 20:13:43 -0600 > David Ahern <dsah...@gmail.com> wrote: > >> On 4/27/17 7:41 PM, Steven Rostedt wrote: >>> On Thu, 27 Apr 2017 19:31:12 -0500 >>> David Carrillo-Cisneros <davi...@goog

Re: perf report warnings on tracepoint events hidden by ui

2017-04-27 Thread David Ahern
On 4/27/17 7:41 PM, Steven Rostedt wrote: > On Thu, 27 Apr 2017 19:31:12 -0500 > David Carrillo-Cisneros wrote: > >> When processing tracepoint events, perf report outputs warnings about >> field not founds. The warnings are usually hidden by perf report UI >> and appear when

Re: [PATCH] net: ipv6: check route protocol when deleting routes

2017-04-25 Thread David Ahern
On 4/24/17 3:48 AM, Lorenzo Colitti wrote: > For non-stable kernels, it seems that the proper fix would be: > > 1. Ensure that when an RA creates a route, it properly sets > rtm_protocol at time of route creation. > 2. When we dump routes to userspace, we don't overwrite the rtm_protocol. +1

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-25 Thread David Ahern
On 4/25/17 10:38 AM, Andrey Konovalov wrote: > I'll keep fuzzing in the meantime to make sure. > Maybe I'll be able to collect more reports or even another reproducer. start a new email thread for each stack trace. I'll write a debug patch for the trace you hit today.

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-25 Thread David Ahern
On 3/7/17 2:21 AM, Dmitry Vyukov wrote: > [ cut here ] > WARNING: CPU: 2 PID: 3990 at net/ipv6/ip6_fib.c:991 > fib6_add+0x2e12/0x3290 net/ipv6/ip6_fib.c:991 net/ipv6/ip6_fib.c:991 > Kernel panic - not syncing: panic_on_warn set ... > > CPU: 2 PID: 3990 Comm: kworker/2:4

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-25 Thread David Ahern
On 3/4/17 11:57 AM, Dmitry Vyukov wrote: > == > BUG: KASAN: slab-out-of-bounds in rt6_dump_route+0x293/0x2f0 > net/ipv6/route.c:3551 at addr 88007e523694 > Read of size 4 by task syz-executor3/24426 > CPU: 2 PID: 24426 Comm:

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-25 Thread David Ahern
ixed by: commit 557c44be917c322860665be3d28376afa84aa936 Author: David Ahern <d...@cumulusnetworks.com> Date: Wed Apr 19 14:19:43 2017 -0700 net: ipv6: RTF_PCPU should not be settable from userspace

Re: [PATCH 22/22] perf tools: Fix the code to strip command name

2017-04-24 Thread David Ahern
On 4/24/17 1:54 PM, Arnaldo Carvalho de Melo wrote: > From: Jiri Olsa > > Recent commit broke command name strip in perf_event__get_comm_ids > function. It replaced left to right search for '\n' with rtrim, which > actually does right to left search. It occasionally caught

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-21 Thread David Ahern
On 4/21/17 10:47 AM, Eric Dumazet wrote: > On Fri, 2017-04-21 at 08:27 -0600, David Ahern wrote: >> On 4/20/17 10:09 AM, Andrey Konovalov wrote: >>> On Thu, Apr 20, 2017 at 5:39 PM, Andrey Konovalov <andreyk...@google.com> >>> wrote: >>>> On

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-21 Thread David Ahern
On 4/20/17 10:09 AM, Andrey Konovalov wrote: > On Thu, Apr 20, 2017 at 5:39 PM, Andrey Konovalov <andreyk...@google.com> > wrote: >> On Thu, Apr 20, 2017 at 5:35 PM, David Ahern <d...@cumulusnetworks.com> >> wrote: >>> On 4/20/17 9:28 AM, Andrey Konovalo

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-20 Thread David Ahern
On 4/20/17 9:28 AM, Andrey Konovalov wrote: > This one seems to be much closer to what Dmitry reported intially. does not repro here; I ran in a loop and nothing. can you send output of "sysctl -a --pattern 'net.ipv6'"

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-19 Thread David Ahern
On 4/19/17 5:47 PM, Cong Wang wrote: > On Wed, Apr 19, 2017 at 9:12 AM, Andrey Konovalov > wrote: >> >> Anyway, I just finished simplifying the reproducer. Give this one a try. > > Thanks for providing such a minimal reproducer! > > The following patch could fix this

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-19 Thread David Ahern
On 4/19/17 10:12 AM, Andrey Konovalov wrote: > That's weird. I usually see this when I have CONFIG_USER_NS disabled. I bungled the movement of .config between servers. reproduced. will investigate.

  1   2   3   4   5   6   7   8   9   10   >