RE: bnx2x - odd behaviour

2019-04-24 Thread Sudarsana Reddy Kalluru
Hi Ian, Thanks for the info. BCM57711E is the older version of chip. Could you please recreate with elink-debugs enabled (modprobe bnx2x debug=0x4) and provide the complete logs and the register-dump. Thanks, Sudarsana > -Original Message- > From: Ian Kumlien > Sent: Wednesday, Apri

RE: [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo()

2019-04-24 Thread Parav Pandit
> -Original Message- > From: Dan Carpenter > Sent: Wednesday, April 24, 2019 9:08 AM > To: Parav Pandit ; netdev@vger.kernel.org > Cc: Leon Romanovsky ; Eli Cohen ; > Doug Ledford ; Jason Gunthorpe ; > linux-r...@vger.kernel.org; kernel-janit...@vger.kernel.org > Subject: Re: [PATCH] IB

Re: [PATCH net-next] net: phy: avoid unneeded MDIO reads in genphy_read_status

2019-04-24 Thread Heiner Kallweit
On 25.04.2019 00:41, Andrew Lunn wrote: > On Wed, Apr 24, 2019 at 09:49:30PM +0200, Heiner Kallweit wrote: >> Considering that in polling mode each link drop will be latched, >> settings can't have changed if link was up and is up. > > Hi Heiner > Hi Andrew, interesting questions. > What about

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Toshiaki Makita
On 2019/04/25 2:37, Michael S. Tsirkin wrote: > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: >> seeing an RCU warning testing xdp with virtio net. net-next as of commit >> b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping >> this rings a bell with someone else.

Re: 32-bit zext time complexity (Was Re: [PATCH bpf-next] selftests/bpf: two scale tests)

2019-04-24 Thread Alexei Starovoitov
On Thu, Apr 25, 2019 at 12:07:06AM +0100, Jiong Wang wrote: > > Alexei Starovoitov writes: > > > Add two tests to check that sequence of 1024 jumps is verifiable. > > > > Signed-off-by: Alexei Starovoitov > > --- > > tools/testing/selftests/bpf/test_verifier.c | 70 > > to

Your attached file was not delivered.

2019-04-24 Thread ciena_hosted
Your message was not delivered to the intended recipient as it contains potentially dangerous content. Executables, scripts, macros, etc. are blocked for security reasons. If you must send such a file, please share a location so the recipient can get it using a hyperlink instead.

Re: [bpf PATCH 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-24 Thread John Fastabend
On 4/24/19 8:07 PM, Jakub Kicinski wrote: > On Wed, 24 Apr 2019 12:21:03 -0700, John Fastabend wrote: >> It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE >> state via tcp_disconnect() without calling into close callback. This >> would allow a kTLS enabled socket to exist outsid

[PATCH net-next] nfp: implement PCI driver shutdown callback

2019-04-24 Thread Jakub Kicinski
From: Dirk van der Merwe Device may be shutdown without the hardware being reinitialized, in which case we want to ensure we cleanup properly. This is especially important for kexec with traffic flowing. The shutdown procedures resembles the remove procedures, so we can reuse those common tasks

Re: [bpf PATCH 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2019 12:21:03 -0700, John Fastabend wrote: > It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE > state via tcp_disconnect() without calling into close callback. This > would allow a kTLS enabled socket to exist outside of ESTABLISHED > state which is not supported

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Jason Wang
On 2019/4/25 上午1:40, David Ahern wrote: On 4/24/19 11:37 AM, Michael S. Tsirkin wrote: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9010938e2d71..ccc1bdd1bb1f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -495,8 +495,8 @@ static struct send_q

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Jason Wang
On 2019/4/25 上午1:37, Michael S. Tsirkin wrote: On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: seeing an RCU warning testing xdp with virtio net. net-next as of commit b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping this rings a bell with someone else. [

Re: [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo()

2019-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2019 17:08:20 +0300, Dan Carpenter wrote: > To me making "vf" a u32 throughout seems like a good idea but it's an > extensive patch and I'm not really able to test it at all. But maybe > there is a better place to check for negatives. Or maybe we are already > checking for negative

[PATCH net-next] tipc: remove rcu_read_unlock() left in tipc_udp_recv()

2019-04-24 Thread Eric Dumazet
I forgot to remove one rcu_read_unlock() before a return statement. Joy of mixing goto and return styles in a function :) Fixes: 4109a2c3b91e ("tipc: tipc_udp_recv() cleanup vs rcu verbs") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot --- net/tipc/udp_media.c | 1 - 1 file changed

[net-next:master 292/294] include/linux/rcupdate.h:647:9: sparse: context imbalance in 'tipc_udp_recv' - unexpected unlock

2019-04-24 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: c049d56eb219661c9ae48d596c3e633973f89d1f commit: 4109a2c3b91e5f38e401fc4ea56848e65e429785 [292/294] tipc: tipc_udp_recv() cleanup vs rcu verbs reproduce: # apt-get install sparse git checkout

Re: [PATCH bpf-next 5/6] bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps

2019-04-24 Thread Martin Lau
On Wed, Apr 24, 2019 at 03:39:58PM -0700, Martin KaFai Lau wrote: > This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps. > The src file is rather long, so it is put into another dir map_tests/ > and compile like the current prog_tests/ does. Other existing > tests in test_maps can also be re

Re: [PATCH v2] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-04-24 Thread Rosen Penev
On Wed, Apr 24, 2019 at 11:52 AM David Miller wrote: > > From: Rosen Penev > Date: Tue, 23 Apr 2019 13:46:03 -0700 > > > It allows some of the code to be simplified. > > > > Tested on Turris Omnia. > > > > Signed-off-by: Rosen Penev > > This is just a cleanup/simplification, so applied to net-ne

32-bit zext time complexity (Was Re: [PATCH bpf-next] selftests/bpf: two scale tests)

2019-04-24 Thread Jiong Wang
Alexei Starovoitov writes: > Add two tests to check that sequence of 1024 jumps is verifiable. > > Signed-off-by: Alexei Starovoitov > --- > tools/testing/selftests/bpf/test_verifier.c | 70 > tools/testing/selftests/bpf/verifier/scale.c | 18 + I am rebasing 32-bit o

Re: [PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-24 Thread Florian Fainelli
On 4/24/19 3:33 PM, Andrew Lunn wrote: > marvell_get_sset_count() returns how many statistics counters there > are. If the PHY supports fibre, there are 3, otherwise two. > > marvell_get_strings() does not make this distinction, and always > returns 3 strings. This then often results in writing pa

[PATCH net] net: phy: marvell: Fix buffer overrun with stats counters

2019-04-24 Thread Andrew Lunn
marvell_get_sset_count() returns how many statistics counters there are. If the PHY supports fibre, there are 3, otherwise two. marvell_get_strings() does not make this distinction, and always returns 3 strings. This then often results in writing passed the end of the buffer for the strings. Fixe

Re: [PATCH net-next] net: phy: avoid unneeded MDIO reads in genphy_read_status

2019-04-24 Thread Andrew Lunn
On Wed, Apr 24, 2019 at 09:49:30PM +0200, Heiner Kallweit wrote: > Considering that in polling mode each link drop will be latched, > settings can't have changed if link was up and is up. Hi Heiner What about the case of the PHY performing a downshift? Could it be up, then finds a pair fails, so

Re: [bpf PATCH 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2019 12:21:03 -0700, John Fastabend wrote: > It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE > state via tcp_disconnect() without calling into close callback. This > would allow a kTLS enabled socket to exist outside of ESTABLISHED > state which is not supported

[PATCH bpf-next 6/6] bpf: Add ene-to-end test for bpf_sk_storage_* helpers

2019-04-24 Thread Martin KaFai Lau
This patch rides on an existing BPF_PROG_TYPE_CGROUP_SKB test (test_sock_fields.c) to do a TCP end-to-end test on the new bpf_sk_storage_* helpers. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/bpf_helpers.h | 5 + .../bpf/progs/test_sock_fields_kern.c | 49 +

[PATCH bpf-next 1/6] bpf: Introduce bpf sk local storage

2019-04-24 Thread Martin KaFai Lau
After allowing a bpf prog to - directly read the skb->sk ptr - get the fullsock bpf_sock by "bpf_sk_fullsock()" - get the bpf_tcp_sock by "bpf_tcp_sock()" - get the listener sock by "bpf_get_listener_sock()" - avoid duplicating the fields of "(bpf_)sock" and "(bpf_)tcp_sock" into different bpf ru

[PATCH bpf-next 3/6] bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing

2019-04-24 Thread Martin KaFai Lau
This patch supports probing for the new BPF_MAP_TYPE_SK_STORAGE. BPF_MAP_TYPE_SK_STORAGE enforces BTF usage, so the new probe requires to create and load a BTF also. Signed-off-by: Martin KaFai Lau --- tools/bpf/bpftool/map.c | 1 + tools/lib/bpf/libbpf_probes.c | 74 +

[PATCH bpf-next 5/6] bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps

2019-04-24 Thread Martin KaFai Lau
This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps. The src file is rather long, so it is put into another dir map_tests/ and compile like the current prog_tests/ does. Other existing tests in test_maps can also be re-factored into map_tests/ in the future. Signed-off-by: Martin KaFai Lau

[PATCH bpf-next 0/6] BPF sk local storage

2019-04-24 Thread Martin KaFai Lau
This series introduces the BPF sk local storage. The details is in the patch 1 commit message. Martin KaFai Lau (6): bpf: Introduce bpf sk local storage bpf: Sync bpf.h to tools bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing bpf: Add verifier tests for the bpf_sk_storage bpf: A

[PATCH bpf-next 2/6] bpf: Sync bpf.h to tools

2019-04-24 Thread Martin KaFai Lau
This patch sync the bpf.h to tools/. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 704bb69514a2..be08e

[PATCH bpf-next 4/6] bpf: Add verifier tests for the bpf_sk_storage

2019-04-24 Thread Martin KaFai Lau
This patch adds verifier tests for the bpf_sk_storage: 1. ARG_PTR_TO_MAP_VALUE_OR_NULL 2. Map and helper compatibility (e.g. disallow bpf_map_loookup_elem) It also takes this chance to remove the unused struct btf_raw_data. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/test_ve

[bpf-next PATCH] bpf: sockmap, test tool support to skip cgroup arg

2019-04-24 Thread John Fastabend
Its handy to not have to setup a cgroup environment when running test_sockmap with user specified options. This patch setups a cgroup environment, similar to how it is done with the auto test suite, when the user does not provide a cgroup arg. Signed-off-by: John Fastabend --- tools/testing/self

Re: [PATCH 1/4] iprule: avoid printing extra space after gateway for nat action

2019-04-24 Thread Stephen Hemminger
On Tue, 23 Apr 2019 09:16:12 +0200 Thomas Haller wrote: > For all other actions we avoid the trailing space, so do it here > as well. > > Signed-off-by: Thomas Haller Looks good, applied all 4 patches.

RE: [PATCH] IB/mlx5: add checking for "vf" from do_setvfinfo()

2019-04-24 Thread Parav Pandit
> -Original Message- > From: Jason Gunthorpe > Sent: Wednesday, April 24, 2019 9:24 AM > To: Dan Carpenter > Cc: Parav Pandit ; netdev@vger.kernel.org; Leon > Romanovsky ; Eli Cohen ; Doug > Ledford ; linux-r...@vger.kernel.org; kernel- > janit...@vger.kernel.org > Subject: Re: [PATCH]

[PATCH iproute2] tc/ematch: fix deprecated yacc warning

2019-04-24 Thread Stephen Hemminger
Newer versions of Bison deprecated some directives. YACC emp_ematch.yacc.c emp_ematch.y:11.1-14: warning: deprecated directive, use ‘%define parse.error verbose’ [-Wdeprecated] %error-verbose ^~ emp_ematch.y:12.1-22: warning: deprecated directive, use ‘%define api.prefix {e

Re: [PATCH bpf-next v4 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2019 14:31:41 -0700, Stanislav Fomichev wrote: > Right now there is no way to query whether BPF flow_dissector program > is attached to a network namespace or not. In previous commit, I added > support for querying that info, show it when doing `bpftool net`: Reviewed-by: Jakub Kici

Re: [PATCH net] ipv4: add sanity checks in ipv4_link_failure()

2019-04-24 Thread David Miller
From: Eric Dumazet Date: Wed, 24 Apr 2019 08:04:05 -0700 > Before calling __ip_options_compile(), we need to ensure the network > header is a an IPv4 one, and that it is already pulled in skb->head. > > RAW sockets going through a tunnel can end up calling ipv4_link_failure() > with total garbag

Re: [PATCH net] net/rose: fix unbound loop in rose_loopback_timer()

2019-04-24 Thread David Miller
From: Eric Dumazet Date: Wed, 24 Apr 2019 05:35:00 -0700 > This patch adds a limit on the number of skbs that fuzzers can queue > into loopback_queue. 1000 packets for rose loopback seems more than enough. > > Then, since we now have multiple cpus in most linux hosts, > we also need to limit the

Re: [PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-24 Thread Christoph Biedl
Arnd Bergmann wrote... > If anyone is still using isdn4linux and CAPI with modern kernels, please > speak up now. Yeah, although I probably don't have much in defense. I am still using it, mostly for isdnlog since I never got mISDN to work. I even wrote the missing sysfs support for i4l some seve

[PATCH bpf-next v4 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-24 Thread Stanislav Fomichev
target_fd is target namespace. If there is a flow dissector BPF program attached to that namespace, its (single) id is returned. v4: * add missing put_net (Jann Horn) v3: * add missing inline to skb_flow_dissector_prog_query static def (kbuild test robot ) v2: * don't sleep in rcu critical sec

[PATCH bpf-next v4 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Stanislav Fomichev
Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \

Re: [PATCH v4 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-24 Thread David Miller
From: Eric Dumazet Date: Wed, 24 Apr 2019 09:44:11 -0700 > After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), > rxrpc_input_packet() is directly called from lockless UDP receive > path, under rcu_read_lock() protection. > > It must therefore use RCU rules : > > - udp_sk->sk_user_d

Re: [PATCH bpf-next v2 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-24 Thread Stanislav Fomichev
On 04/24, Jann Horn wrote: > On Wed, Apr 24, 2019 at 6:09 PM Stanislav Fomichev wrote: > > target_fd is target namespace. If there is a flow dissector BPF program > > attached to that namespace, its (single) id is returned. > > > > v2: > > * don't sleep in rcu critical section (Jakub Kicinski) > >

Re: [PATCH bpf-next v2 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-24 Thread Jann Horn
On Wed, Apr 24, 2019 at 6:09 PM Stanislav Fomichev wrote: > target_fd is target namespace. If there is a flow dissector BPF program > attached to that namespace, its (single) id is returned. > > v2: > * don't sleep in rcu critical section (Jakub Kicinski) > * check input prog_cnt (exit early) > >

Re: [PATCH iproute2-next] tc: add support for plug qdisc

2019-04-24 Thread Stephen Hemminger
On Wed, 24 Apr 2019 18:29:39 +0200 Paolo Abeni wrote: > +static int plug_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) > +{ > + /* dummy implementation as sch_plug does not implement a dump op */ > + return 0; > +} > + All qdisc must dump their state in same form as the p

Re: [PATCH iproute2-next] tc: add support for plug qdisc

2019-04-24 Thread Stephen Hemminger
On Wed, 24 Apr 2019 18:29:39 +0200 Paolo Abeni wrote: > @@ -0,0 +1,81 @@ > +/* > + * q_log.c plug scheduler > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as

RE: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-24 Thread Elmahrad, Abdelghani
Thanks David for the quick feedback. As Haiqing mentioned, we all agree this is not an ideal solution but that code/comment is still present in latest kernel and nothing else has been proposed/discussed upstream despites the fact the author of that code himself questions his approach in the disp

Re: [PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules

2019-04-24 Thread Vivien Didelot
Hi Andrew, On Tue, 23 Apr 2019 02:22:43 +0200, Andrew Lunn wrote: > istorically, DSA tag drivers have been compiled into the kernel as > part of the DSA core. With the growing number of tag drivers, it makes > sense to allow this driver code to be compiled as a module, and loaded > on demand. >

[PATCH] genetlink: use idr_alloc_cyclic for family->id assignment

2019-04-24 Thread Marcel Holtmann
When allocating the next family->id it makes more sense to use idr_alloc_cyclic to avoid re-using a previously used family->id as much as possible. Signed-off-by: Marcel Holtmann --- net/netlink/genetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netlink/genet

[PATCH net,v2] vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach

2019-04-24 Thread Stephen Suryaputra
When there is no route to an IPv6 dest addr, skb_dst(skb) points to loopback dev in the case of that the IP6CB(skb)->iif is enslaved to a vrf. This causes Ip6InNoRoutes to be incremented on the loopback dev. This also causes the lookup to fail on icmpv6_send() and the dest unreachable to not sent a

Re: [PATCH v3] ethtool: Add bash-completion script

2019-04-24 Thread John W. Linville
On Fri, Apr 19, 2019 at 06:16:21PM -0600, Kevin Locke wrote: > To aid users constructing a valid ethtool invocation, create a > [bash-completion] script to provide [programmable completion] of ethtool > arguments. It supports all current command options. > > The script is named shell-completion/b

[PATCH bpf v3 2/2] selftests/bpf: test cases for pkt/null checks in subprogs

2019-04-24 Thread Paul Chaignon
The first test case, for pointer null checks, is equivalent to the following pseudo-code. It checks that the verifier does not complain on line 6 and recognizes that ptr isn't null. 1: ptr = bpf_map_lookup_elem(map, &key); 2: ret = subprog(ptr) { 3: return ptr != NULL; 4: } 5: if (ret) 6: val

[PATCH bpf v3 1/2] bpf: mark registers in all frames after pkt/null checks

2019-04-24 Thread Paul Chaignon
In case of a null check on a pointer inside a subprog, we should mark all registers with this pointer as either safe or unknown, in both the current and previous frames. Currently, only spilled registers and registers in the current frame are marked. Packet bound checks in subprogs have the same

[PATCH bpf v3 0/2] bpf: mark registers in all frames after pkt/null checks

2019-04-24 Thread Paul Chaignon
In case of a null check on a pointer inside a subprog, we should mark all registers with this pointer as either safe or unknown, in both the current and previous frames. Currently, only spilled registers and registers in the current frame are marked. Packet bound checks in subprogs have the same

[PATCH net-next] net: phy: avoid unneeded MDIO reads in genphy_read_status

2019-04-24 Thread Heiner Kallweit
Considering that in polling mode each link drop will be latched, settings can't have changed if link was up and is up. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/n

[PATCH net] vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach

2019-04-24 Thread Stephen Suryaputra
When there is no route to an IPv6 dest addr, skb_dst(skb) points to loopback dev in the case of that the IP6CB(skb)->iif is enslaved to a vrf. This causes Ip6InNoRoutes to be incremented on the loopback dev. This also causes the lookup to fail on icmpv6_send() and the dest unreachable to not sent a

[PATCH v8 07/15] x86/split_lock: Enumerate split lock detection by MSR_IA32_CORE_CAPABILITY

2019-04-24 Thread Fenghua Yu
Bits in MSR_IA32_CORE_CAPABILITY enumerate a few features that are not enumerated through CPUID. Currently bit 5 is defined to enumerate feature of split lock detection. All other bits are reserved now. When bit 5 is 1, the feature is supported and feature bit X86_FEATURE_SPLIT_LOCK_DETECT is set.

[PATCH net-next] net: phy: improve genphy_soft_reset

2019-04-24 Thread Heiner Kallweit
PHY's behave differently when being reset. Some reset registers to defaults, some don't. Some trigger an autoneg restart, some don't. So let's also set the autoneg restart bit when resetting. Then PHY behavior should be more consistent. Clearing BMCR_ISOLATE serves the same purpose and is borrowed

Re: [PATCH rdma-next 0/8] User space steering

2019-04-24 Thread Saeed Mahameed
On Wed, 2019-04-24 at 16:03 -0300, Jason Gunthorpe wrote: > On Wed, Apr 24, 2019 at 04:40:54PM +, Saeed Mahameed wrote: > > On Wed, 2019-04-24 at 10:07 -0300, Jason Gunthorpe wrote: > > > On Sun, Mar 31, 2019 at 07:44:42PM +0300, Leon Romanovsky wrote: > > > > From: Leon Romanovsky > > > > >

[PATCH v8 15/15] x86/split_lock: Add a sysfs interface to enable/disable split lock detection during run time

2019-04-24 Thread Fenghua Yu
To workaround or debug a split lock issue, the administrator may need to disable or enable split lock detection during run time without rebooting the system. The interface /sys/device/system/cpu/split_lock_detect is added to allow the administrator to disable or enable split lock detection and sho

Re: [PATCH net] packet: validate address length if non-zero

2019-04-24 Thread Willem de Bruijn
On Wed, Apr 24, 2019 at 3:14 PM Willem de Bruijn wrote: > > On Tue, Apr 23, 2019 at 2:21 PM Willem de Bruijn > wrote: > > > > On Tue, Apr 23, 2019 at 1:21 PM Willem de Bruijn > > wrote: > > > > > > On Tue, Apr 23, 2019 at 1:04 PM Willem de Bruijn > > > wrote: > > > > > > > > On Tue, Apr 23, 201

Re: [PATCH rdma-next 0/6] BAR mappings fixes in RDMA

2019-04-24 Thread Jason Gunthorpe
On Tue, Apr 16, 2019 at 02:07:24PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > >From Jason, > > Upon review it turns out there are some long standing problems in BAR > mapping area: > * BAR pages are being allowed to be executable. > * BAR pages intended for read-only can be swit

[bpf PATCH 3/3] bpf: sockmap fix msg->sg.size account on ingress skb

2019-04-24 Thread John Fastabend
When converting a skb to msg->sg we forget to set the size after the latest ktls/tls code conversion. This patch can be reached by doing a redir into ingress path from BPF skb sock recv hook. Then trying to read the size fails. Fix this by setting the size. Fixes: 604326b41a6fb ("bpf, sockmap: co

[bpf PATCH 2/3] bpf: sockmap remove duplicate queue free

2019-04-24 Thread John Fastabend
In tcp bpf remove we free the cork list and purge the ingress msg list. However we do this before the ref count reaches zero so it could be possible some other access is in progress. In this case (tcp close and/or tcp_unhash) we happen to also hold the sock lock so no path exists but lets fix it ot

[bpf PATCH 0/3] sockmap/ktls fixes

2019-04-24 Thread John Fastabend
Series of fixes for sockmap and ktls, see patches for descriptions. --- John Fastabend (3): bpf: tls, implement unhash to avoid transition out of ESTABLISHED bpf: sockmap remove duplicate queue free bpf: sockmap fix msg->sg.size account on ingress skb include/net/tls.h | 1

[bpf PATCH 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-24 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE state via tcp_disconnect() without calling into close callback. This would allow a kTLS enabled socket to exist outside of ESTABLISHED state which is not supported. Solve this the same way we solved the sock{map|hash} case by ad

Re: [PATCH net] packet: validate address length if non-zero

2019-04-24 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 2:21 PM Willem de Bruijn wrote: > > On Tue, Apr 23, 2019 at 1:21 PM Willem de Bruijn > wrote: > > > > On Tue, Apr 23, 2019 at 1:04 PM Willem de Bruijn > > wrote: > > > > > > On Tue, Apr 23, 2019 at 11:52 AM David Laight > > > wrote: > > > > > > > > From: Willem de Bruij

Re: [PATCH 1/1] net: rds: exchange of 8K and 1M pool

2019-04-24 Thread David Miller
From: Zhu Yanjun Date: Wed, 24 Apr 2019 02:56:42 -0400 > Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), > when the dirty_count is greater than 9/10 of max_items of 8K pool, > 1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move > FMR code to its o

[PATCH bpf-next v4 4/5] tools: sync bpf.h

2019-04-24 Thread Matt Mullins
This adds BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, and fixes up the error: enumeration value ‘BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE’ not handled in switch [-Werror=switch-enum] build errors it would otherwise cause in libbpf. Signed-off-by: Matt Mullins --- tools/include/uapi/linux/bpf.

[PATCH net] packet: validate msg_namelen in send directly

2019-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Packet sockets in datagram mode take a link layer destination address in sockaddr_ll.sll_addr. For some device types, address length exceeds this field size, extending beyond the struct. This addr argument is then passed to dev_hard_header without length and assumed to be

Re: [PATCH net] l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()

2019-04-24 Thread Guillaume Nault
On Wed, Apr 24, 2019 at 11:29:25AM -0700, Eric Dumazet wrote: > On Wed, Apr 24, 2019 at 11:21 AM Guillaume Nault wrote: > > > > > And then, we'd need to make sure that ->sk_user_data is in sync with > > the encap_rcv() callback (or whatever actually uses the data pointed > > to). Otherwise a modu

Re: [PATCH rdma-next 0/8] User space steering

2019-04-24 Thread Jason Gunthorpe
On Wed, Apr 24, 2019 at 04:40:54PM +, Saeed Mahameed wrote: > On Wed, 2019-04-24 at 10:07 -0300, Jason Gunthorpe wrote: > > On Sun, Mar 31, 2019 at 07:44:42PM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > > From Ariel, > > > > > > This series of patches adds user spac

Re: [PATCH bpf-next v3 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Quentin Monnet
2019-04-24 11:52 UTC-0700 ~ Stanislav Fomichev Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \

Re: [PATCH bpf-next 2/2] bpftool/docs: add btf sub-command documentation

2019-04-24 Thread Andrii Nakryiko
On Wed, Apr 24, 2019 at 10:21 AM Yonghong Song wrote: > > > > On 4/23/19 10:22 PM, andrii.nakry...@gmail.com wrote: > > From: Andrii Nakryiko > > > > Document usage and sample output format for `btf dump` sub-command. > > When applying the patch, I see a few trailing spaces. > > === > p2.txt:113:

Re: [PATCH net-next v2] net: sched: flower: refactor reoffload for concurrent access

2019-04-24 Thread David Miller
From: Vlad Buslov Date: Wed, 24 Apr 2019 09:53:31 +0300 > Recent changes that introduced unlocked flower did not properly account for > case when reoffload is initiated concurrently with filter updates. To fix > the issue, extend flower with 'hw_filters' list that is used to store > filters that

[PATCH bpf-next v3 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Stanislav Fomichev
Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \

[PATCH bpf-next v3 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-24 Thread Stanislav Fomichev
target_fd is target namespace. If there is a flow dissector BPF program attached to that namespace, its (single) id is returned. v3: * add missing inline to skb_flow_dissector_prog_query static def (kbuild test robot ) v2: * don't sleep in rcu critical section (Jakub Kicinski) * check input pro

Re: [PATCH v2] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-04-24 Thread David Miller
From: Rosen Penev Date: Tue, 23 Apr 2019 13:46:03 -0700 > It allows some of the code to be simplified. > > Tested on Turris Omnia. > > Signed-off-by: Rosen Penev This is just a cleanup/simplification, so applied to net-next. Please properly annotate your Subject lines in the future to indica

Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-24 Thread kbuild test robot
Hi Stanislav, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Stanislav-Fomichev/bpf-support-BPF_PROG_QUERY-for-BPF_FLOW_DISSECTOR-attach_type/20190424-235216 base: https://git.kernel.org/pub/scm

Re: [PATCH net-next] tipc: tipc_udp_recv() cleanup vs rcu verbs

2019-04-24 Thread David Miller
From: Eric Dumazet Date: Tue, 23 Apr 2019 09:24:46 -0700 > First thing tipc_udp_recv() does is to use rcu_dereference_sk_user_data(), > and this is really hinting we already own rcu_read_lock() from the caller > (UDP stack). > > No need to add another rcu_read_lock()/rcu_read_unlock() pair. > >

Re: [PATCH net-next v2] net: sched: flower: refactor reoffload for concurrent access

2019-04-24 Thread Saeed Mahameed
On Wed, 2019-04-24 at 09:53 +0300, Vlad Buslov wrote: > Recent changes that introduced unlocked flower did not properly > account for > case when reoffload is initiated concurrently with filter updates. To > fix > the issue, extend flower with 'hw_filters' list that is used to store > filters that

Re: [PATCH bpf-next 1/2] bpftool: add ability to dump BTF types

2019-04-24 Thread Yonghong Song
On 4/24/19 11:16 AM, Andrii Nakryiko wrote: > On Wed, Apr 24, 2019 at 10:17 AM Yonghong Song wrote: >> >> >> >> On 4/23/19 10:21 PM, andrii.nakry...@gmail.com wrote: >>> From: Andrii Nakryiko >>> >>> Add new `btf dump` sub-command to bpftool. It allows to dump >>> human-readable low-level BTF t

Re: [PATCH net] l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()

2019-04-24 Thread Eric Dumazet
On Wed, Apr 24, 2019 at 11:21 AM Guillaume Nault wrote: > It seems that callers of rcu_assign_sk_user_data() can indeed sleep. > > But I think we have more problems. Not all code paths treat > ->sk_user_data as RCU pointers (IIUC that's why we created the > __sk_user_data() macro, instead of just

Re: [PATCH net] l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()

2019-04-24 Thread Guillaume Nault
On Wed, Apr 24, 2019 at 04:33:47AM -0700, Eric Dumazet wrote: > On Wed, Apr 24, 2019 at 2:58 AM Guillaume Nault wrote: > > > > On Tue, Apr 23, 2019 at 09:43:26AM -0700, Eric Dumazet wrote: > > > Canonical way to fetch sk_user_data from an encap_rcv() handler called > > > from UDP stack in rcu prot

Re: [PATCH bpf-next 1/2] bpftool: add ability to dump BTF types

2019-04-24 Thread Andrii Nakryiko
On Wed, Apr 24, 2019 at 10:17 AM Yonghong Song wrote: > > > > On 4/23/19 10:21 PM, andrii.nakry...@gmail.com wrote: > > From: Andrii Nakryiko > > > > Add new `btf dump` sub-command to bpftool. It allows to dump > > human-readable low-level BTF types representation of BTF types. BTF can > > be ret

Re: [PATCH bpf-next 1/2] bpftool: add ability to dump BTF types

2019-04-24 Thread Andrii Nakryiko
On Wed, Apr 24, 2019 at 10:12 AM Yonghong Song wrote: > > > > On 4/23/19 10:21 PM, andrii.nakry...@gmail.com wrote: > > From: Andrii Nakryiko > > > > Add new `btf dump` sub-command to bpftool. It allows to dump > > human-readable low-level BTF types representation of BTF types. BTF can > > be ret

Re: [PATCH bpf-next 1/2] bpftool: add ability to dump BTF types

2019-04-24 Thread Yonghong Song
On 4/23/19 10:21 PM, andrii.nakry...@gmail.com wrote: > From: Andrii Nakryiko > > Add new `btf dump` sub-command to bpftool. It allows to dump > human-readable low-level BTF types representation of BTF types. BTF can > be retrieved from few different sources: >- from BTF object by ID; >

[PATCH net] qmi_wwan: new Wistron, ZTE and D-Link devices

2019-04-24 Thread Bjørn Mork
Adding device entries found in vendor modified versions of this driver. Function maps for some of the devices follow: WNC D16Q1, D16Q5, D18Q1 LTE CAT3 module (1435:0918) MI_00 Qualcomm HS-USB Diagnostics MI_01 Android Debug interface MI_02 Qualcomm HS-USB Modem MI_03 Qualcomm Wireless HS-USB Eth

virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread David Ahern
seeing an RCU warning testing xdp with virtio net. net-next as of commit b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping this rings a bell with someone else. [ 121.990304] = [ 121.991488] WARNING: suspicious RCU usage [ 121.992392] 5.1.0-rc5+

Re: [PATCH bpf v2 1/2] bpf: mark registers as safe or unknown in all frames

2019-04-24 Thread Paul Chaignon
On Tue, Apr 23, 2019 01:47AM, Daniel Borkmann wrote: > On 04/22/2019 08:34 PM, Paul Chaignon wrote: > > In case of a null check on a pointer inside a subprog, we should mark all > > registers with this pointer as either safe or unknown, in both the current > > and previous frames. Currently, only

Re: [PATCH bpf-next 1/2] bpftool: add ability to dump BTF types

2019-04-24 Thread Yonghong Song
On 4/23/19 10:21 PM, andrii.nakry...@gmail.com wrote: > From: Andrii Nakryiko > > Add new `btf dump` sub-command to bpftool. It allows to dump > human-readable low-level BTF types representation of BTF types. BTF can > be retrieved from few different sources: >- from BTF object by ID; >

[PATCH net-next] ipv6: Initialize fib6_result in bpf_ipv6_fib_lookup

2019-04-24 Thread David Ahern
From: David Ahern fib6_result is not initialized in bpf_ipv6_fib_lookup and potentially passses garbage to the fib lookup which triggers a KASAN warning: [ 262.055450] == [ 262.057640] BUG: KASAN: user-memory-access in fib6_rule_

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread David Ahern
On 4/24/19 11:37 AM, Michael S. Tsirkin wrote: > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 9010938e2d71..ccc1bdd1bb1f 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -495,8 +495,8 @@ static struct send_queue *virtnet_xdp_sq(struct > virt

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Michael S. Tsirkin
On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > seeing an RCU warning testing xdp with virtio net. net-next as of commit > b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping > this rings a bell with someone else. > > > [ 121.990304]

Re: [PATCH bpf-next 2/2] bpftool/docs: add btf sub-command documentation

2019-04-24 Thread Yonghong Song
On 4/23/19 10:22 PM, andrii.nakry...@gmail.com wrote: > From: Andrii Nakryiko > > Document usage and sample output format for `btf dump` sub-command. When applying the patch, I see a few trailing spaces. === p2.txt:113: trailing whitespace. p2.txt:118: trailing whitespace. p2.txt:120: trail

Re: [PATCH 1/1] net: rds: exchange of 8K and 1M pool

2019-04-24 Thread Santosh Shilimkar
On 4/23/2019 11:56 PM, Zhu Yanjun wrote: Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), when the dirty_count is greater than 9/10 of max_items of 8K pool, 1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), the above i

[PATCH v4 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-24 Thread Eric Dumazet
After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), rxrpc_input_packet() is directly called from lockless UDP receive path, under rcu_read_lock() protection. It must therefore use RCU rules : - udp_sk->sk_user_data can be cleared at any point in this function. rcu_dereference_sk_us

Re: [PATCH rdma-next 0/8] User space steering

2019-04-24 Thread Saeed Mahameed
On Wed, 2019-04-24 at 10:07 -0300, Jason Gunthorpe wrote: > On Sun, Mar 31, 2019 at 07:44:42PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > > From Ariel, > > > > This series of patches adds user space managed steering > > infrastructure > > to the mlx5_ib driver. > > > > User

Re: [PATCH v3 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-24 Thread Eric Dumazet
On 04/24/2019 01:27 AM, David Howells wrote: > > Acked-by: David Howells > A v4 is coming, since @local could be NULL in rxrpc_lookup_local() as reported by kbuild test robot and Julia Lawall diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 15cf42d5b53a56d8d19cab

Re: [PATCH rdma-next 4/8] IB/mlx5: Add steering SW ICM device memory type

2019-04-24 Thread Jason Gunthorpe
On Wed, Apr 24, 2019 at 07:27:36PM +0300, Leon Romanovsky wrote: > On Wed, Apr 24, 2019 at 12:53:13PM -0300, Jason Gunthorpe wrote: > > On Wed, Apr 24, 2019 at 06:49:37PM +0300, Leon Romanovsky wrote: > > > On Wed, Apr 24, 2019 at 10:47:03AM -0300, Jason Gunthorpe wrote: > > > > On Wed, Apr 24, 201

Re: [PATCH v4 bpf-next 15/15] nfp: bpf: eliminate zero extension code-gen

2019-04-24 Thread kbuild test robot
Hi Jiong, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jiong-Wang/bpf-eliminate-zero-extensions-for-sub-register-writes/20190416-191711 base: https://git.kernel.org/pub/scm/linux/kernel/git

[PATCH iproute2-next] tc: add support for plug qdisc

2019-04-24 Thread Paolo Abeni
sch_plug can be used to perform functional qdisc unit tests controlling explicitly the queuing behaviour from user-space. Plug support lacks since its introduction in 2012. This change introduces basic support, to control the tc status. Signed-off-by: Paolo Abeni --- tc/Makefile | 1 + tc/q_pl

[PATCH net-next] cxgb4/cxgb4vf_main: Mark expected switch fall-through

2019-04-24 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c: In function ‘fwevtq_handler’: drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:520:7: warni

  1   2   >