Re: [EXT] [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running inside kdump kernel

2020-05-05 Thread Igor Russkikh
> #include > +#include > #include > #include > #include > @@ -574,13 +575,13 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, > __be16 proto, > #define RX_RING_SIZE ((u16)BIT(RX_RING_SIZE_POW)) > #define NUM_RX_BDS_MAX (RX_RING_SIZE - 1) > #define NUM_RX_BD

[PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'

2020-05-05 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link': net/smc/smc_llc.c:753:31: warning: variable 'del_llc' set but not used [-Wunused-but-set-variable] struct smc_llc_msg_del_link *del_llc; ^ net/smc/smc_llc.c: In

Re: [PATCH v2] net: ethernet: ti: Remove TI_CPTS_MOD workaround

2020-05-05 Thread Clay McClure
On Tue, May 05, 2020 at 10:41:26AM +0300, Grygorii Strashko wrote: > It's better if you send v2 not as reply to v1. Noted, thank you, and thank you for taking the time to review my patch. > just to clarify. After these two patches > - the PTP_1588_CLOCK can still be set to "M" > - which will c

[PATCH] netfilter: fix make target xt_TCPMSS.o error.

2020-05-05 Thread Huang Qijun
When compiling netfilter, there will be an error "No rule to make target 'net/netfilter/xt_TCPMSS.o'", because the xt_TCPMSS.c in the makefile is uppercase, and the file name of the source file (xt_tcpmss.c) is lowercase. Therefore, change the xt_TCPMSS.c name in the makefile to all lowercase. Sig

Re: [PATCH net-next v2 20/33] vhost_net: also populate XDP frame size

2020-05-05 Thread Jason Wang
On 2020/5/6 下午2:41, Jason Wang wrote: On 2020/4/30 下午7:22, Jesper Dangaard Brouer wrote: In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start) which contains the buffer length 'buflen' (with tailroom for skb_sh

[PATCH 2/2] sctp: implement memory accounting on rx path

2020-05-05 Thread ashwin-h
From: Xin Long commit 9dde27de3e5efa0d032f3c891a0ca833a0d31911 upstream. sk_forward_alloc's updating is also done on rx path, but to be consistent we change to use sk_mem_charge() in sctp_skb_set_owner_r(). In sctp_eat_data(), it's not enough to check sctp_memory_pressure only, which doesn't wo

[PATCH 0/2] Backport to 4.19 - sctp: fully support memory accounting

2020-05-05 Thread ashwin-h
Backport below upstream commits to 4.19 to address CVE-2019-3874. 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa sctp: implement memory accounting on tx path 9dde27de3e5efa0d032f3c891a0ca833a0d31911 sctp: implement memory accounting on rx path Xin Long (2): sctp: implement memory accounting on tx pat

Re: [PATCH 0/2] Backport to 4.19 - sctp: fully support memory accounting

2020-05-05 Thread Greg KH
On Wed, May 06, 2020 at 07:50:52PM +0530, ashwin-h wrote: > Backport below upstream commits to 4.19 to address CVE-2019-3874. > 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa > sctp: implement memory accounting on tx path > > 9dde27de3e5efa0d032f3c891a0ca833a0d31911 > sctp: implement memory accounting o

Re: [PATCH 1/2] sctp: implement memory accounting on tx path

2020-05-05 Thread Greg KH
On Wed, May 06, 2020 at 07:50:53PM +0530, ashwin-h wrote: > From: Xin Long > > commit 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa upstream. > > Now when sending packets, sk_mem_charge() and sk_mem_uncharge() have been > used to set sk_forward_alloc. We just need to call sk_wmem_schedule() to > chec

[PATCH 1/2] sctp: implement memory accounting on tx path

2020-05-05 Thread ashwin-h
From: Xin Long commit 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa upstream. Now when sending packets, sk_mem_charge() and sk_mem_uncharge() have been used to set sk_forward_alloc. We just need to call sk_wmem_schedule() to check if the allocated should be raised, and call sk_mem_reclaim() to check

Re: [PATCH 2/2] sctp: implement memory accounting on rx path

2020-05-05 Thread Greg KH
On Wed, May 06, 2020 at 07:50:54PM +0530, ashwin-h wrote: > From: Xin Long > > commit 9dde27de3e5efa0d032f3c891a0ca833a0d31911 upstream. > > sk_forward_alloc's updating is also done on rx path, but to be consistent > we change to use sk_mem_charge() in sctp_skb_set_owner_r(). > > In sctp_eat_da

Re: [PATCH 05/11] net: core: provide devm_register_netdev()

2020-05-05 Thread Bartosz Golaszewski
wt., 5 maj 2020 o 21:25 Edwin Peer napisał(a): > > + > > +static void devm_netdev_release(struct device *dev, void *this) > > +{ > > + struct netdevice_devres *res = this; > > + > > + unregister_netdev(res->ndev); > > +} > > + > > +/** > > + * devm_register_netdev - resource manage

Re: [PATCH net-next 20/33] vhost_net: also populate XDP frame size

2020-05-05 Thread Jason Wang
On 2020/4/30 下午5:54, Jesper Dangaard Brouer wrote: On Mon, 27 Apr 2020 13:50:15 +0800 Jason Wang wrote: On 2020/4/23 上午12:09, Jesper Dangaard Brouer wrote: In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start

Re: [PATCH net-next v2 20/33] vhost_net: also populate XDP frame size

2020-05-05 Thread Jason Wang
On 2020/4/30 下午7:22, Jesper Dangaard Brouer wrote: In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start) which contains the buffer length 'buflen' (with tailroom for skb_shared_info). Also storing this buflen in

Re: [PATCH bpf-next v2 20/20] tools/bpf: selftests: add bpf_iter selftests

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: > > The added test includes the following subtests: > - test verifier change for btf_id_or_null > - test load/create_iter/read for > ipv6_route/netlink/bpf_map/task/task_file > - test anon bpf iterator > - test anon bpf iterator read

Re: [PATCH 05/11] net: core: provide devm_register_netdev()

2020-05-05 Thread Bartosz Golaszewski
wt., 5 maj 2020 o 19:31 Jakub Kicinski napisał(a): > > On Tue, 5 May 2020 16:02:25 +0200 Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Provide devm_register_netdev() - a device resource managed variant > > of register_netdev(). This new helper will only work for net_device > >

Re: [PATCH net-next 21/33] virtio_net: add XDP frame size in two code paths

2020-05-05 Thread Jason Wang
On 2020/4/28 下午5:50, Jason Wang wrote: On 2020/4/27 下午10:32, Jesper Dangaard Brouer wrote: On Mon, 27 Apr 2020 15:21:02 +0800 Jason Wang wrote: On 2020/4/23 上午12:09, Jesper Dangaard Brouer wrote: The virtio_net driver is running inside the guest-OS. There are two XDP receive code-paths in

Re: Re: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change

2020-05-05 Thread SeongJae Park
On Tue, 05 May 2020 12:00:49 -0700 (PDT) David Miller wrote: > From: David Miller > Date: Tue, 05 May 2020 11:48:25 -0700 (PDT) > > > Series applied and queued up for -stable, thanks. > > Nevermind, this doesn't even compile. > > net/smc/af_smc.c: In function ‘smc_switch_to_fallback’: > net/

Re: [PATCH bpf-next v2 4/5] bpf: allow any port in bpf_bind helper

2020-05-05 Thread Martin KaFai Lau
On Tue, May 05, 2020 at 01:27:29PM -0700, Stanislav Fomichev wrote: > We want to have a tighter control on what ports we bind to in > the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means > connect() becomes slightly more expensive. The expensive part > comes from the fact that we now need to cal

[PATCH 12/15] maccess: always use strict semantics for probe_kernel_read

2020-05-05 Thread Christoph Hellwig
Except for historical confusion in the kprobes/uprobes and bpf tracers there is no good reason to ever allow user memory accesses from probe_kernel_read. Make the tracers fall back to a probe_user_read if the probe_kernel_read falls to keep the core API clean. Signed-off-by: Christoph Hellwig --

[PATCH 10/15] maccess: unify the probe kernel arch hooks

2020-05-05 Thread Christoph Hellwig
Currently architectures have to override every routine that probes kernel memory, which includes a pure read and strcpy, both in strict and not strict variants. Just provide a single arch hooks instead to make sure all architectures cover all the cases. Signed-off-by: Christoph Hellwig --- arch

[PATCH 11/15] maccess: remove strncpy_from_unsafe

2020-05-05 Thread Christoph Hellwig
All three callers really should try the explicit kernel and user copies instead. One has already deprecated the somewhat dangerous either kernel or user address concept, the other two still need to follow up eventually. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 1 - ke

[PATCH 02/15] maccess: remove various unused weak aliases

2020-05-05 Thread Christoph Hellwig
maccess tends to define lots of underscore prefixed symbols that then have other weak aliases. But except for two cases they are never actually used, so remove them. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 3 --- mm/maccess.c| 19 +++ 2 files

Re: [PATCH] ath11k: Replace zero-length array with flexible-array

2020-05-05 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int

[PATCH 15/15] x86: use non-set_fs based maccess routines

2020-05-05 Thread Christoph Hellwig
Provide arch_kernel_read and arch_kernel_write routines to implement the maccess routines without messing with set_fs and without stac/clac that opens up access to user space. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/uaccess.h | 16 1 file changed, 16 insertions

[PATCH 07/15] maccess: rename strncpy_from_unsafe_strict to strncpy_from_kernel_unsafe

2020-05-05 Thread Christoph Hellwig
This matches the convention of always having _unsafe as a suffix, as well as match the naming of strncpy_from_user_unsafe. Signed-off-by: Christoph Hellwig --- arch/x86/mm/maccess.c| 2 +- include/linux/uaccess.h | 2 +- kernel/trace/bpf_trace.c | 2 +- mm/maccess.c | 6 +++---

[PATCH 03/15] maccess: remove duplicate kerneldoc commens

2020-05-05 Thread Christoph Hellwig
Many of the maccess routines have a copy of the kerneldoc comment in the header. Remove it as it is not useful and will get out of sync sooner or later. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 38 -- 1 file changed, 38 deletions(-) dif

[PATCH 06/15] maccess: rename strncpy_from_unsafe_user to strncpy_from_user_unsafe

2020-05-05 Thread Christoph Hellwig
This matches the convention of always having _unsafe as a suffix, as well as match the naming of strncpy_from_user. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 2 +- kernel/trace/bpf_trace.c| 2 +- kernel/trace/trace_kprobe.c | 2 +- mm/maccess.c| 4 ++-

[PATCH 04/15] maccess: clarify kerneldoc comments

2020-05-05 Thread Christoph Hellwig
Add proper kerneldoc comments for probe_kernel_read_strict and probe_kernel_read strncpy_from_unsafe_strict and explain the different versus the non-strict version. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 61 1 file changed, 43 ins

[PATCH 05/15] maccess: update the top of file comment

2020-05-05 Thread Christoph Hellwig
This file now also contains several helpers for accessing user memory. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/maccess.c b/mm/maccess.c index 747581ac50dc9..65880ba2ca376 100644 --- a/mm/maccess.c +++ b/mm/maccess.c

[PATCH 08/15] maccess: rename strnlen_unsafe_user to strnlen_user_unsafe

2020-05-05 Thread Christoph Hellwig
This matches the convention of always having _unsafe as a suffix, as well as match the naming of strncpy_from_user_unsafe. Signed-off-by: Christoph Hellwig --- include/linux/uaccess.h | 2 +- kernel/trace/trace_kprobe.c | 2 +- mm/maccess.c| 4 ++-- 3 files changed, 4 inserti

[PATCH 14/15] maccess: allow architectures to provide kernel probing directly

2020-05-05 Thread Christoph Hellwig
Provide alternative versions of probe_kernel_read, probe_kernel_write and strncpy_from_kernel_unsafe that don't need set_fs magic, but instead use arch hooks that are modelled after unsafe_{get,put}_user to access kernel memory in an exception safe way. Signed-off-by: Christoph Hellwig --- mm/ma

[PATCH 13/15] maccess: move user access routines together

2020-05-05 Thread Christoph Hellwig
Move kernel access vs user access routines together to ease upcoming ifdefs. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 110 +-- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/mm/maccess.c b/mm/maccess.c index 811f49e8de11

[PATCH 01/15] maccess: unexport probe_kernel_write and probe_user_write

2020-05-05 Thread Christoph Hellwig
These two functions are not used by any modular code. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/maccess.c b/mm/maccess.c index 3ca8d97e50106..cf21e604f78cb 100644 --- a/mm/maccess.c +++ b/mm/maccess.c @@ -121,7 +121,6 @@ long __prob

[PATCH 09/15] maccess: remove probe_read_common and probe_write_common

2020-05-05 Thread Christoph Hellwig
Each of the helpers has just two callers, which also different in dealing with kernel or userspace pointers. Just open code the logic in the callers. Signed-off-by: Christoph Hellwig --- mm/maccess.c | 63 1 file changed, 29 insertions(+), 34

Re: [PATCH] ath6kl: Replace zero-length array with flexible-array

2020-05-05 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int

clean up and streamline probe_kernel_* and friends

2020-05-05 Thread Christoph Hellwig
Hi all, this series start cleaning up the safe kernel and user memory probing helpers in mm/maccess.c, and then allows architectures to implement the kernel probing without overriding the address space limit and temporarily allowing access to user memory. It then switches x86 over to this new mec

[PATCH -next] net: ethernet: mediatek: Make mtk_m32 static

2020-05-05 Thread Samuel Zou
Fix the following sparse warning: drivers/net/ethernet/mediatek/mtk_eth_soc.c:68:5: warning: symbol 'mtk_m32' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH net-next] i40e: Make i40e_shutdown_adminq() return void

2020-05-05 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded variable: "ret_code". Return "0" on line 710 Signed-off-by: Jason Yan --- drivers/net/ethernet/intel/i40e/i40e_adminq.c| 6 +- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 +-

[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-05 Thread Jason Wang
We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the header and there's no way for XDP to know the existence of the vnet header currently. So let's just not reserve spa

[PATCH net-next] net: mlx4: remove unneeded variable "err" in mlx4_en_get_rxfh()

2020-05-05 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/ethernet/mellanox/mlx4/en_ethtool.c:1238:5-8: Unneeded variable: "err". Return "0" on line 1252 Signed-off-by: Jason Yan --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dr

[PATCH net-next] net: bridge: return false in br_mrp_enabled()

2020-05-05 Thread Jason Yan
Fix the following coccicheck warning: net/bridge/br_private.h:1334:8-9: WARNING: return of 0/1 in function 'br_mrp_enabled' with return type bool Signed-off-by: Jason Yan --- net/bridge/br_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_private.h b/ne

[PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-05 Thread Jason Wang
We should not exclude headroom and tailroom when XDP is set. So this patch fixes this by initializing the truesize from PAGE_SIZE when XDP is set. Cc: Jesper Dangaard Brouer Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

Re: [PATCH bpf-next v2 19/20] tools/bpf: selftests: add iter progs for bpf_map/task/task_file

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:27 PM Yonghong Song wrote: > > The implementation is arbitrary, just to show how the bpf programs > can be written for bpf_map/task/task_file. They can be costomized > for specific needs. > > For example, for bpf_map, the iterator prints out: > $ cat /sys/fs/bpf/my_bpf_

Re: [v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-05 Thread Markus Elfring
> I'm curious if I could still modify these commit message information for the > v1 patch, > which has already been applied and queued up? The maintainer found the provided information good enough. Thus he committed the software correction with the subject “nfp: abm: fix a memory leak bug” on 202

[PATCH net-next] net: cortina: Fix use correct return type for ndo_start_xmit()

2020-05-05 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/cortina/gemini.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cor

Re: [PATCH bpf-next v2 18/20] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote: > > Two bpf programs are added in this patch for netlink and ipv6_route > target. On my VM, I am able to achieve identical > results compared to /proc/net/netlink and /proc/net/ipv6_route. > > $ cat /proc/net/netlink > sk Eth P

Re: [PATCH bpf-next v2 18/20] tools/bpf: selftests: add iterator programs for ipv6_route and netlink

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote: > > Two bpf programs are added in this patch for netlink and ipv6_route > target. On my VM, I am able to achieve identical > results compared to /proc/net/netlink and /proc/net/ipv6_route. > > $ cat /proc/net/netlink > sk Eth P

Re: [PATCH bpf-next v2 16/20] tools/libbpf: add bpf_iter support

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:27 PM Yonghong Song wrote: > > Two new libbpf APIs are added to support bpf_iter: > - bpf_program__attach_iter > Given a bpf program and additional parameters, which is > none now, returns a bpf_link. > - bpf_iter_create > syscall level API to create a bpf

Re: [PATCH] virtio_net: fix lockdep warning on 32 bit

2020-05-05 Thread Jason Wang
On 2020/5/6 上午8:01, Michael S. Tsirkin wrote: When we fill up a receive VQ, try_fill_recv currently tries to count kicks using a 64 bit stats counter. Turns out, on a 32 bit kernel that uses a seqcount. sequence counts are "lock" constructs where you need to make sure that writers are serialize

Re: [Patch net] net: fix a potential recursive NETDEV_FEAT_CHANGE

2020-05-05 Thread Michal Kubecek
On Tue, May 05, 2020 at 03:35:27PM -0700, Cong Wang wrote: > On Tue, May 5, 2020 at 3:27 PM Michal Kubecek wrote: > > On Tue, May 05, 2020 at 02:58:19PM -0700, Cong Wang wrote: > > > diff --git a/net/core/dev.c b/net/core/dev.c > > > index 522288177bbd..ece50ae346c3 100644 > > > --- a/net/core/dev

Re: [PATCH bpf-next v2 10/20] net: bpf: add netlink and ipv6_route bpf_iter targets

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:29 PM Yonghong Song wrote: > > This patch added netlink and ipv6_route targets, using > the same seq_ops (except show() and minor changes for stop()) > for /proc/net/{netlink,ipv6_route}. > > The net namespace for these targets are the current net > namespace at file open

Re: [PATCH net,v2] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-05 Thread Jiri Pirko
Tue, May 05, 2020 at 08:46:16PM CEST, k...@kernel.org wrote: >On Tue, 5 May 2020 20:36:43 +0200 Jiri Pirko wrote: >> Tue, May 05, 2020 at 07:47:36PM CEST, pa...@netfilter.org wrote: >> >This patch adds FLOW_ACTION_HW_STATS_DONT_CARE which tells the driver >> >that the frontend does not need counter

Re: [PATCH net v2 1/2] Revert "coallocate socket_wq with socket itself"

2020-05-05 Thread kbuild test robot
755f5738ff981769211a0bfac709d514ef5b9f86 config: x86_64-randconfig-g001-20200505 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 24b4965ce65b14ead595dcc68add22ba37533207) reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master

Re: [PATCH v1] dt-bindings: net: nxp,tja11xx: rework validation support

2020-05-05 Thread Oleksij Rempel
On Tue, May 05, 2020 at 04:01:27PM +0200, Andrew Lunn wrote: > On Tue, May 05, 2020 at 12:42:15PM +0200, Oleksij Rempel wrote: > > To properly identify this node, we need to use ethernet-phy-id0180.dc80. > > And add missing required properties. > > > > Signed-off-by: Oleksij Rempel > > --- > > .

Re: [PATCH bpf-next v2 09/20] bpf: add bpf_map iterator

2020-05-05 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:28 PM Yonghong Song wrote: > > Implement seq_file operations to traverse all maps. > > Signed-off-by: Yonghong Song > --- Looks great! Acked-by: Andrii Nakryiko > include/linux/bpf.h | 1 + > kernel/bpf/Makefile | 2 +- > kernel/bpf/map_iter.c | 107

Re: [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running inside kdump kernel

2020-05-05 Thread Bhupesh Sharma
Hi David, On Wed, May 6, 2020 at 2:54 AM David Miller wrote: > > From: Bhupesh Sharma > Date: Wed, 6 May 2020 00:34:40 +0530 > > > -#define NUM_RX_BDS_DEF ((u16)BIT(10) - 1) > > +#define NUM_RX_BDS_DEF ((is_kdump_kernel()) ? ((u16)BIT(6) - > > 1) : ((u16)BIT(10) - 1

Re: [PATCH net-next v3] net: phy: micrel: add phy-mode support for the KSZ9031 PHY

2020-05-05 Thread Oleksij Rempel
Hi Grygorii, On Tue, May 05, 2020 at 09:26:46PM +0300, Grygorii Strashko wrote: > > > On 22/04/2020 10:21, Oleksij Rempel wrote: > > Add support for following phy-modes: rgmii, rgmii-id, rgmii-txid, > > rgmii-rxid. > > > > This PHY has an internal RX delay of 1.2ns and no delay for TX. > > >

[PATCH 2/2] net: qrtr: Do not depend on ARCH_QCOM

2020-05-05 Thread Manivannan Sadhasivam
IPC Router protocol is also used by external modems for exchanging the QMI messages. Hence, it doesn't always depend on Qualcomm platforms. One such instance is the QCA6390 WLAN device connected to x86 machine. Reviewed-by: Bjorn Andersson Signed-off-by: Manivannan Sadhasivam --- net/qrtr/Kconf

[PATCH 1/2] net: qrtr: Add MHI transport layer

2020-05-05 Thread Manivannan Sadhasivam
MHI is the transport layer used for communicating to the external modems. Hence, this commit adds MHI transport layer support to QRTR for transferring the QMI messages over IPC Router. Reviewed-by: Bjorn Andersson Signed-off-by: Manivannan Sadhasivam --- net/qrtr/Kconfig | 7 +++ net/qrtr/Ma

RE: [PATCH net-next] enetc: Fix use after free in stream_filter_unref()

2020-05-05 Thread Po Liu
Hi Dan, > -Original Message- > From: Dan Carpenter > Sent: 2020年5月6日 4:47 > To: Claudiu Manoil ; Po Liu > Cc: David S. Miller ; netdev@vger.kernel.org; > kernel-janit...@vger.kernel.org > Subject: [PATCH net-next] enetc: Fix use after free in > stream_filter_unref() > > > This code fr

RE: [PATCH net-next 1/1] net: stmmac: Add option for VLAN filter fail queue enable

2020-05-05 Thread Wong, Vee Khee
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of David Miller > Sent: Friday, April 24, 2020 6:53 AM > To: Wong, Vee Khee > Cc: peppe.cavall...@st.com; alexandre.tor...@st.com; > joab...@synopsys.com; mcoquelin.st...@gmail.com; > netdev@vger.kernel.org; linux-st.

RE: [GIT PULL] vhost: fixes

2020-05-05 Thread Justin He
Hi Michael > -Original Message- > From: Michael S. Tsirkin > Sent: Monday, May 4, 2020 8:16 PM > To: Linus Torvalds > Cc: k...@vger.kernel.org; virtualizat...@lists.linux-foundation.org; > netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Justin He > ; ldi...@redhat.com; m...@redhat.

Re: [PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-05 Thread Joe Perches
On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote: > This silences the following coccinelle warning: > > "WARNING: sum of probable bitmasks, consider |" I suggest instead ignoring bad and irrelevant warnings. PREFIX_LEN is 32 not 0x20 or BIT(5) PCI_DUMP_SIZE is 352 > diff --git a/drivers/net/

Re: WARNING: proc registration bug in snmp6_register_dev

2020-05-05 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:ac935d22 Add linux-next specific files for 20200415 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17006f4c10 kernel config: https://syzkaller.appspot.com/x/.config?x=bc498783097e90

Re: [PATCH bpf-next v2 03/20] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-05 Thread Andrii Nakryiko
On Tue, May 5, 2020 at 5:54 PM Alexei Starovoitov wrote: > > On 5/5/20 5:14 PM, Yonghong Song wrote: > > > > > > On 5/5/20 2:30 PM, Andrii Nakryiko wrote: > >> On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: > >>> > >>> Given a bpf program, the step to create an anonymous bpf iterator is: >

[PATCH -next] iwlwifi: pcie: Use bitwise instead of arithmetic operator for flags

2020-05-05 Thread Samuel Zou
This silences the following coccinelle warning: "WARNING: sum of probable bitmasks, consider |" Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/i

Re: [PATCH] net: bareudp: avoid uninitialized variable warning

2020-05-05 Thread Nathan Chancellor
On Tue, May 05, 2020 at 07:22:14PM +0200, Arnd Bergmann wrote: > clang points out that building without IPv6 would lead to returning > an uninitialized variable if a packet with family!=AF_INET is > passed into bareudp_udp_encap_recv(): > > drivers/net/bareudp.c:139:6: error: variable 'err' is use

[PATCH -next] net: ethernet: ti: Use PTR_ERR_OR_ZERO() to simplify code

2020-05-05 Thread Samuel Zou
Fixes coccicheck warning: drivers/net/ethernet/ti/am65-cpts.c:1017:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/net/ethernet/ti/am65-cpts.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/t

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Eric Dumazet
On 5/5/20 6:25 PM, Michael S. Tsirkin wrote: > On Tue, May 05, 2020 at 06:19:09PM -0700, Eric Dumazet wrote: >> >> >> On 5/5/20 5:43 PM, Michael S. Tsirkin wrote: >>> On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumazet wrote: On 5/5/20 3:30 PM, Thomas Gleixner wrote: > "Mic

Re: cgroup pointed by sock is leaked on mode switch

2020-05-05 Thread Zefan Li
On 2020/5/6 9:50, Yang Yingliang wrotee: +cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is increasing: linux-dVpNUK:~ # find /sys/fs/cgroup/ -name cgroup.stat -exec g

[PATCH v2 3/3] net/mlx5e: Fix the code style

2020-05-05 Thread xiangxia . m . yue
From: Tonghao Zhang Signed-off-by: Tonghao Zhang Reviewed-by: Roi Dayan --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

[PATCH v2 2/3] net/mlx5e: Introduce mlx5e_rep_uplink_priv helper

2020-05-05 Thread xiangxia . m . yue
From: Tonghao Zhang Introduce the mlx5e_rep_uplink_priv helper to make the codes more readable. Signed-off-by: Tonghao Zhang --- v2: * change the name mlx5e_eswitch_rep_uplink_priv to mlx5e_rep_uplink_priv --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +-- drivers/net/ethernet/me

[PATCH v2 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-05-05 Thread xiangxia . m . yue
From: Tonghao Zhang The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with goto action"), will decapsulate the tunnel packets if there is a goto action in chain 0. But in some case, we don't want do that, for example: $ tc filter add dev $VXLAN protocol ip parent : prio 1 cha

Re: cgroup pointed by sock is leaked on mode switch

2020-05-05 Thread Yang Yingliang
+cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is increasing: linux-dVpNUK:~ # find /sys/fs/cgroup/ -name cgroup.stat -exec grep '^nr_dying_descendants [^0]'  {} + /sy

Re: INFO: task hung in linkwatch_event (2)

2020-05-05 Thread Yunsheng Lin
On 2020/4/29 17:59, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:b4f63322 Merge branch 'for-linus' of git://git.kernel.org/.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1558936fe0 > kernel config: https://syzk

Re: [PATCH 1/1] selftests/bpf: add cls_redirect classifier

2020-05-05 Thread Alexei Starovoitov
On Tue, May 5, 2020 at 6:37 AM Daniel Borkmann wrote: > > On 5/5/20 1:48 AM, Alexei Starovoitov wrote: > > On Sat, May 02, 2020 at 01:48:51AM +0200, Daniel Borkmann wrote: > >> On 4/27/20 11:45 AM, Lorenz Bauer wrote: > >>> On Sun, 26 Apr 2020 at 18:33, Alexei Starovoitov > >>> wrote: > >> [...]

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 06:19:09PM -0700, Eric Dumazet wrote: > > > On 5/5/20 5:43 PM, Michael S. Tsirkin wrote: > > On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumazet wrote: > >> > >> > >> On 5/5/20 3:30 PM, Thomas Gleixner wrote: > >>> "Michael S. Tsirkin" writes: > On Tue, May 05, 20

Re: [RFC PATCH bpf-next 0/3] bpf: add tracing for XDP programs using the BPF_PROG_TEST_RUN API

2020-05-05 Thread Alexei Starovoitov
On Thu, Apr 30, 2020 at 7:44 PM Masami Hiramatsu wrote: > > On Tue, 28 Apr 2020 09:19:47 -0300 > Arnaldo Carvalho de Melo wrote: > > > Em Tue, Apr 28, 2020 at 12:47:53PM +0200, Eelco Chaudron escreveu: > > > On 28 Apr 2020, at 6:04, Alexei Starovoitov wrote: > > > > On Fri, Apr 24, 2020 at 02:29:

Re: [PATCH net-next 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-05-05 Thread Tonghao Zhang
On Thu, Apr 30, 2020 at 11:26 PM Roi Dayan wrote: > > > > On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > > goto action"), will decapitate the tunnel packets if there is a goto > > acti

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Eric Dumazet
On 5/5/20 5:43 PM, Michael S. Tsirkin wrote: > On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumazet wrote: >> >> >> On 5/5/20 3:30 PM, Thomas Gleixner wrote: >>> "Michael S. Tsirkin" writes: On Tue, May 05, 2020 at 02:08:56PM +0200, Thomas Gleixner wrote: > > The following lockde

Re: [PATCH bpf-next v2 03/20] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-05 Thread Alexei Starovoitov
On 5/5/20 5:14 PM, Yonghong Song wrote: On 5/5/20 2:30 PM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: Given a bpf program, the step to create an anonymous bpf iterator is:    - create a bpf_iter_link, which combines bpf program and the target. In the fu

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumazet wrote: > > > On 5/5/20 3:30 PM, Thomas Gleixner wrote: > > "Michael S. Tsirkin" writes: > >> On Tue, May 05, 2020 at 02:08:56PM +0200, Thomas Gleixner wrote: > >>> > >>> The following lockdep splat happens reproducibly on 5.7-rc4 > >> > >>>

Re: [PATCH bpf-next v2 03/20] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-05 Thread Yonghong Song
On 5/5/20 2:30 PM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: Given a bpf program, the step to create an anonymous bpf iterator is: - create a bpf_iter_link, which combines bpf program and the target. In the future, there could be more information re

[PATCH][next] rndis_wlan: Remove logically dead code

2020-05-05 Thread Gustavo A. R. Silva
caps_buf is always of size sizeof(*caps) because sizeof(caps->auth_encr_pair) * 16 is always zero. Notice that when using zero-length arrays, sizeof evaluates to zero[1]. So, the code introduced by commit 0308383f9591 ("rndis_wlan: get max_num_pmkids from device") is logically dead, hence is neve

Re: [net-next PATCH v3 1/5] net: phy: Introduce phy related fwnode functions

2020-05-05 Thread kbuild test robot
Hi Calvin, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on linus/master v5.7-rc4 next-20200505] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use

Re: [PATCH bpf-next v2 02/20] bpf: allow loading of a bpf_iter program

2020-05-05 Thread Yonghong Song
On 5/5/20 2:29 PM, Andrii Nakryiko wrote: On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote: A bpf_iter program is a tracing program with attach type BPF_TRACE_ITER. The load attribute attach_btf_id is used by the verifier against a particular kernel function, which represents a target

[PATCH bpf-next 2/4] bpf, riscv: Optimize FROM_LE using verifier_zext on RV64

2020-05-05 Thread Luke Nelson
This patch adds two optimizations for BPF_ALU BPF_END BPF_FROM_LE in the RV64 BPF JIT. First, it enables the verifier zero-extension optimization to avoid zero extension when imm == 32. Second, it avoids generating code for imm == 64, since it is equivalent to a no-op. Co-developed-by: Xi Wang S

[PATCH bpf-next 0/4] RV64 BPF JIT Optimizations

2020-05-05 Thread Luke Nelson
This patch series introduces a set of optimizations to the BPF JIT on RV64. The optimizations are related to the verifier zero-extension optimization and BPF_JMP BPF_K. We tested the optimizations on a QEMU riscv64 virt machine, using lib/test_bpf and test_verifier, and formally verified their cor

[PATCH bpf-next 3/4] bpf, riscv: Optimize BPF_JMP BPF_K when imm == 0 on RV64

2020-05-05 Thread Luke Nelson
This patch adds an optimization to BPF_JMP (32- and 64-bit) BPF_K for when the BPF immediate is zero. When the immediate is zero, the code can directly use the RISC-V zero register instead of loading a zero immediate to a temporary register first. Co-developed-by: Xi Wang Signed-off-by: Xi Wang

[PATCH bpf-next 4/4] bpf, riscv: Optimize BPF_JSET BPF_K using andi on RV64

2020-05-05 Thread Luke Nelson
This patch optimizes BPF_JSET BPF_K by using a RISC-V andi instruction when the BPF immediate fits in 12 bits, instead of first loading the immediate to a temporary register. Examples of generated code with and without this optimization: BPF_JMP_IMM(BPF_JSET, R1, 2, 1) without optimization: 20

[PATCH bpf-next 1/4] bpf, riscv: Enable missing verifier_zext optimizations on RV64

2020-05-05 Thread Luke Nelson
Commit 66d0d5a854a6 ("riscv: bpf: eliminate zero extension code-gen") added support for the verifier zero-extension optimization on RV64 and commit 46dd3d7d287b ("bpf, riscv: Enable zext optimization for more RV64G ALU ops") enabled it for more instruction cases. However, BPF_LSH BPF_X and BPF_{LS

[PATCH] virtio_net: fix lockdep warning on 32 bit

2020-05-05 Thread Michael S. Tsirkin
When we fill up a receive VQ, try_fill_recv currently tries to count kicks using a 64 bit stats counter. Turns out, on a 32 bit kernel that uses a seqcount. sequence counts are "lock" constructs where you need to make sure that writers are serialized. In turn, this means that we mustn't run two tr

Re: [PATCH] Bluetooth: Terminate the link if pairing is cancelled

2020-05-05 Thread Luiz Augusto von Dentz
Hi Manish, Marcel, On Tue, Apr 28, 2020 at 2:38 AM Marcel Holtmann wrote: > > Hi Manish, > > > If user decides to cancel ongoing pairing process (e.g. by clicking > > the cancel button on the pairing/passkey window), abort any ongoing > > pairing and then terminate the link. > > > > Signed-off-by

Re: [PATCH] bpf: Tweak BPF jump table optimizations for objtool compatibility

2020-05-05 Thread Alexei Starovoitov
; > need > > > > > to tell me what tests to run. > > > > > > > > I'd like to minimize the risk and avoid code churn, > > > > so how about we step back and debug it first? > > > > Which version of gcc are you using and what .conf

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 12:30:52AM +0200, Thomas Gleixner wrote: > "Michael S. Tsirkin" writes: > > On Tue, May 05, 2020 at 02:08:56PM +0200, Thomas Gleixner wrote: > >> > >> The following lockdep splat happens reproducibly on 5.7-rc4 > > > >> > >> WARNING: incons

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumazet wrote: > > > On 5/5/20 3:30 PM, Thomas Gleixner wrote: > > "Michael S. Tsirkin" writes: > >> On Tue, May 05, 2020 at 02:08:56PM +0200, Thomas Gleixner wrote: > >>> > >>> The following lockdep splat happens reproducibly on 5.7-rc4 > >> > >>>

Re: [net-next PATCH v3 1/5] net: phy: Introduce phy related fwnode functions

2020-05-05 Thread Russell King - ARM Linux admin
On Tue, May 05, 2020 at 06:59:01PM +0530, Calvin Johnson wrote: > +static inline struct phy_device *device_phy_find_device(struct device *dev) > +{ > + return NULL; > +} > + > +struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode) > +{ > + return NULL; > +} This wants to

Re: [PATCH net,v2] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-05 Thread Jakub Kicinski
On Tue, 5 May 2020 23:43:21 +0200 Pablo Neira Ayuso wrote: > On Tue, May 05, 2020 at 12:43:43PM -0700, Jakub Kicinski wrote: > > On Tue, 5 May 2020 21:31:45 +0200 Pablo Neira Ayuso wrote: > > > On Tue, May 05, 2020 at 11:40:10AM -0700, Jakub Kicinski wrote: > > > > On Tue, 5 May 2020 19:47:36

Re: [PATCH] Revert "ipv6: add mtu lock check in __ip6_rt_update_pmtu"

2020-05-05 Thread Maciej Żenczykowski
> > It's local system policy, how do I react to packets. If it doesn't > > violate the min/max limits for ipv6 packets it emits onto the internet > > I don't see this as something that can be seen as mandatory. It does violate the max limit for ipv6 packets it emits onto the internet. You're not

  1   2   3   4   5   >