Re: [PATCH net v4] net: xdp: account for layer 3 packets in generic skb handler

2020-08-13 Thread Jason A. Donenfeld
On Thu, Aug 13, 2020 at 11:01 PM Jakub Kicinski wrote: > > I had originally dropped this patch, but the issue kept coming up in > > user reports, so here's a v4 of it. Testing of it is still rather slim, > > but hopefully that will change in the coming days. > > Here an alternative patch, untested

BUG: corrupted list in hci_chan_del

2020-08-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:990f2273 Merge tag 's390-5.9-2' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1631149190 kernel config: https://syzkaller.appspot.com/x/.config?x=9c89856ae5fc8b6 dash

Greetings

2020-08-13 Thread Mary fury
Greetings, My name is captain Mary fury from United state of America California, I am a military lady working with the US marine survilence in Iraq.am the only surviving daughter of my parents can we be friends. Best regards, Mary fury

Re: [GIT] Networking

2020-08-13 Thread pr-tracker-bot
The pull request you sent on Thu, 13 Aug 2020 16:10:57 -0700 (PDT): > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git refs/heads/master has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a1d21081a60dfb7fddf4a38b66d9cef603b317a9 Thank you! -- Deet-doot-dot,

Re: BUG: unable to handle kernel paging request in fl_dump_key

2020-08-13 Thread syzbot
syzbot has bisected this issue to: commit a51486266c3ba8e035a47fa96df67f274fe0c7d0 Author: Jiri Pirko Date: Sat Jun 15 09:03:49 2019 + net: sched: remove NET_CLS_IND config option bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1746350990 start commit: 1ca0fafd tcp:

Re: [PATCH v3 bpf 0/9] Fix various issues with 32-bit libbpf

2020-08-13 Thread Alexei Starovoitov
On Thu, Aug 13, 2020 at 01:49:36PM -0700, Andrii Nakryiko wrote: > This patch set contains fixes to libbpf, bpftool, and selftests that were > found while testing libbpf and selftests built in 32-bit mode. 64-bit nature > of BPF target and 32-bit host environment don't always mix together well > wi

Re: [PATCH 3/3] ipv6/icmp: l3mdev: Perform icmp error route lookup on source device routing table

2020-08-13 Thread David Ahern
On 8/11/20 1:50 PM, Mathieu Desnoyers wrote: > As per RFC4443, the destination address field for ICMPv6 error messages > is copied from the source address field of the invoking packet. > > In configurations with Virtual Routing and Forwarding tables, looking up > which routing table to use for sen

Re: [PATCH 1/3] selftests: Add VRF icmp error route lookup test

2020-08-13 Thread David Ahern
On 8/11/20 1:50 PM, Mathieu Desnoyers wrote: > +run_cmd() > +{ > + local cmd="$*" > + local out > + local rc > + > + if [ "$VERBOSE" = "1" ]; then > + echo "COMMAND: $cmd" > + fi > + > + out=$(eval $cmd 2>&1) > + rc=$? > + if [ "$VERBOSE" = "1" ] && [ -n

[GIT] Networking

2020-08-13 Thread David Miller
Some merge window fallout, some longer term fixes: 1) Handle headroom properly in lapbether and x25_asy drivers, from Xie He. 2) Fetch MAC address from correct r8152 device node, from Thierry Reding. 3) In the sw kTLS path we should allow MSG_CMSG_COMPAT in sendmsg, from Rouven Czerwi

Re: [PATCH 2/3] ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table

2020-08-13 Thread David Ahern
On 8/11/20 1:50 PM, Mathieu Desnoyers wrote: > As per RFC792, ICMP errors should be sent to the source host. > > However, in configurations with Virtual Routing and Forwarding tables, > looking up which routing table to use is currently done by using the > destination net_device. > > commit 9d1a6

Re: [PATCH v2] net: openvswitch: introduce common code for flushing flows

2020-08-13 Thread David Miller
From: xiangxia.m@gmail.com Date: Wed, 12 Aug 2020 17:56:39 +0800 > From: Tonghao Zhang > > To avoid some issues, for example RCU usage warning and double free, > we should flush the flows under ovs_lock. This patch refactors > table_instance_destroy and introduces table_instance_flow_flush >

Re: [PATCH] af_packet: TPACKET_V3: fix fill status rwlock imbalance

2020-08-13 Thread David Miller
From: John Ogness Date: Thu, 13 Aug 2020 21:45:25 +0206 > After @blk_fill_in_prog_lock is acquired there is an early out vnet > situation that can occur. In that case, the rwlock needs to be > released. > > Also, since @blk_fill_in_prog_lock is only acquired when @tp_version > is exactly TPACKET

Re: [PATCH net] random32: add a tracepoint for prandom_u32()

