[PATCH v2 net-next] net/tls: allow MSG_CMSG_COMPAT in sendmsg

2020-08-05 Thread Rouven Czerwinski
Trying to use ktls on a system with 32-bit userspace and 64-bit kernel results in a EOPNOTSUPP message during sendmsg: setsockopt(3, SOL_TLS, TLS_TX, …, 40) = 0 sendmsg(3, …, msg_flags=0}, 0) = -1 EOPNOTSUPP (Operation not supported) The tls_sw implementation does strict flag checking and doe

Re: [PATCH] seg6: using DSCP of inner IPv4 packets

2020-08-05 Thread Ahmed Abdelsalam
Hi David, SRv6 as defined in [1][2] does not mandate that the hop_limit of the outer IPv6 header has to be copied from the inner packet. The only thing that is mandatory is that the hop_limit of the inner packet has to be decremented [3]. This complies with the specification defined in the G

Re: [PATCH 1/2] net: tls: add compat for get/setsockopt

2020-08-05 Thread Rouven Czerwinski
On Wed, 2020-08-05 at 17:45 -0700, David Miller wrote: > Neither of these patches apply cleanly to net-next. The compat handling > and TLS code has been changed quite a bit lately. Indeed, Patch 1 is no longer required on net-next. I'll drop the patch. > ALso, you must provide a proper header "[

[PATCH net 2/2] net: initialize fastreuse on inet_inherit_port

2020-08-05 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

[PATCH net 0/2] net: initialize fastreuse on inet_inherit_port

2020-08-05 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

[PATCH net 1/2] net: refactor bind_bucket fastreuse into helper

2020-08-05 Thread Tim Froidcoeur
Refactor the fastreuse update code in inet_csk_get_port into a small helper function that can be called from other places. Acked-by: Matthieu Baerts Signed-off-by: Tim Froidcoeur --- include/net/inet_connection_sock.h | 4 ++ net/ipv4/inet_connection_sock.c| 99

Re: Packet not rerouting via different bridge interface after modifying destination IP in TC ingress hook

2020-08-05 Thread Ido Schimmel
On Wed, Aug 05, 2020 at 08:12:08PM +, Swarm NameRedacted wrote: > All fair points, I'll address them one by one. > 1) The subnet size on everything is /16; everything is on the same > subnet (hence the bridge) except for the client which sends the initial > SYN packet. Modifying the destinatio

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Willy Tarreau
On Wed, Aug 05, 2020 at 03:21:11PM -0700, Marc Plumb wrote: > There is nothing wrong with perturbing net_rand_state, the sin is doing it > with the raw entropy that is also the seed for your CPRNG. Use the output of > a CPRNG to perturb the pool all you want, but don't do things that bit by > bit r

RE: [PATCH bpf] selftests/bpf: prevent runqslower from racing on building bpftool

2020-08-05 Thread John Fastabend
Andrii Nakryiko wrote: > runqslower's Makefile is building/installing bpftool into > $(OUTPUT)/sbin/bpftool, which coincides with $(DEFAULT_BPFTOOL). In practice > this means that often when building selftests from scratch (after `make > clean`), selftests are racing with runqslower to simultaneous

RE: [PATCH bpf-next] libbf: fix uninitialized pointer at btf__parse_raw()

2020-08-05 Thread John Fastabend
Daniel T. Lee wrote: > Recently, from commit 94a1fedd63ed ("libbpf: Add btf__parse_raw() and > generic btf__parse() APIs"), new API has been added to libbpf that > allows to parse BTF from raw data file (btf__parse_raw()). > > The commit derives build failure of samples/bpf due to improper access

