[net] seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds

2020-06-02 Thread Ahmed Abdelsalam
The seg6_validate_srh() is used to validate SRH for three cases: case1: SRH of data-plane SRv6 packets to be processed by the Linux kernel. Case2: SRH of the netlink message received from user-space (iproute2) Case3: SRH injected into packets through setsockopt In case1, the SRH can be encoded i

Re: [PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap

2020-06-02 Thread Jason Wang
On 2020/6/3 下午2:34, Michael S. Tsirkin wrote: On Wed, Jun 03, 2020 at 12:18:44PM +0800, Jason Wang wrote: On 2020/6/2 下午9:31, Michael S. Tsirkin wrote: On Tue, Jun 02, 2020 at 02:49:38PM +0800, Jason Wang wrote: On 2020/6/2 下午12:56, Michael S. Tsirkin wrote: On Tue, Jun 02, 2020 at 03:22:49

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Jason Wang
On 2020/6/3 下午2:30, Michael S. Tsirkin wrote: On Wed, Jun 03, 2020 at 02:23:08PM +0800, Jason Wang wrote: BTW now I re-read it I don't understand __vhost_get_user_slow: static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq, void __us

Re: [PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap

2020-06-02 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 12:18:44PM +0800, Jason Wang wrote: > > On 2020/6/2 下午9:31, Michael S. Tsirkin wrote: > > On Tue, Jun 02, 2020 at 02:49:38PM +0800, Jason Wang wrote: > > > On 2020/6/2 下午12:56, Michael S. Tsirkin wrote: > > > > On Tue, Jun 02, 2020 at 03:22:49AM +0800, kbuild test robot wro

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread Jason Xing
On Wed, Jun 3, 2020 at 1:44 PM Eric Dumazet wrote: > > On Tue, Jun 2, 2020 at 10:05 PM Jason Xing wrote: > > > > Hi Eric, > > > > I'm still trying to understand what you're saying before. Would this > > be better as following: > > 1) discard the tcp_internal_pacing() function. > > 2) remove where

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 02:23:08PM +0800, Jason Wang wrote: > > > > BTW now I re-read it I don't understand __vhost_get_user_slow: > > > > > > static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq, > >void __user *addr, unsigned int > >

Re: [net-next 10/11] net/mlx5e: kTLS, Add kTLS RX resync support

2020-06-02 Thread Tariq Toukan
On 6/2/2020 9:27 PM, Jakub Kicinski wrote: On Tue, 2 Jun 2020 07:23:53 +0300 Boris Pismenny wrote: On 02/06/2020 1:12, Jakub Kicinski wrote: On Sun, 31 May 2020 15:06:28 +0300 Boris Pismenny wrote: On 30/05/2020 0:50, Jakub Kicinski wrote: IIUC every ooo packet causes a resync request i

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 05:18:49AM +0100, Al Viro wrote: > On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote: > > > > How widely do you hope to stretch the user_access areas, anyway? > > > > > > To have best performance for small packets like 64B, if possible, we want to > > disable STA

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Jason Wang
On 2020/6/3 下午1:46, Michael S. Tsirkin wrote: On Wed, Jun 03, 2020 at 01:18:54PM +0800, Jason Wang wrote: On 2020/6/3 下午12:18, Al Viro wrote: On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote: How widely do you hope to stretch the user_access areas, anyway? To have best performanc

[PATCH net-next 4/5] hinic: add support to identify physical device

2020-06-02 Thread Luo bin
add support to identify physical device by flashing an LED attached to it with ethtool -p cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 41 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 1 +

[PATCH net-next 1/5] hinic: add support to set and get pause params

2020-06-02 Thread Luo bin
add support to set pause params with ethtool -A and get pause params with ethtool -a. Also remove set_link_ksettings ops for VF and enable pause by default. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 100 +- .../net/ethernet/huawei/hinic/hinic_hw_d

[PATCH net-next 2/5] hinic: add support to set and get irq coalesce

2020-06-02 Thread Luo bin
add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 8 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 294 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.

[PATCH net-next 5/5] hinic: add support to get eeprom information

2020-06-02 Thread Luo bin
add support to get eeprom information from the plug-in module with ethtool -m cmd. Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 68 .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 4 + .../net/ethernet/huawei/hinic/hinic_port.c| 78

[PATCH net-next 3/5] hinic: add self test support

2020-06-02 Thread Luo bin
add support to excute internal and external loopback test with ethtool -t cmd. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 6 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 178 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 3 + .../net/

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-02 Thread Lu Fengqi
On Tue, Jun 02, 2020 at 03:17:18PM -0700, Alexei Starovoitov wrote: >On Tue, Jun 2, 2020 at 2:46 PM Brenden Blanco wrote: >> >> On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: >> > >> > Hello, >> > >> > I encountered a reproducible NULL pointer dereference using the mainline >> > kernel v5.7-rc