2020-08-13 Thread David Miller
From: Eric Dumazet Date: Thu, 13 Aug 2020 10:06:43 -0700 > There has been some heat around prandom_u32() lately, and some people > were wondering if there was a simple way to determine how often > it was used, before considering making it maybe 10 times more expensive. > > This tracepoint export

[PATCH v3 bpf 0/9] Fix various issues with 32-bit libbpf

2020-08-13 Thread Andrii Nakryiko
This patch set contains fixes to libbpf, bpftool, and selftests that were found while testing libbpf and selftests built in 32-bit mode. 64-bit nature of BPF target and 32-bit host environment don't always mix together well without extra care, so there were a bunch of problems discovered and fixed.

[PATCH v3 bpf 1/9] tools/bpftool: fix compilation warnings in 32-bit mode

2020-08-13 Thread Andrii Nakryiko
Fix few compilation warnings in bpftool when compiling in 32-bit mode. Abstract away u64 to pointer conversion into a helper function. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/btf_dumper.c | 2 +- tools/bpf/bpftool/link.c | 4 ++-- tools/bpf/bpftool/main.h | 10

Re: [bpf PATCH v3 0/5] Fix sock_ops field read splat

2020-08-13 Thread Daniel Borkmann
On 8/12/20 12:04 AM, John Fastabend wrote: [...] v2->v3: Updated commit msg in patch1 to include ommited line of asm output, per Daniels comment. v1->v2: Added fix sk access case Applied, thanks!

Re: [PATCH net] bonding: show saner speed for broadcast mode

2020-08-13 Thread Michal Kubecek
On Wed, Aug 12, 2020 at 10:29:56PM -0700, Jay Vosburgh wrote: > Did you notice this by inspection, or did it come up in use > somewhere? I can't recall ever hearing of anyone using broadcast mode, > so I'm curious if there is a use for it, but this change seems > reasonable enough regardless

Re: [PATCH ethtool v5] Add QSFP-DD support

2020-08-13 Thread Roopa Prabhu
On 8/13/20 8:08 AM, Adrian Pop wrote: The Common Management Interface Specification (CMIS) for QSFP-DD shares some similarities with other form factors such as QSFP or SFP, but due to the fact that the module memory map is different, the current ethtool version is not able to provide relevant i

[PATCH v3 bpf 6/9] libbpf: enforce 64-bitness of BTF for BPF object files

2020-08-13 Thread Andrii Nakryiko
BPF object files are always targeting 64-bit BPF target architecture, so enforce that at BTF level as well. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 4a8524b2dda1..738579

[PATCH v3 bpf 2/9] selftest/bpf: fix compilation warnings in 32-bit mode

2020-08-13 Thread Andrii Nakryiko
Fix compilation warnings emitted when compiling selftests for 32-bit platform (x86 in my case). Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c | 8 tools/testing/selftests/bpf/prog_tests/core_extern.c| 4 ++-- tools/testing/selftests/bpf/p

Re: [PATCH net v4] net: xdp: account for layer 3 packets in generic skb handler

2020-08-13 Thread Jakub Kicinski
On Thu, 13 Aug 2020 21:58:16 +0200 Jason A. Donenfeld wrote: > - cls_bpf does not support the same feature set as XDP, and operates at > a slightly different stage in the networking stack. Please elaborate. > I had originally dropped this patch, but the issue kept coming up in > user reports, s

[PATCH v3 bpf 4/9] libbpf: handle BTF pointer sizes more carefully

2020-08-13 Thread Andrii Nakryiko
With libbpf and BTF it is pretty common to have libbpf built for one architecture, while BTF information was generated for a different architecture (typically, but not always, BPF). In such case, the size of a pointer might differ betweem architectures. libbpf previously was always making an assump

[PATCH v2 bpf 0/9] Fix various issues with 32-bit libbpf

2020-08-13 Thread Andrii Nakryiko
This patch set contains fixes to libbpf, bpftool, and selftests that were found while testing libbpf and selftests built in 32-bit mode. 64-bit nature of BPF target and 32-bit host environment don't always mix together well without extra care, so there were a bunch of problems discovered and fixed.

Re: [PATCH bpf] libbpf: Prevent overriding errno when logging errors

2020-08-13 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 8/13/20 9:52 PM, Toke Høiland-Jørgensen wrote: >> Andrii Nakryiko writes: >>> On Thu, Aug 13, 2020 at 7:29 AM Toke Høiland-Jørgensen >>> wrote: Turns out there were a few more instances where libbpf didn't save the errno before writing an error messa

[PATCH v3 bpf 3/9] libbpf: fix BTF-defined map-in-map initialization on 32-bit host arches

2020-08-13 Thread Andrii Nakryiko
Libbpf built in 32-bit mode should be careful about not conflating 64-bit BPF pointers in BPF ELF file and host architecture pointers. This patch fixes issue of incorrect initializating of map-in-map inner map slots due to such difference. Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map s