RE: [PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread John Fastabend
Muchun Song wrote: > Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. > > kernel/kprobes.c: In function 'kill_kprobe': > kernel/kprobes.c:1116:33: warning: statement with no effect > [-Wunused-value] > 1116 | #define disarm_kprobe_ftrace(p) (-ENODEV) > |

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-05 Thread Hongbo Wang
> On 8/3/2020 11:36 PM, Hongbo Wang wrote: > >>> + if (vlan->proto == ETH_P_8021AD) { > >>> + ocelot->enable_qinq = true; > >>> + ocelot_port->qinq_mode = true; > >>> + } > >> ... > >>> + if (vlan->proto == ETH_P_8021AD) { > >>> + ocelot->enable_qinq

Re: WARNING in rxrpc_recvmsg

2020-08-05 Thread syzbot
syzbot suspects this issue was fixed by commit: commit 65550098c1c4db528400c73acf3e46bfa78d9264 Author: David Howells Date: Tue Jul 28 23:03:56 2020 + rxrpc: Fix race between recvmsg and sendmsg on immediate call failure bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10b

RE: [PATCH] ath10k: Fix the size used in a 'dma_free_coherent()' call in an error handling path

2020-08-05 Thread Rakesh Pillai
> -Original Message- > From: Christophe JAILLET > Sent: Sunday, August 2, 2020 5:52 PM > To: kv...@codeaurora.org; da...@davemloft.net; k...@kernel.org; > pill...@codeaurora.org > Cc: ath...@lists.infradead.org; linux-wirel...@vger.kernel.org; > netdev@vger.kernel.org; linux-ker...@vger

Re: [PATCH net] Revert "vxlan: fix tos value before xmit"

2020-08-05 Thread Hangbin Liu
On Wed, Aug 05, 2020 at 12:11:10PM -0700, David Miller wrote: > From: Hangbin Liu > Date: Wed, 5 Aug 2020 18:18:07 +0800 > > > Should I re-post the patch with Fixes flag? > > No, I took care the Fixes tag and queued this up for -stable. Thanks > > But you do need to explain what kind of testi

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

2020-08-05 Thread Hideaki Yoshifuji
Hi, 2020年8月4日(火) 0:35 Xin Long : > > This is to add an ip_dev_find like function for ipv6, used to find > the dev by saddr. > > It will be used by TIPC protocol. So also export it. > > Signed-off-by: Xin Long > --- > include/net/addrconf.h | 2 ++ > net/ipv6/addrconf.c| 39 +

RE: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-08-05 Thread ashid...@fujitsu.com
Hi Sergei, >The subject also could be more concise... I'll think about it. Thank you! > Not at all so common as I thought! Only 4 drivers use mdio-bitbang, > 2 of them are for the Renesas SoCs... Yes. > Do yuo have R-Car V3H at hand, by chance? It does have a GEther > controler use

RE: [PATCH v2] ravb: Fixed the problem that rmmod can not be done

2020-08-05 Thread ashid...@fujitsu.com
Hi Sergei, >CCing DaveM (as you should have done from the start)... Thank you. I appreciate your help. >Did you also build mdio-bitbang.c as a module? Yes. Sure. > For the in-kernal driver, not being able to rmmod the 'ravb' one sounds > logical. :-) root@rcar-gen3:~# lsmod|grep ravb

[PATCH] nfc: enforce CAP_NET_RAW for raw sockets When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first.

2020-08-05 Thread Qingyu Li
Signed-off-by: Qingyu Li --- net/nfc/rawsock.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index ba5ffd3badd3..c1302b689a98 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c @@ -332,8 +332,11 @@ static int rawsock_create(struc

Re: [PATCH 1/2] net: tls: add compat for get/setsockopt

2020-08-05 Thread kernel test robot
Hi Rouven, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.8] [cannot apply to next-20200805] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16

2020-08-05 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 1a86b377aa2147a7c866b03142e848c18e5f3cb8 commit: b025584098e621d88894d28e80af686958e273af [32/65] virtio_input: convert to LE accessors config: powerpc-randconfig-r031-20200805 (attached as .config) compiler

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

2020-08-05 Thread Xie He
I'm sorry I forgot to include the "net" prefix again. I remembered "PATCH" but not "net" this time. I'll try to remember both next time. If requested I can resend the patch with the correct prefix. Sorry.

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

2020-08-05 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. Changed to use needed_

Re: [PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread Masami Hiramatsu
On Thu, 6 Aug 2020 01:20:46 +0800 Muchun Song wrote: > Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. > > kernel/kprobes.c: In function 'kill_kprobe': > kernel/kprobes.c:1116:33: warning: statement with no effect > [-Wunused-value] > 1116 | #define disarm_kprobe_ftrace(p) (

Re: [PATCH net-next] net: thunderx: initialize VF's mailbox mutex before first usage

2020-08-05 Thread David Miller
From: Dean Nelson Date: Wed, 5 Aug 2020 13:18:48 -0500 > A VF's mailbox mutex is not getting initialized by nicvf_probe() until after > it is first used. And such usage is resulting in... ... > This problem is resolved by moving the call to mutex_init() up earlier > in nicvf_probe(). > > Fixes

Re: [PATCH 1/2] net: tls: add compat for get/setsockopt

2020-08-05 Thread David Miller
Neither of these patches apply cleanly to net-next. The compat handling and TLS code has been changed quite a bit lately. ALso, you must provide a proper header "[PATCH 0/N] ..." posting for your patch series which explains at a high level what your patch series is doing, how it is doing it, an

Re: [PATCH 0/3] misc bug fixes for the hso driver

2020-08-05 Thread David Miller
From: Oliver Neukum Date: Wed, 5 Aug 2020 14:07:06 +0200 > 1. Code reuse led to an unregistration of a net driver that has not been > registered > 2. The kernel complains generically if kmalloc with GFP_KERNEL fails > 3. A race that can lead to an URB that is in use being reused or > a use after

Re: [PATCH net] ptp: ptp_idt82p33: update to support adjphase

2020-08-05 Thread David Miller
From: Date: Tue, 4 Aug 2020 15:12:14 -0400 > This update includes adjphase support, more debug logs, firmware name > parameter, correct PTP_CLK_REQ_PEROUT support and use do_aux_work to > do delay work. Way too many changes in one patch, and some of them are not appropriate. > +static char *fir

Re: [PATCH] seg6: using DSCP of inner IPv4 packets

2020-08-05 Thread David Miller
From: Ahmed Abdelsalam Date: Tue, 4 Aug 2020 07:40:30 + > This patch allows copying the DSCP from inner IPv4 header to the > outer IPv6 header, when doing SRv6 Encapsulation. > > This allows forwarding packet across the SRv6 fabric based on their > original traffic class. > > Signed-off-by

Re: Question about TC filter

2020-08-05 Thread Cong Wang
Hello, On Tue, Aug 4, 2020 at 10:39 PM satish dhote wrote: > > Hi Team, > > I have a question regarding tc filter behavior. I tried to look > for the answer over the web and netdev FAQ but didn't get the > answer. Hence I'm looking for your help. > > I added ingress qdisc for interface enp0s25 an

Re: [vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast

2020-08-05 Thread Michael S. Tsirkin
LE accessors > config: parisc-randconfig-r003-20200805 (attached as .config) > compiler: hppa-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=1 build): > wget > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > ~/bin/make.cross > chmod

Re: [PATCH bpf-next 5/5] selftests/bpf: add benchmark for uprobe vs. user_prog

2020-08-05 Thread Song Liu
> On Aug 5, 2020, at 3:50 PM, Alexei Starovoitov > wrote: > > On Wed, Aug 05, 2020 at 06:56:26PM +, Song Liu wrote: >> >> >>> On Aug 5, 2020, at 10:16 AM, Alexei Starovoitov >>> wrote: >>> >>> On Wed, Aug 05, 2020 at 04:47:30AM +, Song Liu wrote: Being able to trigger

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Stephen Hemminger
On Wed, 5 Aug 2020 09:39:17 -0700 Linus Torvalds wrote: > On Wed, Aug 5, 2020 at 8:44 AM Marc Plumb wrote: > > > > I thought net_rand_state was assumed to be insecure and that anyone > > could determine the internal state. Isn't this Working as Designed? > > I was working as designed - becaus

Re: rtnl_trylock() versus SCHED_FIFO lockup

2020-08-05 Thread Stephen Hemminger
On Wed, 5 Aug 2020 16:25:23 +0200 Rasmus Villemoes wrote: > Hi, > > We're seeing occasional lockups on an embedded board (running an -rt > kernel), which I believe I've tracked down to the > > if (!rtnl_trylock()) > return restart_syscall(); > > in net/bridge/br

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Joe Perches
On Wed, 2020-08-05 at 23:09 +0100, Russell King - ARM Linux admin wrote: > On Wed, Aug 05, 2020 at 11:47:38AM -0700, Joe Perches wrote: > > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > > On Wed, Aug 05, 2020 at 11:11:28AM -0700, Linus Torvalds wrote: > > > > On Wed,

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Andy Lutomirski
>> On Aug 5, 2020, at 3:06 PM, ty...@mit.edu wrote: >> >> On Wed, Aug 05, 2020 at 09:06:40AM -0700, Marc Plumb wrote: >> Isn't get_random_u32 the function you wrote to do that? If this needs to be >> cryptographically secure, that's an existing option that's safe. >> The fundamental question is

Re: [PATCH bpf-next 5/5] selftests/bpf: add benchmark for uprobe vs. user_prog

2020-08-05 Thread Alexei Starovoitov
On Wed, Aug 05, 2020 at 06:56:26PM +, Song Liu wrote: > > > > On Aug 5, 2020, at 10:16 AM, Alexei Starovoitov > > wrote: > > > > On Wed, Aug 05, 2020 at 04:47:30AM +, Song Liu wrote: > >> > >> Being able to trigger BPF program on a different CPU could enable many > >> use cases and op

[PATCH bpf-next] libbf: fix uninitialized pointer at btf__parse_raw()

2020-08-05 Thread Daniel T. Lee
Recently, from commit 94a1fedd63ed ("libbpf: Add btf__parse_raw() and generic btf__parse() APIs"), new API has been added to libbpf that allows to parse BTF from raw data file (btf__parse_raw()). The commit derives build failure of samples/bpf due to improper access of uninitialized pointer at btf

Re: [PATCH bpf-next 5/5] selftests/bpf: add benchmark for uprobe vs. user_prog

2020-08-05 Thread Song Liu
> On Aug 5, 2020, at 10:39 AM, Andrii Nakryiko > wrote: > > On Wed, Aug 5, 2020 at 12:01 AM Song Liu wrote: >> >> >> >>> On Aug 4, 2020, at 10:47 PM, Andrii Nakryiko >>> wrote: >>> >>> On Tue, Aug 4, 2020 at 9:47 PM Song Liu wrote: > On Aug 4, 2020, at 6:52 PM, An

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Marc Plumb
Willy, On 2020-08-05 12:38 p.m., Willy Tarreau wrote: It's not *that* major an issue (in my personal opinion) but the current net_rand_state is easy enough to guess so that an observer may reduce the difficulty to build certain attacks (using known source ports for example). The goal of this ch

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Russell King - ARM Linux admin
On Wed, Aug 05, 2020 at 03:09:34PM -0700, Joe Perches wrote: > On Wed, 2020-08-05 at 23:02 +0100, Russell King - ARM Linux admin wrote: > > On Wed, Aug 05, 2020 at 11:54:25AM -0700, Joe Perches wrote: > > > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > > > On Wed, Aug

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Russell King - ARM Linux admin
On Wed, Aug 05, 2020 at 11:47:38AM -0700, Joe Perches wrote: > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > On Wed, Aug 05, 2020 at 11:11:28AM -0700, Linus Torvalds wrote: > > > On Wed, Aug 5, 2020 at 7:34 AM Russell King > > > wrote: > > > > Is this something you'

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Joe Perches
On Wed, 2020-08-05 at 23:02 +0100, Russell King - ARM Linux admin wrote: > On Wed, Aug 05, 2020 at 11:54:25AM -0700, Joe Perches wrote: > > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > > On Wed, Aug 05, 2020 at 11:11:28AM -0700, Linus Torvalds wrote: > > > > On Wed,

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread tytso
On Wed, Aug 05, 2020 at 09:06:40AM -0700, Marc Plumb wrote: > Isn't get_random_u32 the function you wrote to do that? If this needs to be > cryptographically secure, that's an existing option that's safe. > > The fundamental question is: Why is this attack on net_rand_state problem? > It's Working

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Russell King - ARM Linux admin
On Wed, Aug 05, 2020 at 11:54:25AM -0700, Joe Perches wrote: > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > On Wed, Aug 05, 2020 at 11:11:28AM -0700, Linus Torvalds wrote: > > > On Wed, Aug 5, 2020 at 7:34 AM Russell King > > > wrote: > > > > Is this something you'

Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-05 Thread Andrii Nakryiko
On Wed, Aug 5, 2020 at 2:31 PM Jiri Olsa wrote: > > On Wed, Aug 05, 2020 at 07:56:51PM +0200, Jiri Olsa wrote: > > On Tue, Aug 04, 2020 at 11:27:55PM -0700, Andrii Nakryiko wrote: > > > > SNIP > > > > > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > > > > index 7bacc2f56061..ba05b15ad599 100

Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-05 Thread Jiri Olsa
On Wed, Aug 05, 2020 at 07:56:51PM +0200, Jiri Olsa wrote: > On Tue, Aug 04, 2020 at 11:27:55PM -0700, Andrii Nakryiko wrote: > > SNIP > > > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > > > index 7bacc2f56061..ba05b15ad599 100644 > > > --- a/kernel/bpf/btf.c > > > +++ b/kernel/bpf/btf.c >

Re: [PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Andrew Lunn
On Wed, Aug 05, 2020 at 11:47:38AM -0700, Joe Perches wrote: > On Wed, 2020-08-05 at 19:22 +0100, Russell King - ARM Linux admin wrote: > > On Wed, Aug 05, 2020 at 11:11:28AM -0700, Linus Torvalds wrote: > > > On Wed, Aug 5, 2020 at 7:34 AM Russell King > > > wrote: > > > > Is this something you'

Re: [PATCH v9 bpf-next 10/14] bpf: Add d_path helper

2020-08-05 Thread Andrii Nakryiko
On Wed, Aug 5, 2020 at 2:01 PM Jiri Olsa wrote: > > On Wed, Aug 05, 2020 at 07:58:54PM +0200, Jiri Olsa wrote: > > On Tue, Aug 04, 2020 at 11:35:53PM -0700, Andrii Nakryiko wrote: > > > On Sat, Aug 1, 2020 at 10:04 AM Jiri Olsa wrote: > > > > > > > > Adding d_path helper function that returns ful

Re: [PATCH v9 bpf-next 10/14] bpf: Add d_path helper

2020-08-05 Thread Jiri Olsa
On Wed, Aug 05, 2020 at 07:58:54PM +0200, Jiri Olsa wrote: > On Tue, Aug 04, 2020 at 11:35:53PM -0700, Andrii Nakryiko wrote: > > On Sat, Aug 1, 2020 at 10:04 AM Jiri Olsa wrote: > > > > > > Adding d_path helper function that returns full path for > > > given 'struct path' object, which needs to b

Re: [PATCH net-next] net: dsa: sja1105: use detected device id instead of DT one on mismatch

2020-08-05 Thread Vladimir Oltean
On Tue, Aug 04, 2020 at 08:01:46PM -0700, Florian Fainelli wrote: > On 8/4/2020 3:59 PM, David Miller wrote: > > From: Vladimir Oltean > > Date: Mon, 3 Aug 2020 19:48:23 +0300 > > > >> Although we can detect the chip revision 100% at runtime, it is useful > >> to specify it in the device tree co

Re: ethtool-5.8: test-driver uses bashisms

2020-08-05 Thread Michal Kubecek
On Wed, Aug 05, 2020 at 01:03:30PM +0200, Michal Kubecek wrote: > On Wed, Aug 05, 2020 at 08:46:06AM +0200, Lars Wendler wrote: > > Hi Michal, > > > > I hope you are the right person to reach out for this matter. > > > > Running the test-driver script from ethtool-5.8 release with /bin/dash > > r

[vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast

2020-08-05 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 4c05433bc6fb4ae172270f0279be8ba89a3da64f commit: b025584098e621d88894d28e80af686958e273af [32/52] virtio_input: convert to LE accessors config: parisc-randconfig-r003-20200805 (attached as .config) compiler: hppa

general protection fault in bt_accept_unlink

2020-08-05 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:ac3a0c84 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=1639b28490 kernel config: https://syzkaller.appspot.com/x/.config?x=c0cfcf935bcc94d2 dashboar

Re: [PATCH v4 bpf-next] bpf/selftests: fold test_current_pid_tgid_new_ns into test_progs.

2020-08-05 Thread Andrii Nakryiko
On Wed, Aug 5, 2020 at 1:06 PM Carlos Neira wrote: > > Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs. > This change folds a test case into test_progs. > > Changes from V3: > - STAT(2) check changed from CHECK_FAIL to CHECK. > - Changed uses of _open_ to _open_and_load.

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Marc Plumb
Hi Willy, On 2020-08-04 7:49 p.m., Willy Tarreau wrote: Hi Marc, On Tue, Aug 04, 2020 at 05:52:36PM -0700, Marc Plumb wrote: Seeding two PRNGs with the same entropy causes two problems. The minor one is that you're double counting entropy. The major one is that anyone who can determine the sta

Re: Packet not rerouting via different bridge interface after modifying destination IP in TC ingress hook

2020-08-05 Thread Swarm NameRedacted
All fair points, I'll address them one by one. 1) The subnet size on everything is /16; everything is on the same subnet (hence the bridge) except for the client which sends the initial SYN packet. Modifying the destination MAC address was definitely something I overlooked and that did get the p

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Marc Plumb
Hi Ted, On 2020-08-05 8:34 a.m., ty...@mit.edu wrote: On Wed, Aug 05, 2020 at 04:49:41AM +0200, Willy Tarreau wrote: Not only was this obviously not the goal, but I'd be particularly interested in seeing this reality demonstrated, considering that the whole 128 bits of fast_pool together count

[PATCH v2] kprobes: fix NULL pointer dereference at kprobe_ftrace_handler

2020-08-05 Thread Muchun Song
We found a case of kernel panic on our server. The stack trace is as follows(omit some irrelevant information): BUG: kernel NULL pointer dereference, address: 0080 RIP: 0010:kprobe_ftrace_handler+0x5e/0xe0 RSP: 0018:b512c6550998 EFLAGS: 00010282 RAX: RBX: f

[PATCH 1/2] vDPA: get_vq_irq() should be optional

2020-08-05 Thread Zhu Lingshan
get_vq_irq() should be optional, it's required when we need to setup irq offloading, otherwise it‘s OK to be NULL. Signed-off-by: Zhu Lingshan --- include/linux/vdpa.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 03aa9f77

Re: [PATCH][next] dmaengine: Use fallthrough pseudo-keyword

2020-08-05 Thread Vinod Koul
On 27-07-20, 15:34, Gustavo A. R. Silva wrote: > diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c > index 2c508ee672b9..9b69716172a4 100644 > --- a/drivers/dma/pl330.c > +++ b/drivers/dma/pl330.c > @@ -1061,16 +1061,16 @@ static bool _start(struct pl330_thread *thrd) > > if (

Re: WARNING: refcount bug in l2cap_global_chan_by_psm

2020-08-05 Thread syzbot
syzbot has bisected this issue to: commit 3c1e300966d7edc380e405b3ab70b6e3c813a121 Author: Mauro Carvalho Chehab Date: Tue Oct 18 19:44:12 2016 + [media] si4713: don't break long lines bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=108f400290 start commit: c0842fbc

[PATCH v4 bpf-next] bpf/selftests: fold test_current_pid_tgid_new_ns into test_progs.

2020-08-05 Thread Carlos Neira
Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs. This change folds a test case into test_progs. Changes from V3: - STAT(2) check changed from CHECK_FAIL to CHECK. - Changed uses of _open_ to _open_and_load. - Fixed error codes were not being returned on exit. - Remove

INFO: trying to register non-static key in l2cap_chan_del

2020-08-05 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:442489c2 Merge tag 'timers-core-2020-08-04' of git://git.k.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15aa949490 kernel config: https://syzkaller.appspot.com/x/.config?x=669b4bedb6478222 das

[PATCH 1/3] hso: fix bailout in error case of probe

2020-08-05 Thread Oliver Neukum
The driver tries to reuse code for disconnect in case of a failed probe. If resources need to be freed after an error in probe, the netdev must not be freed because it has never been registered. Fix it by telling the helper which path we are in. Signed-off-by: Oliver Neukum --- drivers/net/usb/h

Re: [RFC PATCH bpf-next 0/3] Add a new bpf helper for FDB lookup

2020-08-05 Thread David Ahern
On 8/5/20 4:26 AM, Yoshiki Komachi wrote: >> >> Just to clarify for myself. I expect that with just the helpers here >> we should only expect static configurations to work, e.g. any learning >> and/or aging is not likely to work if we do redirects in the XDP path. > > As you described above, learn

Re: [RFC PATCH bpf-next 2/3] bpf: Add helper to do forwarding lookups in kernel FDB table

2020-08-05 Thread David Ahern
On 8/4/20 5:27 AM, Yoshiki Komachi wrote: > > I guess that no build errors will occur because the API is allowed when > CONFIG_BRIDGE is enabled. > > I successfully build my kernel applying this patch, and I don’t receive any > messages from build robots for now. If CONFIG_BRIDGE is a module, bu

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Linus Torvalds
On Wed, Aug 5, 2020 at 8:44 AM Marc Plumb wrote: > > I thought net_rand_state was assumed to be insecure and that anyone > could determine the internal state. Isn't this Working as Designed? I was working as designed - because it wasn't really designed to be "real crypto" - but sadly it's also th

[RFC 0/4] netlink: binary attribute range validation

2020-08-05 Thread Johannes Berg
Hi, This is something I'd been thinking about for a while; we already have NLA_MIN_LEN, NLA_BINARY (with a max len), and NLA_EXACT_LEN, but in quite a few places (as you can see in the last patch here) we need a range, and we already have a way to encode ranges for integer ranges, so it's pretty e

[PATCH 2/2] net: tls: allow MSG_CMSG_COMPAT in sendmsg

2020-08-05 Thread Rouven Czerwinski
The MSG_CMSG_COMPAT flag is valid if the system has CONFIG_COMPAT enabled and a 32bit userspace. Signed-off-by: Rouven Czerwinski --- net/tls/tls_sw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 24f64bc0de18..a332ae123bda 100644

Re: Flaw in "random32: update the net random state on interrupt and activity"

2020-08-05 Thread Willy Tarreau
Hi Mark, On Wed, Aug 05, 2020 at 09:06:40AM -0700, Marc Plumb wrote: > Just because you or I don't have a working exploit doesn't mean that someone > else isn't more clever. I agree on the principle, but it can be said from many things, including our respective inability to factor large numbers f

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

2020-08-05 Thread David Ahern
On 8/5/20 5:03 AM, Ying Xue wrote: >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >> index 840bfdb..857d6f9 100644 >> --- a/net/ipv6/addrconf.c >> +++ b/net/ipv6/addrconf.c >> @@ -1983,6 +1983,45 @@ int ipv6_chk_prefix(const struct in6_addr *addr, >> struct net_device *dev) >> } >> EX

[RFC 2/4] netlink: consistently use NLA_POLICY_MIN_LEN()

2020-08-05 Thread Johannes Berg
From: Johannes Berg Change places that open-code NLA_POLICY_MIN_LEN() to use the macro instead, giving us flexibility in how we handle the details of the macro. Signed-off-by: Johannes Berg --- drivers/net/macsec.c| 2 +- drivers/net/wireguard/netlink.c | 4 ++-- net/wireless/nl802

Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command

2020-08-05 Thread Jiri Pirko
Tue, Aug 04, 2020 at 10:39:46PM CEST, k...@kernel.org wrote: >On Tue, 4 Aug 2020 12:04:18 +0200 Jiri Pirko wrote: >> Mon, Aug 03, 2020 at 10:57:03PM CEST, k...@kernel.org wrote: >> >I was trying to avoid having to provide a Cartesian product of >> >operation and system disruption level, if any othe

Re: Question about TC filter

2020-08-05 Thread Jakub Kicinski
On Wed, 5 Aug 2020 11:08:08 +0530 satish dhote wrote: > Hi Team, > > I have a question regarding tc filter behavior. I tried to look > for the answer over the web and netdev FAQ but didn't get the > answer. Hence I'm looking for your help. > > I added ingress qdisc for interface enp0s25 and then

Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function

2020-08-05 Thread Kurt Kanzenbach
On Wed Aug 05 2020, Grygorii Strashko wrote: > I really do not want touch netcp, sry. > There are other internal code based on this even if there is only one hooks > in LKML now. > + my comment above. OK, I see. The use of lists makes more sense now. > > I'll try use skb_reset_mac_header(skb); >

Re: linux-next: build failure after merge of the net-next tree

2020-08-05 Thread Heiko Carstens
On Wed, Aug 05, 2020 at 03:06:27PM +0200, Stefano Brivio wrote: > On Wed, 5 Aug 2020 22:31:21 +1000 > Stephen Rothwell wrote: > > > Hi all, > > > > After merging the net-next tree, today's linux-next build (s390 defconfig) > > failed like this: > > > > net/ipv4/ip_tunnel_core.c:335:2: error: im

[RFC 3/4] netlink: make NLA_BINARY validation more flexible

2020-08-05 Thread Johannes Berg
From: Johannes Berg Add range validation for NLA_BINARY, allowing validation of any combination of combination minimum or maximum lengths, using the existing NLA_POLICY_RANGE()/NLA_POLICY_FULL_RANGE() macros, just like for integers where the value is checked. Also make NLA_POLICY_EXACT_LEN(), NL

Re: [PATCH] soc: qmi: allow user to set handle wq to hiprio

2020-08-05 Thread Alex Elder
On 8/2/20 8:14 AM, 王文虎 wrote: > >>> Currently the qmi_handle is initialized single threaded and strictly >>> ordered with the active set to 1. This is pretty simple and safe but >>> sometimes ineffency. So it is better to allow user to decide whether >>> a high priority workqueue should be used. >

[RFC 4/4] nl80211: use NLA_POLICY_RANGE(NLA_BINARY, ...) for a few attributes

2020-08-05 Thread Johannes Berg
From: Johannes Berg We have a few attributes with minimum and maximum lengths that are not the same, use the new feature of being able to specify both in the policy to validate them, removing code and allowing this to be advertised to userspace in the policy export. Signed-off-by: Johannes Berg

Re: [PATCH v2] kprobes: fix NULL pointer dereference at kprobe_ftrace_handler

2020-08-05 Thread Steven Rostedt
On Thu, 6 Aug 2020 00:27:13 +0800 Muchun Song wrote: > We found a case of kernel panic on our server. The stack trace is as > follows(omit some irrelevant information): > > BUG: kernel NULL pointer dereference, address: 0080 > RIP: 0010:kprobe_ftrace_handler+0x5e/0xe0 > RSP: 0

Re: linux-next: build failure after merge of the net-next tree

2020-08-05 Thread Stefano Brivio
On Wed, 5 Aug 2020 15:21:44 +0200 Heiko Carstens wrote: > On Wed, Aug 05, 2020 at 03:06:27PM +0200, Stefano Brivio wrote: > > On Wed, 5 Aug 2020 22:31:21 +1000 > > Stephen Rothwell wrote: > > > > > Hi all, > > > > > > After merging the net-next tree, today's linux-next build (s390 defconfig)

[RFC 1/4] netlink: consistently use NLA_POLICY_EXACT_LEN()

2020-08-05 Thread Johannes Berg
From: Johannes Berg Change places that open-code NLA_POLICY_EXACT_LEN() to use the macro instead, giving us flexibility in how we handle the details of the macro. Signed-off-by: Johannes Berg --- drivers/net/wireguard/netlink.c | 10 +- net/bridge/br_netlink.c | 4 ++-- net/br

Re: [PATCH net-next v2 2/6] tunnels: PMTU discovery support for directly bridged IP packets

2020-08-05 Thread Naresh Kamboju
cmp6hdr) { > + .icmp6_type = ICMPV6_PKT_TOOBIG, > + .icmp6_code = 0, > + .icmp6_cksum = 0, > + .icmp6_mtu = htonl(mtu), > + }; > + skb_reset_transport_header(skb); >

Re: [PATCH net-next v2 2/6] tunnels: PMTU discovery support for directly bridged IP packets

2020-08-05 Thread Stefano Brivio
Hi Naresh, On Wed, 5 Aug 2020 22:24:03 +0530 Naresh Kamboju wrote: > On Tue, 4 Aug 2020 at 11:24, Stefano Brivio wrote: > > > > + icmp6h->icmp6_cksum = csum_ipv6_magic(&nip6h->saddr, &nip6h->daddr, > > len, > > + IPPROTO_ICMPV6, csum); > > Lin

Re: [External] Re: [PATCH v2] kprobes: fix NULL pointer dereference at kprobe_ftrace_handler

2020-08-05 Thread Steven Rostedt
On Thu, 6 Aug 2020 00:59:41 +0800 Muchun Song wrote: > > The original patch has already been pulled into the queue and tested. > > Please make a new patch that adds this update, as if your original > > patch has already been accepted. > > Will do, thanks! Also, if you can, add the following:

Re: [PATCH RESEND net-next] ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM

2020-08-05 Thread David Miller
From: Stefano Brivio Date: Wed, 5 Aug 2020 15:39:31 +0200 > On architectures defining _HAVE_ARCH_IPV6_CSUM, we get > csum_ipv6_magic() defined by means of arch checksum.h headers. On > other architectures, we actually need to include net/ip6_checksum.h > to be able to use it. > > Without this in

[PATCH v3 38/38] virtio_net: use LE accessors for speed/duplex

2020-08-05 Thread Michael S. Tsirkin
Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c| 9 + include/uapi/linux

Re: Packet not rerouting via different bridge interface after modifying destination IP in TC ingress hook

2020-08-05 Thread Andrew Lunn
On Wed, Aug 05, 2020 at 08:19:57AM +, Swarm NameRedacted wrote: > Hi, > > I am trying to build a quick script via TC direct action and eBPF to > modify the destination IP of a packet so that it is routed through a > different bridge interface. Made a quick network diagram below to > demonstrat

[PATCH v3 20/38] vhost/vdpa: switch to new helpers

2020-08-05 Thread Michael S. Tsirkin
For new helpers handling legacy features to be effective, vhost needs to invoke them. Tie them in. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vdpa.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 18869a35d408

Re: [PATCH net] selftests/net: relax cpu affinity requirement in msg_zerocopy test

2020-08-05 Thread David Miller
From: Willem de Bruijn Date: Wed, 5 Aug 2020 04:40:45 -0400 > From: Willem de Bruijn > > The msg_zerocopy test pins the sender and receiver threads to separate > cores to reduce variance between runs. > > But it hardcodes the cores and skips core 0, so it fails on machines > with the selected

Re: [PATCH net] mptcp: be careful on subflow creation

2020-08-05 Thread David Miller
From: Paolo Abeni Date: Tue, 4 Aug 2020 18:31:06 +0200 > Nicolas reported the following oops: ... > on some unconventional configuration. > > The MPTCP protocol is trying to create a subflow for an > unaccepted server socket. That is allowed by the RFC, even > if subflow creation will likely f

Re: [PATCH] net: dev: Add API to check net_dev readiness

2020-08-05 Thread Andrew Lunn
> > Well, until the user of this new API is ready, we will not accept the > > patch. > OK, but once we submit the change in the driver, is it good to go? No. You really do need to explain why it is needed, and why it is safe. > > You also need to explain "For HW performance reasons". Why is this

rtnl_trylock() versus SCHED_FIFO lockup

2020-08-05 Thread Rasmus Villemoes
Hi, We're seeing occasional lockups on an embedded board (running an -rt kernel), which I believe I've tracked down to the if (!rtnl_trylock()) return restart_syscall(); in net/bridge/br_sysfs_br.c. The problem is that some SCHED_FIFO task writes a "1" to the /sys

Re: [PATCH 0/2] selftests: rtnetlink: Fix for false-negative return values

2020-08-05 Thread David Miller
From: Po-Hsu Lin Date: Tue, 4 Aug 2020 18:18:01 +0800 > This patchset will address the false-negative return value issue > caused by the following: > 1. The return value "ret" in this script will be reset to 0 from > the beginning of each sub-test in rtnetlink.sh, therefore this > rt

[PATCH] MAINTAINERS: update phylink/sfp keyword matching

2020-08-05 Thread Russell King
syzbot has revealed that the "phylink" keyword exists in non-phylink related contexts in the bluetooth stack. To avoid receiving inappropriate notifications, change the keyword matching regexp to something which avoids this, while still allowing changes to networking drivers that make use of phylin

Re: [PATCH] net: openvswitch: silence suspicious RCU usage warning

2020-08-05 Thread Eelco Chaudron
On 5 Aug 2020, at 9:19, xiangxia.m@gmail.com wrote: From: Tonghao Zhang ovs_flow_tbl_destroy always is called from RCU callback or error path. It is no need to check if rcu_read_lock or lockdep_ovsl_is_held was held. ovs_dp_cmd_fill_info always is called with ovs_mutex, So use the rcu_

Re: [PATCH net-next] net: dsa: sja1105: use detected device id instead of DT one on mismatch

2020-08-05 Thread David Miller
From: Vladimir Oltean Date: Mon, 3 Aug 2020 19:48:23 +0300 > Although we can detect the chip revision 100% at runtime, it is useful > to specify it in the device tree compatible string too, because > otherwise there would be no way to assess the correctness of device tree > bindings statically,

Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode

2020-08-05 Thread Anchal Agarwal
On Wed, Aug 05, 2020 at 09:31:13AM -0400, Boris Ostrovsky wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 8/4/20 7:42 PM, Anchal Agarwal wrote: > > >

Re: [PATCH net-next] ip_vti: Fix unused variable warning

2020-08-05 Thread David Miller
From: Steffen Klassert Date: Tue, 4 Aug 2020 07:53:10 +0200 > On Mon, Aug 03, 2020 at 03:13:49PM -0700, David Miller wrote: >> From: YueHaibing >> Date: Fri, 31 Jul 2020 14:49:52 +0800 >> >> > If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, >> > >> > net/ipv4/ip_vti.c:493:27: warning:

  1   2   >