[PATCH net-next 0/5] hinic: add some ethtool ops support

2020-06-02 Thread Luo bin
patch #1: support to set and get pause params with "ethtool -A/a" cmd patch #2: support to set and get irq coalesce params with "ethtool -C/c" cmd patch #3: support to do self test with "ethtool -t" cmd patch #4: support to identify physical device with "ethtool -p" cmd patch #5

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-02 Thread Lu Fengqi
On Tue, Jun 02, 2020 at 02:46:41PM -0700, Brenden Blanco wrote: >On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: >> >> Hello, >> >> I encountered a reproducible NULL pointer dereference using the mainline >> kernel v5.7-rc7-44-g75caf310d16c(which also happened multiple times on >> 5.6.14). The m

Re: [bpf PATCH] bpf: sockmap, remove bucket->lock from sock_{hash|map}_free

2020-06-02 Thread Eric Dumazet
On 3/10/20 9:41 AM, John Fastabend wrote: > The bucket->lock is not needed in the sock_hash_free and sock_map_free > calls, in fact it is causing a splat due to being inside rcu block. > > > | BUG: sleeping function called from invalid context at net/core/sock.c:2935 > | in_atomic(): 1, irqs_d

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 01:43:20PM -0700, Linus Torvalds wrote: > On Tue, Jun 2, 2020 at 1:33 PM Michael S. Tsirkin wrote: > > > > Hmm are you sure we can drop it? access_ok is done in the context > > of the process. Access itself in the context of a kernel thread > > that borrows the same mm. IIU

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 01:18:54PM +0800, Jason Wang wrote: > > On 2020/6/3 下午12:18, Al Viro wrote: > > On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote: > > > > > > How widely do you hope to stretch the user_access areas, anyway? > > > > > > To have best performance for small packets

Re: [PATCH] net: can: remove "WITH Linux-syscall-note" from SPDX tag of C files

2020-06-02 Thread Masahiro Yamada
On Fri, Apr 3, 2020 at 11:35 PM Oliver Hartkopp wrote: > > > > On 03/04/2020 09.37, Masahiro Yamada wrote: > > The "WITH Linux-syscall-note" exception is intended for UAPI headers. > > > > See LICENSES/exceptions/Linux-syscall-note > > > > Signed-off-by: Masahiro Yamada > > Acked-by: Oliver Hartk

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 02:48:15AM +0100, Al Viro wrote: > On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: > > So vhost needs to poke at userspace *a lot* in a quick succession. It > > is thus benefitial to enable userspace access, do our thing, then > > disable. Except access_

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Jason Wang
On 2020/6/3 下午12:18, Al Viro wrote: On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote: How widely do you hope to stretch the user_access areas, anyway? To have best performance for small packets like 64B, if possible, we want to disable STAC not only for the metadata access done by

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 11:10:57PM +0100, Al Viro wrote: > On Tue, Jun 02, 2020 at 04:42:03PM -0400, Michael S. Tsirkin wrote: > > On Tue, Jun 02, 2020 at 05:30:48PM +0100, Al Viro wrote: > > > On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: > > > > So vhost needs to poke at use

[net-next] tipc: fix NULL pointer dereference in streaming

2020-06-02 Thread Tuong Lien
syzbot found the following crash: general protection fault, probably for non-canonical address 0xdc19: [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00c8-0x00cf] CPU: 1 PID: 7060 Comm: syz-executor394 Not tainted 5.7.0-rc6-syzkaller #0 Hardware

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread Jason Xing
Hi Eric, I'm still trying to understand what you're saying before. Would this be better as following: 1) discard the tcp_internal_pacing() function. 2) remove where the tcp_internal_pacing() is called in the __tcp_transmit_skb() function. If we do so, we could avoid 'too late to give up pacing'.

[Patch net v2] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
There are two kinds of memory leaks in genl_family_rcv_msg_dumpit(): 1. Before we call ops->start(), whenever an error happens, we forget to free the memory allocated in genl_family_rcv_msg_dumpit(). 2. When ops->start() fails, the 'info' has been already installed on the per socket control