[PATCH v3 bpf 9/9] selftests/bpf: make test_varlen work with 32-bit user-space arch

2020-08-13 Thread Andrii Nakryiko
Despite bpftool generating data section memory layout that will work for 32-bit architectures on user-space side, BPF programs should be careful to not use ambiguous types like `long`, which have different size in 32-bit and 64-bit environments. Fix that in test by using __u64 explicitly, which is

[PATCH v3 bpf 7/9] selftests/bpf: correct various core_reloc 64-bit assumptions

2020-08-13 Thread Andrii Nakryiko
Ensure that types are memory layout- and field alignment-compatible regardless of 32/64-bitness mix of libbpf and BPF architecture. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 20 +++--- .../selftests/bpf/progs/core_reloc_types.h| 69 ++-

[PATCH v3 bpf 5/9] selftests/bpf: fix btf_dump test cases on 32-bit arches

2020-08-13 Thread Andrii Nakryiko
Fix btf_dump test cases by hard-coding BPF's pointer size of 8 bytes for cases where it's impossible to deterimne the pointer size (no long type in BTF). In cases where it's known, validate libbpf correctly determines it as 8. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/btf_d

[PATCH v3 bpf 8/9] tools/bpftool: generate data section struct with conservative alignment

2020-08-13 Thread Andrii Nakryiko
The comment in the code describes this in good details. Generate such a memory layout that would work both on 32-bit and 64-bit architectures for user-space. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/gen.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/bpf/b

Re: [PATCH v2 bpf 4/9] libbpf: handle BTF pointer sizes more carefully

2020-08-13 Thread Andrii Nakryiko
On Thu, Aug 13, 2020 at 1:39 PM Andrii Nakryiko wrote: > > With libbpf and BTF it is pretty common to have libbpf built for one > architecture, while BTF information was generated for a different architecture > (typically, but not always, BPF). In such case, the size of a pointer might > differ be

Re: [PATCH v2] i40e: fix return of uninitialized aq_ret in i40e_set_vsi_promisc

2020-08-13 Thread Jakub Kicinski
On Thu, 13 Aug 2020 13:26:38 +0200 Stefan Assmann wrote: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function > ‘i40e_set_vsi_promisc’: > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’ > may be used uninitialized in this function [-Werror=maybe-uninitiali

Re: [PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-13 Thread Jakub Kicinski
On Thu, 13 Aug 2020 15:51:46 +0300 Shay Agroskin wrote: > Long answer: > The ena_destroy_device() function is called with rtnl_lock() held, > so it cannot run in parallel with the reset function. Also the > destroy function clears the bit ENA_FLAG_TRIGGER_RESET without > which the reset function

[PATCH v2 bpf 9/9] selftests/bpf: make test_varlen work with 32-bit user-space arch

2020-08-13 Thread Andrii Nakryiko
Despite bpftool generating data section memory layout that will work for 32-bit architectures on user-space side, BPF programs should be careful to not use ambiguous types like `long`, which have different size in 32-bit and 64-bit environments. Fix that in test by using __u64 explicitly, which is

[PATCH v2 bpf 3/9] libbpf: fix BTF-defined map-in-map initialization on 32-bit host arches

2020-08-13 Thread Andrii Nakryiko
Libbpf built in 32-bit mode should be careful about not conflating 64-bit BPF pointers in BPF ELF file and host architecture pointers. This patch fixes issue of incorrect initializating of map-in-map inner map slots due to such difference. Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map s

[PATCH v2 bpf 4/9] libbpf: handle BTF pointer sizes more carefully

2020-08-13 Thread Andrii Nakryiko
With libbpf and BTF it is pretty common to have libbpf built for one architecture, while BTF information was generated for a different architecture (typically, but not always, BPF). In such case, the size of a pointer might differ betweem architectures. libbpf previously was always making an assump

[PATCH v2 bpf 6/9] libbpf: enforce 64-bitness of BTF for BPF object files

2020-08-13 Thread Andrii Nakryiko
BPF object files are always targeting 64-bit BPF target architecture, so enforce that at BTF level as well. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 4a8524b2dda1..738579

[PATCH v2 bpf 5/9] selftests/bpf: fix btf_dump test cases on 32-bit arches

2020-08-13 Thread Andrii Nakryiko
Fix btf_dump test cases by hard-coding BPF's pointer size of 8 bytes for cases where it's impossible to deterimne the pointer size (no long type in BTF). In cases where it's known, validate libbpf correctly determines it as 8. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/btf_d

[PATCH v2 bpf 8/9] tools/bpftool: generate data section struct with conservative alignment

2020-08-13 Thread Andrii Nakryiko
The comment in the code describes this in good details. Generate such a memory layout that would work both on 32-bit and 64-bit architectures for user-space. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/gen.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/bpf/b

[PATCH v2 bpf 7/9] selftests/bpf: correct various core_reloc 64-bit assumptions

2020-08-13 Thread Andrii Nakryiko
Ensure that types are memory layout- and field alignment-compatible regardless of 32/64-bitness mix of libbpf and BPF architecture. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 20 +++--- .../selftests/bpf/progs/core_reloc_types.h| 69 ++-

[PATCH v2 bpf 2/9] selftest/bpf: fix compilation warnings in 32-bit mode

2020-08-13 Thread Andrii Nakryiko
Fix compilation warnings emitted when compiling selftests for 32-bit platform (x86 in my case). Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c | 8 tools/testing/selftests/bpf/prog_tests/core_extern.c| 4 ++-- tools/testing/selftests/bpf/p

[PATCH v2 bpf 1/9] tools/bpftool: fix compilation warnings in 32-bit mode

2020-08-13 Thread Andrii Nakryiko
Fix few compilation warnings in bpftool when compiling in 32-bit mode. Abstract away u64 to pointer conversion into a helper function. Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/btf_dumper.c | 2 +- tools/bpf/bpftool/link.c | 4 ++-- tools/bpf/bpftool/main.h | 10

Re: [PATCH bpf] libbpf: Prevent overriding errno when logging errors

2020-08-13 Thread Daniel Borkmann
On 8/13/20 9:52 PM, Toke Høiland-Jørgensen wrote: Andrii Nakryiko writes: On Thu, Aug 13, 2020 at 7:29 AM Toke Høiland-Jørgensen wrote: Turns out there were a few more instances where libbpf didn't save the errno before writing an error message, causing errno to be overridden by the printf()

Re: [PATCH bpf 0/9] Fix various issues with 32-bit libbpf

2020-08-13 Thread Andrii Nakryiko
On Thu, Aug 13, 2020 at 12:20 PM Alexei Starovoitov wrote: > > On Thu, Aug 13, 2020 at 12:17:13AM -0700, Andrii Nakryiko wrote: > > This patch set contains fixes to libbpf, bpftool, and selftests that were > > found while testing libbpf and selftests built in 32-bit mode. 64-bit nature > > of BPF

[PATCH net v4] net: xdp: account for layer 3 packets in generic skb handler

2020-08-13 Thread Jason A. Donenfeld
A user reported that packets from wireguard were possibly ignored by XDP [1]. Another user reported that modifying packets from layer 3 interfaces results in impossible to diagnose drops. Apparently, the generic skb xdp handler path seems to assume that packets will always have an ethernet header,

Re: [PATCH bpf] libbpf: Prevent overriding errno when logging errors

2020-08-13 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Thu, Aug 13, 2020 at 7:29 AM Toke Høiland-Jørgensen > wrote: >> >> Turns out there were a few more instances where libbpf didn't save the >> errno before writing an error message, causing errno to be overridden by >> the printf() return and the error disappearing if

[PATCH] af_packet: TPACKET_V3: fix fill status rwlock imbalance

2020-08-13 Thread John Ogness
After @blk_fill_in_prog_lock is acquired there is an early out vnet situation that can occur. In that case, the rwlock needs to be released. Also, since @blk_fill_in_prog_lock is only acquired when @tp_version is exactly TPACKET_V3, only release it on that exact condition as well. And finally, ad

Re: [PATCH bpf 0/9] Fix various issues with 32-bit libbpf

2020-08-13 Thread Alexei Starovoitov
On Thu, Aug 13, 2020 at 12:17:13AM -0700, Andrii Nakryiko wrote: > This patch set contains fixes to libbpf, bpftool, and selftests that were > found while testing libbpf and selftests built in 32-bit mode. 64-bit nature > of BPF target and 32-bit host environment don't always mix together well > wi

Re: [PATCH v2] net: openvswitch: introduce common code for flushing flows

2020-08-13 Thread Cong Wang
On Wed, Aug 12, 2020 at 2:59 AM wrote: > > From: Tonghao Zhang > > To avoid some issues, for example RCU usage warning and double free, > we should flush the flows under ovs_lock. This patch refactors > table_instance_destroy and introduces table_instance_flow_flush > which can be invoked by __dp

[PATCH net] drivers/net/wan/hdlc_x25: Added needed_headroom and a skb->len check

2020-08-13 Thread Xie He
1. Added a skb->len check This driver expects upper layers to include a pseudo header of 1 byte when passing down a skb for transmission. This driver will read this 1-byte header. This patch added a skb->len check before reading the header to make sure the header exists. 2. Added needed_headroom

Re: [PATCH net] random32: add a tracepoint for prandom_u32()

2020-08-13 Thread Sedat Dilek
On Thu, Aug 13, 2020 at 7:06 PM Eric Dumazet wrote: > > There has been some heat around prandom_u32() lately, and some people > were wondering if there was a simple way to determine how often > it was used, before considering making it maybe 10 times more expensive. > > This tracepoint exports the

[PATCH ethtool v5] Add QSFP-DD support

2020-08-13 Thread Adrian Pop
The Common Management Interface Specification (CMIS) for QSFP-DD shares some similarities with other form factors such as QSFP or SFP, but due to the fact that the module memory map is different, the current ethtool version is not able to provide relevant information about an interface. This patch

Re: [PATCH net] can: j1939: fix kernel-infoleak in j1939_sk_sock2sockaddr_can()

2020-08-13 Thread Oleksij Rempel
Hi Eric, On Thu, Aug 13, 2020 at 09:18:34AM -0700, Eric Dumazet wrote: > syzbot found that at least 2 bytes of kernel information > were leaked during getsockname() on AF_CAN CAN_J1939 socket. > > Since struct sockaddr_can has in fact two holes, simply > clear the whole area before filling it wit

Re: [PATCH bpf] libbpf: Prevent overriding errno when logging errors

2020-08-13 Thread Andrii Nakryiko
On Thu, Aug 13, 2020 at 7:29 AM Toke Høiland-Jørgensen wrote: > > Turns out there were a few more instances where libbpf didn't save the > errno before writing an error message, causing errno to be overridden by > the printf() return and the error disappearing if logging is enabled. > > Signed-off

Re: [PATCH net 1/2] ipv6: add ipv6_dev_find()

2020-08-13 Thread Xin Long
On Tue, Aug 11, 2020 at 10:26 AM Hideaki Yoshifuji wrote: > > Hi, > > 2020年8月9日(日) 19:52 Xin Long : > > > > On Fri, Aug 7, 2020 at 5:26 PM Hideaki Yoshifuji > > wrote: > > > > > > Hi, > > > > > > 2020年8月6日(木) 23:03 David Ahern : > > > > > > > > On 8/6/20 2:55 AM, Xin Long wrote: > > > > > On Thu,

KMSAN: uninit-value in hsr_addr_subst_dest

2020-08-13 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:ce8056d1 wip: changed copy_from_user where instrumented git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=14680fd690 kernel config: https://syzkaller.appspot.com/x/.

Re: [PATCH nf] netfilter/ebtables: reject bogus getopt len value

2020-08-13 Thread Jakub Kicinski
On Thu, 13 Aug 2020 09:46:11 +0200 Florian Westphal wrote: > Fixes: fc66de8e16e ("netfilter/ebtables: clean up compat {get, set}sockopt > handling") Fixes tag: Fixes: fc66de8e16e ("netfilter/ebtables: clean up compat {get, set}sockopt handling") Has these problem(s): - SHA1 should be at

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-13 Thread Sedat Dilek
On Thu, Aug 13, 2020 at 4:00 PM Eric Dumazet wrote: > > On Thu, Aug 13, 2020 at 1:27 AM Sedat Dilek wrote: > > > > I run a perf session looks like this in my KDE/Plasma desktop-environment: > > > > [ PERF SESSION ] > > > > 1016 2020-08-13 09:57:24 echo 1 > /proc/sys/kernel/sched_schedstats > >

Re: [PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Segher Boessenkool
On Thu, Aug 13, 2020 at 02:39:10PM +, Christophe Leroy wrote: > ppc6xx_defconfig fails building sfc.ko module, complaining > about the lack of _umoddi3 symbol. > > This is due to the following test > > if (EFX_MIN_DMAQ_SIZE % reader->value) { > > Because reader->value is u64. >

Re: [PATCH nf] netfilter/ebtables: reject bogus getopt len value

2020-08-13 Thread Christoph Hellwig
Looks good, sorry: Reviewed-by: Christoph Hellwig

Re: [PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Edward Cree
On 13/08/2020 15:39, Christophe Leroy wrote: > ppc6xx_defconfig fails building sfc.ko module, complaining > about the lack of _umoddi3 symbol. > > This is due to the following test > > if (EFX_MIN_DMAQ_SIZE % reader->value) { > > Because reader->value is u64. Already fixed in net.git

[PATCH] sfc_ef100: Fix build failure on powerpc

2020-08-13 Thread Christophe Leroy
ppc6xx_defconfig fails building sfc.ko module, complaining about the lack of _umoddi3 symbol. This is due to the following test if (EFX_MIN_DMAQ_SIZE % reader->value) { Because reader->value is u64. As EFX_MIN_DMAQ_SIZE value is 512, reader->value is obviously small enough for a

[PATCH bpf] libbpf: Prevent overriding errno when logging errors

2020-08-13 Thread Toke Høiland-Jørgensen
Turns out there were a few more instances where libbpf didn't save the errno before writing an error message, causing errno to be overridden by the printf() return and the error disappearing if logging is enabled. Signed-off-by: Toke Høiland-Jørgensen --- tools/lib/bpf/libbpf.c | 12 +++-

[PATCH ipsec] espintcp: restore IP CB before handing the packet to xfrm

2020-08-13 Thread Sabrina Dubroca
Xiumei reported a bug with espintcp over IPv6 in transport mode, because xfrm6_transport_finish expects to find IP6CB data (struct inet6_skb_cb). Currently, espintcp zeroes the CB, but the relevant part is actually preserved by previous layers (first set up by tcp, then strparser only zeroes a smal

Re: [RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-13 Thread Thomas Gleixner
Paolo Bonzini writes: > On 13/08/20 14:13, Thomas Gleixner wrote: >cat /sys/kernel/debug/metricfs/irq_x86/TLB/values What is 'TLB'? I'm not aware of any vector which is named TLB. >>> There's a "TLB" entry in /proc/interrupts. >> It's TLB shootdowns and not TLB. > > Yes but it's using

Re: [RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-13 Thread Paolo Bonzini
On 13/08/20 14:13, Thomas Gleixner wrote: Add metricfs support for displaying percpu irq counters for x86. The top directory is /sys/kernel/debug/metricfs/irq_x86. Then there is a subdirectory for each x86-specific irq counter. For example: cat /sys/kernel/debug/met

[PATCH net v2] bonding: show saner speed for broadcast mode

2020-08-13 Thread Jarod Wilson
Broadcast mode bonds transmit a copy of all traffic simultaneously out of all interfaces, so the "speed" of the bond isn't really the aggregate of all interfaces, but rather, the speed of the slowest active interface. Also, the type of the speed field is u32, not unsigned long, so adjust that acco

[PATCH net] can: peak_usb: add range checking in decode operations

2020-08-13 Thread Dan Carpenter
These values come from skb->data so Smatch considers them untrusted. I believe Smatch is correct but I don't have a way to test this. The usb_if->dev[] array has 2 elements but the index is in the 0-15 range without checks. The cfd->len can be up to 255 but the maximum valid size is CANFD_MAX_DL

Re: [PATCH net] bonding: show saner speed for broadcast mode

2020-08-13 Thread Jarod Wilson
On Thu, Aug 13, 2020 at 1:30 AM Jay Vosburgh wrote: > > Jarod Wilson wrote: > > >Broadcast mode bonds transmit a copy of all traffic simultaneously out of > >all interfaces, so the "speed" of the bond isn't really the aggregate of > >all interfaces, but rather, the speed of the lowest active inte

Re: [PATCH 2/3] ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table

2020-08-13 Thread Mathieu Desnoyers
- On Aug 12, 2020, at 5:43 PM, David S. Miller da...@davemloft.net wrote: > From: Mathieu Desnoyers > Date: Tue, 11 Aug 2020 15:50:02 -0400 > >> @@ -465,6 +465,7 @@ static struct rtable *icmp_route_lookup(struct net *net, >> int type, int code, >>

Re: [PATCH] tools build feature: Quote CC and CXX for their arguments

2020-08-13 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 12, 2020 at 07:31:32PM -0700, Tom Hebb escreveu: > On Wed, Aug 12, 2020 at 3:15 PM Daniel Díaz wrote: > > Makefile.config:414: *** No gnu/libc-version.h found, please install > > glibc-dev[el]. Stop. > > Makefile.perf:230: recipe for target 'sub-make' failed > > make[1]: *** [s

Re: [PATCH V1 net 1/3] net: ena: Prevent reset after device destruction

2020-08-13 Thread Shay Agroskin
Jakub Kicinski writes: On Wed, 12 Aug 2020 13:10:57 +0300 Shay Agroskin wrote: This patch also removes the destruction of the timer and reset services from ena_remove() since the timer is destroyed by the destruction routine and the reset work is handled by this patch. You'd still have a

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-13 Thread Jamal Hadi Salim
On 2020-08-11 7:25 p.m., Cong Wang wrote: On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: [..] Not sure if I get you correctly, but with a combined implementation you can do above too, right? Something like: (AND case) $TC filter add dev $DEV1 parent : protocol ip prio 3 handle 1

Re: [PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-13 Thread Willem de Bruijn
On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote: > > If the skb is zcopied, we should increase the skb_uarg refcount before we > involve skb_release_data(). See pskb_expand_head() as a reference. Did you manage to observe a bug through this datapath in practice? pskb_carve_inside_header is call

Re: [PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-13 Thread Willem de Bruijn
On Thu, Aug 13, 2020 at 1:59 PM Miaohe Lin wrote: > > The var extra_uref is introduced to pass the initial reference taken in > sock_zerocopy_alloc to the first generated skb. But now we may fail to pass > the initial reference with newly allocated UDP or RAW uarg when the skb is > zcopied. > > If

ethtool 5.8 segfaults when changing settings on a device

2020-08-13 Thread Hans-Christian Egtvedt (hegtvedt)
Hello, I am testing ethtool 5.8, and I noticed it segfaulted with the command ethtool -s eth0 autoneg on Backtrace as follows: (gdb) run -s eth0 autoneg on Starting program: /tmp/ethtool-5.8 -s eth0 autoneg on Program received signal SIGSEGV, Segmentation fault. 0x0040bef8 in do_sset () (gdb)

[PATCH] net: add missing skb_uarg refcount increment in pskb_carve_inside_header()

2020-08-13 Thread Miaohe Lin
If the skb is zcopied, we should increase the skb_uarg refcount before we involve skb_release_data(). See pskb_expand_head() as a reference. Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") Signed-off-by: Miaohe Lin --- net/core/skbuff.c | 2 ++ 1 file changed, 2 insertions(+)

Re: [RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-13 Thread Thomas Gleixner
Paolo Bonzini writes: > On 13/08/20 12:11, Thomas Gleixner wrote: >>> Add metricfs support for displaying percpu irq counters for x86. >>> The top directory is /sys/kernel/debug/metricfs/irq_x86. >>> Then there is a subdirectory for each x86-specific irq counter. >>> For example: >>> >>>cat /

Re: [RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-13 Thread Paolo Bonzini
On 13/08/20 12:11, Thomas Gleixner wrote: >> Add metricfs support for displaying percpu irq counters for x86. >> The top directory is /sys/kernel/debug/metricfs/irq_x86. >> Then there is a subdirectory for each x86-specific irq counter. >> For example: >> >>cat /sys/kernel/debug/metricfs/irq_x8

[PATCH] net: correct zerocopy refcnt with newly allocated UDP or RAW uarg

2020-08-13 Thread Miaohe Lin
The var extra_uref is introduced to pass the initial reference taken in sock_zerocopy_alloc to the first generated skb. But now we may fail to pass the initial reference with newly allocated UDP or RAW uarg when the skb is zcopied. If the skb is zcopied, we always set extra_uref to false. This is

Re: [PATCH] qrtr: Convert qrtr_ports from IDR to XArray

2020-08-13 Thread Matthew Wilcox
On Thu, Aug 13, 2020 at 12:48:10PM +0200, Dmitry Vyukov wrote: > On Fri, Jun 5, 2020 at 6:44 PM Eric Dumazet wrote: > > > > On 6/5/20 5:00 AM, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > The XArray interface is easier for this driver to use. Also fixes a > > > bug rep

[PATCH v2] i40e: fix return of uninitialized aq_ret in i40e_set_vsi_promisc

2020-08-13 Thread Stefan Assmann
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function ‘i40e_set_vsi_promisc’: drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] i40e_status aq_ret; In case the code inside the if statem

Re: [PATCH] dt-bindings: Whitespace clean-ups in schema files

2020-08-13 Thread Luca Ceresoli
Hi Rob, On 12/08/20 22:36, Rob Herring wrote: > Clean-up incorrect indentation, extra spaces, long lines, and missing > EOF newline in schema files. Most of the clean-ups are for list > indentation which should always be 2 spaces more than the preceding > keyword. > > Found with yamllint (which I

[PATCH ethtool v4] Add QSFP-DD support

2020-08-13 Thread Adrian Pop
The Common Management Interface Specification (CMIS) for QSFP-DD shares some similarities with other form factors such as QSFP or SFP, but due to the fact that the module memory map is different, the current ethtool version is not able to provide relevant information about an interface. This patch

Re: [RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-13 Thread Thomas Gleixner
Jonathan Adams writes: How is that related to core? The x86 subsys prefix is 'x86' and for this particular thing it's 'x86/irq:'. That applies to the rest of the series as well. > Add metricfs support for displaying percpu irq counters for x86. > The top directory is /sys/kernel/debug/metricfs/

Re: tc -j filter show with actions is not json valid

2020-08-13 Thread Toke Høiland-Jørgensen
Denis Gubin writes: > Hello everybody! > > Could you help me, please? > > I use Debian 10 and iproute2 version iproute2 > > dpkg -l iproute2 > iproute2 4.20.0-2 amd64 > > My problem is this: > I can't convert "tc -j filter show u32" command to json format. > Here it is command: > tc qdisc

Re: [PATCH ethtool v3] Add QSFP-DD support

2020-08-13 Thread Adrian Pop
Hi! Sorry for that. I'll resubmit v4 and I'll add diff from v1, diff from v2 and diff from v3. I will also add Michal Kubecek. Adrian On Thu, 13 Aug 2020 at 12:24, Ido Schimmel wrote: > > On Thu, Aug 13, 2020 at 10:17:35AM +0300, Adrian Pop wrote: > > The Common Management Interface Specificati

Re: KMSAN: uninit-value in batadv_hard_if_event (2)

2020-08-13 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:ce8056d1 wip: changed copy_from_user where instrumented git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=1015b61690 kernel config: https://syzkaller.ap

Re: [PATCH ethtool v3] Add QSFP-DD support

2020-08-13 Thread Ido Schimmel
On Thu, Aug 13, 2020 at 10:17:35AM +0300, Adrian Pop wrote: > The Common Management Interface Specification (CMIS) for QSFP-DD shares > some similarities with other form factors such as QSFP or SFP, but due to > the fact that the module memory map is different, the current ethtool > version is not

Re: [PATCH ethtool v2] Add QSFP-DD support

2020-08-13 Thread Adrian Pop
Hi Andrew! I removed all the comments/constants/structs/functions that were assuming the existence of page 0x10 and 0x11. I sent v3 to Ido (before submitting it), he helped me test it and everything works fine. Please let me know if there's anything else that should be changed. Also, I just notic

[PATCH ethtool v3] Add QSFP-DD support

2020-08-13 Thread Adrian Pop
The Common Management Interface Specification (CMIS) for QSFP-DD shares some similarities with other form factors such as QSFP or SFP, but due to the fact that the module memory map is different, the current ethtool version is not able to provide relevant information about an interface. This patch

[PATCH v1 1/2] Bluetooth: btusb: define HCI packet sizes of USB Alts

2020-08-13 Thread Joseph Hwang
It is desirable to define the HCI packet payload sizes of USB alternate settings so that they can be exposed to user space. Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Joseph Hwang --- drivers/bluetooth/btusb.c| 43 in

[PATCH v1 2/2] Bluetooth: sco: expose WBS packet length in socket option

2020-08-13 Thread Joseph Hwang
It is desirable to expose the wideband speech packet length via a socket option to the user space so that the user space can set the value correctly in configuring the sco connection. Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Joseph Hwang --- include/net/bl

[PATCH v1 0/2] To support the HFP WBS, a chip vendor may choose a particular

2020-08-13 Thread Joseph Hwang
USB alternate seeting of which the packet size is distinct. The patches are to expose the packet size to user space so that the user space does not need to hard code those values. We have verified this patch on Chromebooks which use - Realtek 8822CE controller with USB alt setting 1 - Intel contro

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-13 Thread Sedat Dilek
I run a perf session looks like this in my KDE/Plasma desktop-environment: [ PERF SESSION ] 1016 2020-08-13 09:57:24 echo 1 > /proc/sys/kernel/sched_schedstats 1017 2020-08-13 09:57:24 echo prandom_u32 >> /sys/kernel/debug/tracing/set_event 1018 2020-08-13 09:57:24 echo traceon > /sys/kerne

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-13 Thread Sedat Dilek
On Thu, Aug 13, 2020 at 10:06 AM Willy Tarreau wrote: > > On Thu, Aug 13, 2020 at 09:53:11AM +0200, Sedat Dilek wrote: > > On Wed, Aug 12, 2020 at 5:21 AM Willy Tarreau wrote: > > > > > > On Tue, Aug 11, 2020 at 12:51:43PM +0200, Sedat Dilek wrote: > > > > Can you share this "rebased to mainline"

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-13 Thread Willy Tarreau
On Thu, Aug 13, 2020 at 09:53:11AM +0200, Sedat Dilek wrote: > On Wed, Aug 12, 2020 at 5:21 AM Willy Tarreau wrote: > > > > On Tue, Aug 11, 2020 at 12:51:43PM +0200, Sedat Dilek wrote: > > > Can you share this "rebased to mainline" version of George's patch? > > > > You can pick it from there if t

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-08-13 Thread Jonathan McDowell
On Mon, Jul 27, 2020 at 03:22:37PM +0300, Vadym Kochan wrote: > Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 > ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely > wireless SMB deployment. > > The current implementation supports only boards designed for the Ma

Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable

2020-08-13 Thread Sedat Dilek
On Wed, Aug 12, 2020 at 5:21 AM Willy Tarreau wrote: > > On Tue, Aug 11, 2020 at 12:51:43PM +0200, Sedat Dilek wrote: > > Can you share this "rebased to mainline" version of George's patch? > > You can pick it from there if that helps, but keep in mind that > it's just experimental code that we us

Re: [PATCH] dt-bindings: Whitespace clean-ups in schema files

2020-08-13 Thread Geert Uytterhoeven
Hi Rob, On Wed, Aug 12, 2020 at 10:36 PM Rob Herring wrote: > Clean-up incorrect indentation, extra spaces, long lines, and missing > EOF newline in schema files. Most of the clean-ups are for list > indentation which should always be 2 spaces more than the preceding > keyword. > > Found with yam

[PATCH nf] netfilter/ebtables: reject bogus getopt len value

2020-08-13 Thread Florian Westphal
syzkaller reports splat: [ cut here ] Buffer overflow detected (80 < 137)! Call Trace: do_ebt_get_ctl+0x2b4/0x790 net/bridge/netfilter/ebtables.c:2317 nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:116 ip_getsockopt net/ipv4/ip_sockglue.c:1778 [inline] caused by a co

  1   2   >