Re: [Patch net] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
On Tue, Jun 2, 2020 at 8:30 PM Cong Wang wrote: > if (ops->start) { > - genl_lock(); > + if (!ctx->family->parallel_ops) > + genl_lock(); > rc = ops->start(cb); > - genl_unlock(); > + if (!ctx->fa

[PATCH net] crypto/chcr: error seen if CONFIG_CHELSIO_TLS_DEVICE isn't set

2020-06-02 Thread Rohit Maheshwari
cxgb4_uld_in_use() is used only by cxgb4_ktls_det_feature() which is under CONFIG_CHELSIO_TLS_DEVICE macro. Fixes: a3ac249a1ab5 ("cxgb4/chcr: Enable ktls settings at run time") Signed-off-by: Rohit Maheshwari --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Al Viro
On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote: > > How widely do you hope to stretch the user_access areas, anyway? > > > To have best performance for small packets like 64B, if possible, we want to > disable STAC not only for the metadata access done by vhost accessors but > also t

Re: [PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap

2020-06-02 Thread Jason Wang
On 2020/6/2 下午9:31, Michael S. Tsirkin wrote: On Tue, Jun 02, 2020 at 02:49:38PM +0800, Jason Wang wrote: On 2020/6/2 下午12:56, Michael S. Tsirkin wrote: On Tue, Jun 02, 2020 at 03:22:49AM +0800, kbuild test robot wrote: Hi Jason, I love your patch! Yet something to improve: [auto build tes

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Jason Wang
On 2020/6/3 上午9:48, Al Viro wrote: On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: So vhost needs to poke at userspace *a lot* in a quick succession. It is thus benefitial to enable userspace access, do our thing, then disable. Except access_ok has already been pre-validat

[ANNOUNCE] iproute2-5.7.0 release

2020-06-02 Thread Stephen Hemminger
The 5.7 kernel has been released, and the last patches have been applied to iproute2. As usual lots of small fixes, across many utilities. Several qdisc now have more parameters available. Devlink get most of the fixes. Download: https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.

[Patch net] genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Cong Wang
There are two kinds of memory leaks in genl_family_rcv_msg_dumpit(): 1. Before we call ops->start(), whenever an error happens, we forget to free the memory allocated in genl_family_rcv_msg_dumpit(). 2. When ops->start() fails, the 'info' has been already installed on the per socket control

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread Jason Xing
Thanks for reminding me. I will test the cases through using sch_fq. Jason On Wed, Jun 3, 2020 at 10:44 AM Eric Dumazet wrote: > > On Tue, Jun 2, 2020 at 7:42 PM Jason Xing wrote: > > > > I agree with you. The upstream has already dropped and optimized this > > part (commit 864e5c090749), so it

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread Jason Xing
I agree with you. The upstream has already dropped and optimized this part (commit 864e5c090749), so it would not happen like that. However the old kernels like LTS still have the problem which causes large-scale crashes on our thousands of machines after running for a long while. I will send the f

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-02 Thread Hangbin Liu
On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen wrote: > > The example in patch 2 is functional, but not a lot of effort > > has been made on performance optimisation. I did a simple test(pkt size 64) > > with pktgen. Here is the test result with BPF_MAP_TYPE_DEVMAP_HASH > > arrays

Re: [PATCH] net: genetlink: Fix memleak in genl_family_rcv_msg_dumpit()

2020-06-02 Thread Yuehaibing
On 2020/6/3 2:04, Cong Wang wrote: > On Mon, Jun 1, 2020 at 11:47 PM YueHaibing wrote: >> @@ -630,6 +625,9 @@ static int genl_family_rcv_msg_dumpit(const struct >> genl_family *family, >> err = __netlink_dump_start(net->genl_sock, skb, nlh, &c); >> } >> >> + genl_fam

Re: [net-next PATCH 5/5] net: dsa: rtl8366: Use top VLANs for default

2020-06-02 Thread DENG Qingfang
Hi Linus On Wed, Jun 3, 2020 at 4:55 AM Linus Walleij wrote: > > The RTL8366 DSA switches will not work unless we set > up a default VLAN for each port. We are currently using > e.g. VLAN 1..6 for a 5-port switch as default VLANs. > > This is not very helpful for users, move it to allocate > the

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread David Miller
From: Jason Xing Date: Wed, 3 Jun 2020 09:53:10 +0800 > I'm sorry that I didn't write enough clearly. We're running the > pristine 4.19.125 linux kernel (the latest LTS version) and have been > haunted by such an issue. This patch is high-important, I think. So > I'm going to resend this email wi

Re: [PATCH] tcp: fix TCP socks unreleased in BBR mode

2020-06-02 Thread Jason Xing
Hi Eric, I'm sorry that I didn't write enough clearly. We're running the pristine 4.19.125 linux kernel (the latest LTS version) and have been haunted by such an issue. This patch is high-important, I think. So I'm going to resend this email with the [patch 4.19] on the headline and cc Greg. Than

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Al Viro
On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: > So vhost needs to poke at userspace *a lot* in a quick succession. It > is thus benefitial to enable userspace access, do our thing, then > disable. Except access_ok has already been pre-validated with all the > relevant nospec

Re: [PATCH v3 bpf-next 1/3] bpf: switch BPF UAPI #define constants used from BPF program side to enums

2020-06-02 Thread Alexei Starovoitov
On Tue, Jun 2, 2020 at 4:21 PM Michael Forney wrote: > > On 2020-06-02, Alexei Starovoitov wrote: > > the enum definition of BPF_F_CTXLEN_MASK is certainly within standard. > > I don't think kernel should adjust its headers because some compiler > > is failing to understand C standard. > > This i

Re: [PATCH net-next v5 4/4] net: dp83869: Add RGMII internal delay configuration

2020-06-02 Thread Dan Murphy
Florian On 6/2/20 6:13 PM, Florian Fainelli wrote: On 6/2/2020 4:10 PM, Dan Murphy wrote: Florian On 6/2/20 5:33 PM, Florian Fainelli wrote: On 6/2/2020 9:45 AM, Dan Murphy wrote: Add RGMII internal delay configuration for Rx and Tx. Signed-off-by: Dan Murphy --- [snip] +   enum {   

Re: [RDMA RFC v6 00/16] Intel RDMA Driver Updates 2020-05-19

2020-06-02 Thread Jason Gunthorpe
On Tue, Jun 02, 2020 at 10:59:46PM +, Saleem, Shiraz wrote: > > Subject: Re: [RDMA RFC v6 00/16] Intel RDMA Driver Updates 2020-05-19 > > > > On Fri, May 29, 2020 at 03:21:05PM +, Saleem, Shiraz wrote: > > > > Subject: Re: [RDMA RFC v6 00/16] Intel RDMA Driver Updates > > > > 2020-05-19 >

Re: [PATCH net-next v5 4/4] net: dp83869: Add RGMII internal delay configuration

2020-06-02 Thread Dan Murphy
Florian On 6/2/20 6:18 PM, Dan Murphy wrote: Florian On 6/2/20 6:13 PM, Florian Fainelli wrote: On 6/2/2020 4:10 PM, Dan Murphy wrote: Florian On 6/2/20 5:33 PM, Florian Fainelli wrote: On 6/2/2020 9:45 AM, Dan Murphy wrote: Add RGMII internal delay configuration for Rx and Tx. Signed-of

Re: [PATCH v3 bpf-next 1/3] bpf: switch BPF UAPI #define constants used from BPF program side to enums

2020-06-02 Thread Michael Forney
On 2020-06-02, Alexei Starovoitov wrote: > the enum definition of BPF_F_CTXLEN_MASK is certainly within standard. > I don't think kernel should adjust its headers because some compiler > is failing to understand C standard. This is not true. See C11 6.7.2.2p2: "The expression that defines the val

Re: [PATCH net-next v5 4/4] net: dp83869: Add RGMII internal delay configuration

2020-06-02 Thread Florian Fainelli
On 6/2/2020 4:10 PM, Dan Murphy wrote: > Florian > > On 6/2/20 5:33 PM, Florian Fainelli wrote: >> >> On 6/2/2020 9:45 AM, Dan Murphy wrote: >>> Add RGMII internal delay configuration for Rx and Tx. >>> >>> Signed-off-by: Dan Murphy >>> --- >> [snip] >> >>> + >>>   enum { >>>   DP83869_POR

Re: [PATCH net-next v5 4/4] net: dp83869: Add RGMII internal delay configuration

2020-06-02 Thread Dan Murphy
Florian On 6/2/20 5:33 PM, Florian Fainelli wrote: On 6/2/2020 9:45 AM, Dan Murphy wrote: Add RGMII internal delay configuration for Rx and Tx. Signed-off-by: Dan Murphy --- [snip] + enum { DP83869_PORT_MIRRORING_KEEP, DP83869_PORT_MIRRORING_EN, @@ -108,6 +113,8 @@ enum

Re: [PATCH v3 bpf-next 1/3] bpf: switch BPF UAPI #define constants used from BPF program side to enums

2020-06-02 Thread Alexei Starovoitov
On Tue, Jun 02, 2020 at 02:40:52PM -0700, Michael Forney wrote: > On 2020-06-02, Alexei Starovoitov wrote: > > It's possible, but I'm not sure what it will fix. > > Your example is a bit misleading, since it's talking about B > > which doesn't have type specifier, whereas enums in bpf.h have ULL >

RE: [RDMA RFC v6 00/16] Intel RDMA Driver Updates 2020-05-19

2020-06-02 Thread Saleem, Shiraz
> Subject: Re: [RDMA RFC v6 00/16] Intel RDMA Driver Updates 2020-05-19 > > On Fri, May 29, 2020 at 03:21:05PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RDMA RFC v6 00/16] Intel RDMA Driver Updates > > > 2020-05-19 > > > > > > > [..] > > > > > > > > I'm looking on it and see static assi

Re: [PATCH net] net: mvpp2: Enable autoneg bypass for 1000BaseX/2500BaseX ports

2020-06-02 Thread Russell King - ARM Linux admin
On Fri, May 29, 2020 at 06:33:40PM +0200, Andrew Lunn wrote: > Given the current code, you cannot. Now we understand the > requirements, we can come up with some ideas how to do this properly. Okay, I've been a little quiet because of sorting out the ARM tree for merging with Linus (now done) and

Re: [net-next PATCH 1/5] net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag

2020-06-02 Thread David Miller
net-next is closed, sorry

Re: pull-request: bpf-next 2020-06-02

2020-06-02 Thread David Miller
From: Daniel Borkmann Date: Tue, 2 Jun 2020 22:40:51 +0200 > The following pull-request contains BPF _fixes-only_ for your > *net-next* tree. Pulled, thanks Daniel.

Re: [PATCH V1 net 0/2] Fix xdp in ena driver

2020-06-02 Thread David Miller
From: Jakub Kicinski Date: Tue, 2 Jun 2020 09:23:33 -0700 > On Tue, 2 Jun 2020 13:21:49 + same...@amazon.com wrote: >> From: Sameeh Jubran >> >> This patchset includes 2 XDP related bug fixes. > > Both of them have this problem > > Fixes tag: Fixes: cad451dd2427 ("net: ena: Implement XDP_

Re: [PATCH V1 net 0/2] Fix xdp in ena driver

2020-06-02 Thread David Miller
From: Date: Tue, 2 Jun 2020 13:21:49 + > From: Sameeh Jubran > > This patchset includes 2 XDP related bug fixes. Series applied and queued up for v5.6 -stable, thanks.

Re: [PATCH] net_failover: fixed rollback in net_failover_open()

2020-06-02 Thread David Miller
From: Vasily Averin Date: Tue, 2 Jun 2020 15:55:26 +0300 > found by smatch: > drivers/net/net_failover.c:65 net_failover_open() error: > we previously assumed 'primary_dev' could be null (see line 43) > > cc: sta...@vger.kernel.org > Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") >

Re: [PATCH net-next v5 4/4] net: dp83869: Add RGMII internal delay configuration

2020-06-02 Thread Florian Fainelli
On 6/2/2020 9:45 AM, Dan Murphy wrote: > Add RGMII internal delay configuration for Rx and Tx. > > Signed-off-by: Dan Murphy > --- [snip] > + > enum { > DP83869_PORT_MIRRORING_KEEP, > DP83869_PORT_MIRRORING_EN, > @@ -108,6 +113,8 @@ enum { > struct dp83869_private { > int

Re: [PATCH net] net/mlx5: Don't fail driver on failure to create debugfs

2020-06-02 Thread David Miller
Saeed, please pick this up.

Re: [PATCH] net: stmmac: Drop condition with no effect

2020-06-02 Thread David Miller
From: Aishwarya Ramakrishnan Date: Tue, 2 Jun 2020 16:14:04 +0530 > As the "else if" and "else" branch body are identical the > condition has no effect. So removing "else if" condition. > > Signed-off-by: Aishwarya Ramakrishnan I'm not applying these patches, the conditional tests serve as do

Re: [PATCH 13/15] aquantia: atlantic: use PCI_IRQ_ALL_TYPES where appropriate

2020-06-02 Thread David Miller
From: Piotr Stankiewicz Date: Tue, 2 Jun 2020 11:21:11 +0200 > Seeing as there is shorthand available to use when asking for any type > of interrupt, or any type of message signalled interrupt, leverage it. > > Signed-off-by: Piotr Stankiewicz > Reviewed-by: Andy Shevchenko Applied.

Re: [PATCH 12/15] amd-xgbe: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread David Miller
From: Piotr Stankiewicz Date: Tue, 2 Jun 2020 11:21:05 +0200 > Seeing as there is shorthand available to use when asking for any type > of interrupt, or any type of message signalled interrupt, leverage it. > > Signed-off-by: Piotr Stankiewicz > Reviewed-by: Andy Shevchenko Applied.

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-02 Thread Alexei Starovoitov
On Tue, Jun 2, 2020 at 2:46 PM Brenden Blanco wrote: > > On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: > > > > Hello, > > > > I encountered a reproducible NULL pointer dereference using the mainline > > kernel v5.7-rc7-44-g75caf310d16c(which also happened multiple times on > > 5.6.14). The ma

Re: [net 0/2] tipc: revert two patches

2020-06-02 Thread David Miller
From: Tuong Lien Date: Tue, 2 Jun 2020 11:46:39 +0700 > We revert two patches: > > tipc: Fix potential tipc_node refcnt leak in tipc_rcv > tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv > > which prevented TIPC encryption from working properly and caused kernel > panic. Series a

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Al Viro
On Tue, Jun 02, 2020 at 04:42:03PM -0400, Michael S. Tsirkin wrote: > On Tue, Jun 02, 2020 at 05:30:48PM +0100, Al Viro wrote: > > On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: > > > So vhost needs to poke at userspace *a lot* in a quick succession. It > > > is thus benefitia

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Al Viro
On Tue, Jun 02, 2020 at 08:41:38PM +, David Laight wrote: > In which case you need a 'user_access_begin' that takes the mm > as an additional parameter. What does any of that have to do with mm? Details, please.

Re: BUG: kernel NULL pointer dereference in __cgroup_bpf_run_filter_skb

2020-06-02 Thread Brenden Blanco
On Sat, May 30, 2020 at 12:51 AM Lu Fengqi wrote: > > Hello, > > I encountered a reproducible NULL pointer dereference using the mainline > kernel v5.7-rc7-44-g75caf310d16c(which also happened multiple times on > 5.6.14). The machine is installed with archlinux, used as a kubernetes > v1.18.3 node

Re: [PATCH v3 bpf-next 1/3] bpf: switch BPF UAPI #define constants used from BPF program side to enums

2020-06-02 Thread Michael Forney
On 2020-06-02, Alexei Starovoitov wrote: > It's possible, but I'm not sure what it will fix. > Your example is a bit misleading, since it's talking about B > which doesn't have type specifier, whereas enums in bpf.h have ULL > suffix where necessary. > And the one you pointed out BPF_F_CTXLEN_MASK

Fwd: Debugging DSA networking 5.4.42 kernel crash

2020-06-02 Thread Sriram Chadalavada
On OpenWRT 5.4.42 kernel on an imx6, I'm seeing a kernel crash when loading builtin modules of igb driver and mv88e6xxx driver over PCI bus. I've searched for the messages in the kernel code and Google but its all over the place. What does this backtrace mean? Modules linked in: [2.631594][

Re: [PATCH] ipv4: nexthop: Fix deadcode issue by performing a proper NULL check

2020-06-02 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 2 Jun 2020 10:23:09 +0300 > On 01/06/2020 21:06, David Miller wrote: >> From: patrickeigens...@gmail.com >> Date: Mon, 1 Jun 2020 13:12:01 +0200 >> >>> From: Patrick Eigensatz >>> >>> After allocating the spare nexthop group it should be tested for kzalloc(

Re: [PATCH v3 5/8] ath10k: use new taint_firmware_crashed()

2020-06-02 Thread Brian Norris
On Tue, May 26, 2020 at 7:58 AM Luis Chamberlain wrote: > > This makes use of the new taint_firmware_crashed() to help > annotate when firmware for device drivers crash. When firmware > crashes devices can sometimes become unresponsive, and recovery > sometimes requires a driver unload / reload an

[net-next PATCH 5/5] net: dsa: rtl8366: Use top VLANs for default

2020-06-02 Thread Linus Walleij
The RTL8366 DSA switches will not work unless we set up a default VLAN for each port. We are currently using e.g. VLAN 1..6 for a 5-port switch as default VLANs. This is not very helpful for users, move it to allocate the top VLANs for default instead, for example on RTL8366RB there are 16 VLANs s

[net-next PATCH 3/5] net: dsa: rtl8366: Split out default VLAN config

2020-06-02 Thread Linus Walleij
We loop over the ports to initialize the default VLAN and PVID for each port. As we need to reuse the code to reinitialize a single port, break out the function rtl8366_set_default_vlan_and_pvid(). Cc: DENG Qingfang Signed-off-by: Linus Walleij --- drivers/net/dsa/rtl8366.c | 70 +++

[net-next PATCH 4/5] net: dsa: rtl8366: VLAN 0 as disable tagging

2020-06-02 Thread Linus Walleij
The code in net/8021q/vlan.c, vlan_device_event() sets VLAN 0 for a VLAN-capable ethernet device when it comes up. Since the RTL8366 DSA switches must have a VLAN and PVID set up for any packets to come through we have already set up default VLAN for each port as part of bringing the switch online

[net-next PATCH 2/5] net: dsa: rtl8366rb: Support the CPU DSA tag

2020-06-02 Thread Linus Walleij
This activates the support to use the CPU tag to properly direct ingress traffic to the right port. After this e.g. ping works out-of-the-box with the RTL8366RB. Cc: DENG Qingfang Signed-off-by: Linus Walleij --- drivers/net/dsa/Kconfig | 1 + drivers/net/dsa/rtl8366rb.c | 31

[net-next PATCH 1/5] net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag

2020-06-02 Thread Linus Walleij
This implements the known parts of the Realtek 4 byte tag protocol version 0xA, as found in the RTL8366RB DSA switch. It is designated as protocol version 0xA as a different Realtek 4 byte tag format with protocol version 0x9 is known to exist in the Realtek RTL8306 chips. The tag and switch chip

Re: [PATCH bpf-next v4 1/3] sock: move sock_valbool_flag to header

2020-06-02 Thread Daniel Borkmann
On 6/2/20 9:51 PM, Dmitry Yakunin wrote: This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin Acked-by: Martin KaFai Lau bpf-next is currently closed due to merge window. Please resend once bpf-next opens back up in ~2 weeks from now. Feel free to check the status

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Linus Torvalds
On Tue, Jun 2, 2020 at 1:33 PM Michael S. Tsirkin wrote: > > Hmm are you sure we can drop it? access_ok is done in the context > of the process. Access itself in the context of a kernel thread > that borrows the same mm. IIUC if the process can be 32 bit > while the kernel is 64 bit, access_ok in

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 05:30:48PM +0100, Al Viro wrote: > On Tue, Jun 02, 2020 at 04:45:05AM -0400, Michael S. Tsirkin wrote: > > So vhost needs to poke at userspace *a lot* in a quick succession. It > > is thus benefitial to enable userspace access, do our thing, then > > disable. Except access_

pull-request: bpf-next 2020-06-02

2020-06-02 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF _fixes-only_ for your *net-next* tree. We've added 10 non-merge commits during the last 1 day(s) which contain a total of 15 files changed, 229 insertions(+), 74 deletions(-). The main changes are: 1) Several fixes to s390 BPF JIT e.g. fixing ke

RE: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread David Laight
From: Michael S. Tsirkin > Sent: 02 June 2020 21:33 > On Tue, Jun 02, 2020 at 10:18:09AM -0700, Linus Torvalds wrote: > > On Tue, Jun 2, 2020 at 9:33 AM Al Viro wrote: > > > > > > > > > > > It's not clear whether we need a new API, I think __uaccess_being() has > > > > the > > > > assumption that

Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()

2020-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2020 at 10:18:09AM -0700, Linus Torvalds wrote: > On Tue, Jun 2, 2020 at 9:33 AM Al Viro wrote: > > > > > > > > It's not clear whether we need a new API, I think __uaccess_being() has > > > the > > > assumption that the address has been validated by access_ok(). > > > > __uaccess_

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
On 02-06-2020 22:18, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 4:05 PM Victor Julien wrote: >> >> On 02-06-2020 21:38, Willem de Bruijn wrote: >>> On Tue, Jun 2, 2020 at 3:22 PM Victor Julien wrote: On 02-06-2020 21:03, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 2:31 PM

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Willem de Bruijn
On Tue, Jun 2, 2020 at 4:05 PM Victor Julien wrote: > > On 02-06-2020 21:38, Willem de Bruijn wrote: > > On Tue, Jun 2, 2020 at 3:22 PM Victor Julien wrote: > >> > >> On 02-06-2020 21:03, Willem de Bruijn wrote: > >>> On Tue, Jun 2, 2020 at 2:31 PM Victor Julien wrote: > On 02-06-2020 19:37

Fw: [Bug 208033] New: r8169 wake-on-lan (WOL) works only after a manual suspend/resume cycle

2020-06-02 Thread Stephen Hemminger
Begin forwarded message: Date: Tue, 02 Jun 2020 19:12:51 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 208033] New: r8169 wake-on-lan (WOL) works only after a manual suspend/resume cycle https://bugzilla.kernel.org/show_bug.cgi?id=208033

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
On 02-06-2020 21:38, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 3:22 PM Victor Julien wrote: >> >> On 02-06-2020 21:03, Willem de Bruijn wrote: >>> On Tue, Jun 2, 2020 at 2:31 PM Victor Julien wrote: On 02-06-2020 19:37, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 1:03 PM Vict

[PATCH bpf-next v4 3/3] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt

2020-06-02 Thread Dmitry Yakunin
This patch adds support of SO_KEEPALIVE flag and TCP related options to bpf_setsockopt() routine. This is helpful if we want to enable or tune TCP keepalive for applications which don't do it in the userspace code. v2: - update kernel-doc (Nikita Vetoshkin ) Signed-off-by: Dmitry Yakunin Acked

[PATCH bpf-next v4 2/3] tcp: expose tcp_sock_set_keepidle_locked

2020-06-02 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. v2: - remove redundant EXPORT_SYMBOL (Alexei Starovoitov) Signed-off-by: Dmitry Yakunin --- include/linux/tcp.h | 1 + net/ipv4/tcp.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/tcp.h b/include/

[PATCH bpf-next v4 1/3] sock: move sock_valbool_flag to header

2020-06-02 Thread Dmitry Yakunin
This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin Acked-by: Martin KaFai Lau --- include/net/sock.h | 9 + net/core/sock.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index c53cc42.

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
On 02-06-2020 21:29, Jakub Kicinski wrote: > On Tue, 2 Jun 2020 21:22:11 +0200 Victor Julien wrote: >> - receiver uses nfp (netronome) driver: TP_STATUS_CSUM_VALID set for >> every packet, including the bad TCP ones >> - receiver uses ixgbe driver: TP_STATUS_CSUM_VALID not set for the bad >> packet

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Willem de Bruijn
On Tue, Jun 2, 2020 at 3:22 PM Victor Julien wrote: > > On 02-06-2020 21:03, Willem de Bruijn wrote: > > On Tue, Jun 2, 2020 at 2:31 PM Victor Julien wrote: > >> On 02-06-2020 19:37, Willem de Bruijn wrote: > >>> On Tue, Jun 2, 2020 at 1:03 PM Victor Julien wrote: > > On 02-06-2020 16:

Re: [RFC PATCH net-next 0/8] Expose devlink port attributes

2020-06-02 Thread Jakub Kicinski
On Tue, 2 Jun 2020 14:31:11 +0300 Danielle Ratson wrote: > Currently, user has no way of knowing if a port can be split and into > how many ports. > > Among other things, it is currently impossible to write generic tests > for port split. > > In order to be able to expose the information regardi

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Jakub Kicinski
On Tue, 2 Jun 2020 21:22:11 +0200 Victor Julien wrote: > - receiver uses nfp (netronome) driver: TP_STATUS_CSUM_VALID set for > every packet, including the bad TCP ones > - receiver uses ixgbe driver: TP_STATUS_CSUM_VALID not set for the bad > packets. > > Again purely based on 'git grep' it seems

Re: [PATCH net] net/mlx5: Don't fail driver on failure to create debugfs

2020-06-02 Thread Nathan Chancellor
On Tue, Jun 02, 2020 at 03:28:37PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Clang warns: > > drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:6: warning: variable > 'err' is used uninitialized whenever 'if' condition is true > [-Wsometimes-uninitialized] > if (!priv->

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Victor Julien
On 02-06-2020 21:03, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 2:31 PM Victor Julien wrote: >> On 02-06-2020 19:37, Willem de Bruijn wrote: >>> On Tue, Jun 2, 2020 at 1:03 PM Victor Julien wrote: On 02-06-2020 16:29, Willem de Bruijn wrote: > On Tue, Jun 2, 2020 at 4:05 AM Vi

Re: [RFC PATCH net 1/1] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-02 Thread Jakub Kicinski
On Tue, 2 Jun 2020 14:56:25 + Pooja Trivedi wrote: > This selftest tests for cases where sendfile's 'count' > parameter is provided with a size greater than the intended > file size. > > Motivation: When sendfile is provided with 'count' parameter > value that is greater than the size of the

Re: [PATCH v3 bpf-next 1/3] bpf: switch BPF UAPI #define constants used from BPF program side to enums

2020-06-02 Thread Alexei Starovoitov
On Mon, Jun 01, 2020 at 10:31:34PM -0700, Michael Forney wrote: > Hi, > > On 2020-03-04, Daniel Borkmann wrote: > > I was about to push the series out, but agree that there may be a risk for > > #ifndefs > > in the BPF C code. If we want to be on safe side, #define FOO FOO would be > > needed. >

Re: [PATCH net-next v2] af-packet: new flag to indicate all csums are good

2020-06-02 Thread Willem de Bruijn
On Tue, Jun 2, 2020 at 2:31 PM Victor Julien wrote: > > Hi Willem, > > On 02-06-2020 19:37, Willem de Bruijn wrote: > > On Tue, Jun 2, 2020 at 1:03 PM Victor Julien wrote: > >> > >> On 02-06-2020 16:29, Willem de Bruijn wrote: > >>> On Tue, Jun 2, 2020 at 4:05 AM Victor Julien wrote: > > >>

Re: [PATCH bpf-next] selftests/bpf: fix sample_cnt shared between two threads

2020-06-02 Thread Alexei Starovoitov
On Tue, Jun 2, 2020 at 9:22 AM Song Liu wrote: > > On Mon, Jun 1, 2020 at 10:04 PM Andrii Nakryiko wrote: > > > > Make sample_cnt volatile to fix possible selftests failure due to compiler > > optimization preventing latest sample_cnt value to be visible to main > > thread. > > sample_cnt is inc

Re: [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room

2020-06-02 Thread Alexei Starovoitov
On Tue, Jun 2, 2020 at 7:58 AM Daniel Borkmann wrote: > > This series fixes an issue originally reported by Lorenz Bauer where using > the bpf_skb_adjust_room() helper hid a checksum bug since it wasn't adjusting > CHECKSUM_UNNECESSARY's skb->csum_level after decap. The fix is two-fold: > i) We d

  1   2   3   >