Re: [PATCH rdma-next 1/8] RDMA/core: Check if client supports IB device or not

2021-04-04 Thread Gal Pressman
On 05/04/2021 8:49, Leon Romanovsky wrote: > From: Parav Pandit > > RDMA devices are of different transport(iWarp, IB, RoCE) and have > different attributes. > Not all clients are interested in all type of devices. > > Implement a generic callback that each IB client can implement to decide > if

[PATCH rdma-next 8/8] net/rds: Move to client_supported callback

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit Use newly introduced client_supported() callback to avoid client additional if the RDMA device is not of IB type or if it doesn't support device memory extensions. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky --- net/rds/ib.c | 20 +--- 1 file

[PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit If device doesn't have multicast capability, avoid client registration for it. This saves 16Kbytes of memory for a RDMA device consist of 128 ports. If device doesn't support subnet administration, avoid client registration for it. This saves 8Kbytes of memory for a RDMA devic

[PATCH rdma-next 7/8] net/smc: Move to client_supported callback

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit Use newly introduced client_supported() callback to avoid client additional if the RDMA device is not of IB type. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky --- net/smc/smc_ib.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net

[PATCH rdma-next 6/8] IB/opa_vnic: Move to client_supported callback

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit Move to newly introduced client_supported callback Avoid client registration using newly introduced helper callback if the IB device doesn't have OPA VNIC capability. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky --- drivers/infiniband/ulp/opa_vnic/opa_vnic_vem

[PATCH rdma-next 5/8] IB/IPoIB: Skip device which doesn't have InfiniBand port

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit Skip RDMA device which doesn't have InfiniBand ports using newly introduced client_supported() callback. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH rdma-next 1/8] RDMA/core: Check if client supports IB device or not

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit RDMA devices are of different transport(iWarp, IB, RoCE) and have different attributes. Not all clients are interested in all type of devices. Implement a generic callback that each IB client can implement to decide if client add() or remove() should be done by the IB core or

[PATCH rdma-next 3/8] IB/cm: Skip device which doesn't support IB CM

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit There are at least 3 types of RDMA devices which do not support IB CM. They are (1) A (eswitch) switchdev RDMA device, (2) iWARP device and (3) RDMA device without a RoCE capability Hence, avoid IB CM initialization for such devices. This saves 8Kbytes of memory for eswitch d

[PATCH rdma-next 0/8] Generalize if ULP supported check

2021-04-04 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This series adds new callback to check if ib client is supported/not_supported. Such general callback allows us to save memory footprint by not starting on devices that not going to work on them anyway. Thanks Parav Pandit (8): RDMA/core: Check if client supports IB

[PATCH rdma-next 2/8] RDMA/cma: Skip device which doesn't support CM

2021-04-04 Thread Leon Romanovsky
From: Parav Pandit A switchdev RDMA device do not support IB CM. When such device is added to the RDMA CM's device list, when application invokes rdma_listen(), cma attempts to listen to such device, however it has IB CM attribute disabled. Due to this, rdma_listen() call fails to listen for oth

Re: [PATCH v2] net: mac802154: Fix general protection fault

2021-04-04 Thread Pavel Skripkin
Hi! On Sun, 2021-04-04 at 20:43 -0400, Alexander Aring wrote: > Hi, > > On Thu, 4 Mar 2021 at 10:25, Pavel Skripkin > wrote: > > > > syzbot found general protection fault in crypto_destroy_tfm()[1]. > > It was caused by wrong clean up loop in llsec_key_alloc(). > > If one of the tfm array membe

[PATCH] batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field

2021-04-04 Thread Tetsuo Handa
KMSAN found uninitialized value at batadv_tt_prepare_tvlv_local_data() [1], for commit ced72933a5e8ab52 ("batman-adv: use CRC32C instead of CRC16 in TT code") inserted 'reserved' field into "struct batadv_tvlv_tt_data" and commit 7ea7b4a142758dea ("batman-adv: make the TT CRC logic VLAN specific")

[PATCH rdma-next 09/10] net/smc: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for smc. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- net/smc/smc_ib.c | 3 ++- net/smc/smc_wr.

[PATCH rdma-next 10/10] xprtrdma: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for xprtrdma. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- net/sunrpc/xprtrdma/frwr_ops.c | 10

[PATCH rdma-next 06/10] nvme-rdma: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for nvme. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Max Gurtovoy Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/nvme/

[PATCH rdma-next 08/10] net/rds: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for rds. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- net/rds/ib_frmr.c | 7 +++ 1 file cha

[PATCH rdma-next 02/10] RDMA/core: Enable Relaxed Ordering in __ib_alloc_pd()

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering in __ib_alloc_pd() allocation of the local_dma_lkey. This will take effect only for devices that don't pre-allocate the lkey but allocate it per PD allocation. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky

[PATCH rdma-next 07/10] cifs: smbd: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for smbd. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- fs/cifs/smbdirect.c | 16 ++-

[PATCH rdma-next 05/10] RDMA/srp: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for srp. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Max Gurtovoy Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/infini

[PATCH rdma-next 04/10] RDMA/rtrs: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering fro rtrs client and server. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/infiniband/ulp

[PATCH rdma-next 03/10] RDMA/iser: Enable Relaxed Ordering

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Enable Relaxed Ordering for iser. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Max Gurtovoy Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/infin

[PATCH rdma-next 01/10] RDMA: Add access flags to ib_alloc_mr() and ib_mr_pool_init()

2021-04-04 Thread Leon Romanovsky
From: Avihai Horon Add access flags parameter to ib_alloc_mr() and to ib_mr_pool_init(), and refactor relevant code. This parameter is used to pass MR access flags during MR allocation. In the following patches, the new access flags parameter will be used to enable Relaxed Ordering for ib_alloc_

[PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-04 Thread Leon Romanovsky
From: Leon Romanovsky >From Avihai, Relaxed Ordering is a PCIe mechanism that relaxes the strict ordering imposed on PCI transactions, and thus, can improve performance. Until now, relaxed ordering could be set only by user space applications for user MRs. The following patch series enables rel

Re: [PATCH] net/mlx5: fix kfree mismatch in indir_table.c

2021-04-04 Thread Leon Romanovsky
On Mon, Apr 05, 2021 at 10:53:39AM +0800, Xiaoming Ni wrote: > Memory allocated by kvzalloc() should be freed by kvfree(). > > Fixes: 34ca65352ddf2 ("net/mlx5: E-Switch, Indirect table infrastructur") > Signed-off-by: Xiaoming Ni > --- > .../net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 1

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-04 Thread Leon Romanovsky
On Sun, Apr 04, 2021 at 04:05:26PM -0700, Richard Cochran wrote: > On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote: > > @@ -0,0 +1,589 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ > > + > > +#include > > +#include > > + > > +

[PATCH bpf-next] libbpf: Fix KERNEL_VERSION macro

2021-04-04 Thread Hengqi Chen
Add missing ')' for KERNEL_VERSION macro. Signed-off-by: Hengqi Chen --- tools/lib/bpf/bpf_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h index cc2e51c64a54..b904128626c2 100644 --- a/tools/lib/bpf/bpf_helpe

Re: [ovs-dev] [PATCH net] openvswitch: fix send of uninitialized stack memory in ct limit reply

2021-04-04 Thread Tonghao Zhang
On Mon, Apr 5, 2021 at 2:01 AM Ilya Maximets wrote: > > CC: ovs-dev > > On 4/4/21 7:50 PM, Ilya Maximets wrote: > > 'struct ovs_zone_limit' has more members than initialized in > > ovs_ct_limit_get_default_limit(). The rest of the memory is a random > > kernel stack content that ends up being sen

[PATCH] net/mlx5: fix kfree mismatch in indir_table.c

2021-04-04 Thread Xiaoming Ni
Memory allocated by kvzalloc() should be freed by kvfree(). Fixes: 34ca65352ddf2 ("net/mlx5: E-Switch, Indirect table infrastructur") Signed-off-by: Xiaoming Ni --- .../net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 1/1] SUNRPC: Handle major timeout in xprt_adjust_timeout()

2021-04-04 Thread Chris Dion
Currently if a major timeout value is reached, but the minor value has not been reached, an ETIMEOUT will not be sent back to the caller. This can occur if the v4 server is not responding to requests and retrans is configured larger than the default of two. For example, A TCP mount with a configur

Re: [PATCH v2] net: mac802154: Fix general protection fault

2021-04-04 Thread Alexander Aring
Hi, On Thu, 4 Mar 2021 at 10:25, Pavel Skripkin wrote: > > syzbot found general protection fault in crypto_destroy_tfm()[1]. > It was caused by wrong clean up loop in llsec_key_alloc(). > If one of the tfm array members is in IS_ERR() range it will > cause general protection fault in clean up fun

Re: [PATCH] net: fix NULL ptr dereference in nl802154_del_llsec_key

2021-04-04 Thread Alexander Aring
Hi, On Sat, 3 Apr 2021 at 11:18, Pavel Skripkin wrote: > > syzbot reported NULL ptr dereference in nl802154_del_llsec_key()[1] > The problem was in case of info->attrs[NL802154_ATTR_SEC_KEY] == NULL. > nla_parse_nested_deprecated()[2] doesn't check this condition before calling > nla_len()[3] >

[PATCH RESEND wpan 15/15] net: ieee802154: stop dump llsec params for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+cde43a581a8e5f317...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 fil

[PATCH RESEND wpan 14/15] net: ieee802154: forbid monitor for del llsec seclevel

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e0...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3

[PATCH RESEND wpan 10/15] net: ieee802154: forbid monitor for add llsec devkey

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH RESEND wpan 13/15] net: ieee802154: forbid monitor for add llsec seclevel

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/

[PATCH RESEND wpan 12/15] net: ieee802154: stop dump llsec seclevels for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH RESEND wpan 11/15] net: ieee802154: forbid monitor for del llsec devkey

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH RESEND wpan 08/15] net: ieee802154: forbid monitor for del llsec dev

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH RESEND wpan 09/15] net: ieee802154: stop dump llsec devkeys for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec devkeys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c

[PATCH RESEND wpan 06/15] net: ieee802154: stop dump llsec devs for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec devs for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[PATCH RESEND wpan 07/15] net: ieee802154: forbid monitor for add llsec dev

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH RESEND wpan 05/15] net: ieee802154: forbid monitor for del llsec key

2021-04-04 Thread Alexander Aring
This patch forbids to del llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH RESEND wpan 03/15] net: ieee802154: stop dump llsec keys for monitors

2021-04-04 Thread Alexander Aring
This patch stops dumping llsec keys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[PATCH RESEND wpan 04/15] net: ieee802154: forbid monitor for add llsec key

2021-04-04 Thread Alexander Aring
This patch forbids to add llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH RESEND wpan 02/15] net: ieee802154: forbid monitor for set llsec params

2021-04-04 Thread Alexander Aring
This patch forbids to set llsec params for monitor interfaces which we don't support yet. Reported-by: syzbot+8b6719da8a04beeaf...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH RESEND wpan 00/15] net: ieee802154: forbid sec params for monitors

2021-04-04 Thread Alexander Aring
Hi, this patch series contains fixes to forbid various security parameters settings for monitor types. Monitor types doesn't use the llsec security currently and we don't support it. With this patch series the user will be notified with a EOPNOTSUPP error that for monitor interfaces security is no

[PATCH RESEND wpan 01/15] net: ieee802154: nl-mac: fix check on panid

2021-04-04 Thread Alexander Aring
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them. Reported-by: syzbot+d4c07de0144f6f63b...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl-mac.c | 7 --- 1 file changed, 4 inser

Re: [PATCH] libbpf: Fix KERNEL_VERSION macro

2021-04-04 Thread Andrii Nakryiko
On Sun, Apr 4, 2021 at 2:53 AM Hengqi Chen wrote: > > Add missing ')' for KERNEL_VERSION macro. > > Signed-off-by: Hengqi Chen > --- The fix looks good, thank you. But your patch didn't make it into bpf/netdev patchworks instance ([0]) most probably due to too long CC list. Can you please re-sen

Re: [PATCH net-next 12/12] ionic: advertise support for hardware timestamps

2021-04-04 Thread Richard Cochran
On Thu, Apr 01, 2021 at 10:56:10AM -0700, Shannon Nelson wrote: > Let the network stack know we've got support for timestamping > the packets. Actually, you already advertised the support to user space in Patch 10, so this present patch should go before that one (or together). Thanks, Richard

Re: [PATCH net-next 09/12] ionic: add and enable tx and rx timestamp handling

2021-04-04 Thread Richard Cochran
On Thu, Apr 01, 2021 at 10:56:07AM -0700, Shannon Nelson wrote: > @@ -1150,6 +1232,10 @@ netdev_tx_t ionic_start_xmit(struct sk_buff *skb, > struct net_device *netdev) > return NETDEV_TX_OK; > } > > + if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) > +

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-04 Thread Richard Cochran
On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote: > +int ionic_lif_hwstamp_set(struct ionic_lif *lif, struct ifreq *ifr) > +{ > + struct ionic *ionic = lif->ionic; > + struct hwtstamp_config config; > + int tx_mode = 0; > + u64 rx_filt = 0; > + int err, err2; > +

Re: [PATCH net-next 05/12] ionic: add hw timestamp support files

2021-04-04 Thread Richard Cochran
On Thu, Apr 01, 2021 at 10:56:03AM -0700, Shannon Nelson wrote: > @@ -0,0 +1,589 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* Copyright(c) 2017 - 2021 Pensando Systems, Inc */ > + > +#include > +#include > + > +#include "ionic.h" > +#include "ionic_bus.h" > +#include "ionic_lif.h" > +#include

Re: [PATCH net-next 02/12] ionic: add handling of larger descriptors

2021-04-04 Thread Richard Cochran
On Thu, Apr 01, 2021 at 10:56:00AM -0700, Shannon Nelson wrote: > @@ -1722,11 +1722,15 @@ static void ionic_txrx_free(struct ionic_lif *lif) > > static int ionic_txrx_alloc(struct ionic_lif *lif) > { > - unsigned int sg_desc_sz; > + unsigned int num_desc, desc_sz, comp_sz, sg_desc_sz; >

Re: [PATCH] net: phy: fix PHY possibly unwork after MDIO bus resume back

2021-04-04 Thread Heiner Kallweit
On 04.04.2021 16:09, Heiner Kallweit wrote: > On 04.04.2021 12:07, Joakim Zhang wrote: >> commit 4c0d2e96ba055 ("net: phy: consider that suspend2ram may cut >> off PHY power") invokes phy_init_hw() when MDIO bus resume, it will >> soft reset PHY if PHY driver implements soft_reset callback. >> comm

Re: Something is leaking RCU holds from interrupt context

2021-04-04 Thread Paul E. McKenney
On Sun, Apr 04, 2021 at 07:24:53PM +0100, Matthew Wilcox wrote: > On Sun, Apr 04, 2021 at 09:48:08AM -0700, Paul E. McKenney wrote: > > On Sun, Apr 04, 2021 at 11:24:57AM +0100, Matthew Wilcox wrote: > > > On Sat, Apr 03, 2021 at 09:15:17PM -0700, syzbot wrote: > > > > HEAD commit:2bb25b3a Merg

[PATCH bpf-next 3/3] bpf: selftests: update array map tests for per-cpu batched ops

2021-04-04 Thread Pedro Tammela
Follows the same logic as the hashtable tests. Signed-off-by: Pedro Tammela --- .../bpf/map_tests/array_map_batch_ops.c | 114 +- 1 file changed, 85 insertions(+), 29 deletions(-) diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c b/tools/testing/sel

[PATCH bpf-next 2/3] libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()' macros

2021-04-04 Thread Pedro Tammela
This macro was refactored out of the bpf selftests. Since percpu values are rounded up to '8' in the kernel, a careless user in userspace might encounter unexpected values when parsing the output of the batched operations. Now that both array and hash maps have support for batched ops in the perc

[PATCH bpf-next 1/3] bpf: add batched ops support for percpu array

2021-04-04 Thread Pedro Tammela
Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela --- kernel/bpf/arraymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 463d25e1e67e..3c4105603f9d 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -698,6 +698

[PATCH bpf-next 0/3] add batched ops support for percpu array

2021-04-04 Thread Pedro Tammela
This patchset introduces batched operations for the per-cpu variant of the array map. It also introduces a standard way to define per-cpu values via the 'BPF_PERCPU_TYPE()' macro, which handles the alignment transparently. This was already implemented in the selftests and was merely refactored out

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-04 Thread Danilo Krummrich
On Fri, Apr 02, 2021 at 01:58:58PM +0100, Russell King - ARM Linux admin wrote: > On Fri, Apr 02, 2021 at 03:10:49AM +0200, Danilo Krummrich wrote: > > On Thu, Apr 01, 2021 at 09:48:58AM +0100, Russell King - ARM Linux admin > > wrote: > > > One could also argue this is a feature, and it allows us

Re: [PATCH 2/2] net: mdio: support c45 peripherals on c22 busses

2021-04-04 Thread Danilo Krummrich
On Fri, Apr 02, 2021 at 02:28:54PM +0200, Andrew Lunn wrote: > > > Do you actually have a requirement for this? > > > > > Yes, the Marvell 88Q2112 1000Base-T1 PHY. But actually, I just recognize > > that it > > should be possible to just register it with the compatible string > > "ethernet-phy-iee

Re: Something is leaking RCU holds from interrupt context

2021-04-04 Thread Matthew Wilcox
On Sun, Apr 04, 2021 at 09:48:08AM -0700, Paul E. McKenney wrote: > On Sun, Apr 04, 2021 at 11:24:57AM +0100, Matthew Wilcox wrote: > > On Sat, Apr 03, 2021 at 09:15:17PM -0700, syzbot wrote: > > > HEAD commit:2bb25b3a Merge tag 'mips-fixes_5.12_3' of > > > git://git.kernel.. > > > git tree:

Re: rtlwifi/rtl8192cu AP mode broken with PS STA

2021-04-04 Thread Maciej S. Szmigiero
On 29.03.2021 00:54, Maciej S. Szmigiero wrote: Hi, It looks like rtlwifi/rtl8192cu AP mode is broken when a STA is using PS, since the driver does not update its beacon to account for TIM changes, so a station that is sleeping will never learn that it has packets buffered at the AP. Looking at

Re: [PATCH net] openvswitch: fix send of uninitialized stack memory in ct limit reply

2021-04-04 Thread Ilya Maximets
CC: ovs-dev On 4/4/21 7:50 PM, Ilya Maximets wrote: > 'struct ovs_zone_limit' has more members than initialized in > ovs_ct_limit_get_default_limit(). The rest of the memory is a random > kernel stack content that ends up being sent to userspace. > > Fix that by using designated initializer that

[PATCH net] openvswitch: fix send of uninitialized stack memory in ct limit reply

2021-04-04 Thread Ilya Maximets
'struct ovs_zone_limit' has more members than initialized in ovs_ct_limit_get_default_limit(). The rest of the memory is a random kernel stack content that ends up being sent to userspace. Fix that by using designated initializer that will clear all non-specified fields. Fixes: 11efd5cb04a1 ("op

Re: Something is leaking RCU holds from interrupt context

2021-04-04 Thread Paul E. McKenney
On Sun, Apr 04, 2021 at 11:24:57AM +0100, Matthew Wilcox wrote: > On Sat, Apr 03, 2021 at 09:15:17PM -0700, syzbot wrote: > > HEAD commit:2bb25b3a Merge tag 'mips-fixes_5.12_3' of git://git.kernel.. > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt?x=1284c

Re: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Andrew Lunn
> @@ -436,12 +436,16 @@ int __ethtool_get_link_ksettings(struct net_device *dev, > > memset(link_ksettings, 0, sizeof(*link_ksettings)); > > - link_ksettings->link_mode = -1; > err = dev->ethtool_ops->get_link_ksettings(dev, link_ksettings); > if (err) > retu

Re: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Andrew Lunn
> First, it is not the API structure that is passed to user space. Please pay > attention Yes, sorry. Jumped to assumptions without checking. Let me try again. Andrew

Re: [PATCH net-next v8 2/2] net: Add Qcom WWAN control driver (fwd)

2021-04-04 Thread Julia Lawall
There is a clear use after free on line 213. julia -- Forwarded message -- Date: Sat, 3 Apr 2021 04:42:45 +0800 From: kernel test robot To: kbu...@lists.01.org Cc: l...@intel.com, Julia Lawall Subject: Re: [PATCH net-next v8 2/2] net: Add Qcom WWAN control driver CC: kbuild-...

RE: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Danielle Ratson
> -Original Message- > From: Andrew Lunn > Sent: Sunday, April 4, 2021 5:18 PM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; k...@kernel.org; > eric.duma...@gmail.com; mkube...@suse.cz; > f.faine...@gmail.com; acard...@redhat.com; irussk...@marvell.com; > g

[PATCH net-next] tipc: Fix a kernel-doc warning in name_table.c

2021-04-04 Thread Wu XiangCheng
Fix kernel-doc warning: Documentation/networking/tipc:66: /home/sfr/next/next/net/tipc/name_table.c :558: WARNING: Unexpected indentation. Documentation/networking/tipc:66: /home/sfr/next/next/net/tipc/name_table.c :559: WARNING: Block quote ends without a blank line; unexpected unindent. Due

Re: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Andrew Lunn
On Sun, Apr 04, 2021 at 11:14:32AM +0300, Danielle Ratson wrote: > Some drivers clear the 'ethtool_link_ksettings' struct in their > get_link_ksettings() callback, before populating it with actual values. > Such drivers will set the new 'link_mode' field to zero, resulting in > user space receiving

Re: [PATCH] net: phy: fix PHY possibly unwork after MDIO bus resume back

2021-04-04 Thread Heiner Kallweit
On 04.04.2021 12:07, Joakim Zhang wrote: > commit 4c0d2e96ba055 ("net: phy: consider that suspend2ram may cut > off PHY power") invokes phy_init_hw() when MDIO bus resume, it will > soft reset PHY if PHY driver implements soft_reset callback. > commit 764d31cacfe4 ("net: phy: micrel: set soft_reset

[PATCH v2 net-next] mld: change lockdep annotation for ip6_sf_socklist and ipv6_mc_socklist

2021-04-04 Thread Taehee Yoo
struct ip6_sf_socklist and ipv6_mc_socklist are per-socket MLD data. These data are protected by rtnl lock, socket lock, and RCU. So, when these are used, it verifies whether rtnl lock is acquired or not. ip6_mc_msfget() is called by do_ipv6_getsockopt(). But caller doesn't acquire rtnl lock. So,

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-04 Thread Vladimir Oltean
On Sun, Apr 04, 2021 at 07:35:26AM +0200, Oleksij Rempel wrote: > Am 04.04.21 um 02:02 schrieb Vladimir Oltean: > > On Sat, Apr 03, 2021 at 07:14:56PM +0200, Oleksij Rempel wrote: > >> Am 03.04.21 um 16:49 schrieb Andrew Lunn: > @@ -31,6 +96,13 @@ static struct sk_buff *ar9331_tag_xmit(struct

Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-04 Thread Vladimir Oltean
On Sun, Apr 04, 2021 at 07:49:03AM +0200, Oleksij Rempel wrote: > Am 04.04.21 um 01:21 schrieb Vladimir Oltean: > > On Sat, Apr 03, 2021 at 05:05:34PM +0300, Vladimir Oltean wrote: > >> On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: > >>> Some switches (for example ar9331) do not p

[PATCH 1/2] qede: Remove a erroneous ++ in 'qede_rx_build_jumbo()'

2021-04-04 Thread Christophe JAILLET
This ++ is confusing. It looks duplicated with the one already performed in 'skb_fill_page_desc()'. In fact, it is harmless. 'nr_frags' is written twice with the same value. Once, because of the nr_frags++, and once because of the 'nr_frags = i + 1' in 'skb_fill_page_desc()'. So axe this post-inc

[PATCH 2/2] qede: Use 'skb_add_rx_frag()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp

Something is leaking RCU holds from interrupt context

2021-04-04 Thread Matthew Wilcox
On Sat, Apr 03, 2021 at 09:15:17PM -0700, syzbot wrote: > HEAD commit:2bb25b3a Merge tag 'mips-fixes_5.12_3' of git://git.kernel.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1284cc31d0 > kernel config: https://syzkaller.appspot.com/x/.config?x=78

[PATCH] net: phy: fix PHY possibly unwork after MDIO bus resume back

2021-04-04 Thread Joakim Zhang
commit 4c0d2e96ba055 ("net: phy: consider that suspend2ram may cut off PHY power") invokes phy_init_hw() when MDIO bus resume, it will soft reset PHY if PHY driver implements soft_reset callback. commit 764d31cacfe4 ("net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081") adds

[PATCH] sfc: Use 'skb_add_rx_frag()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET --- UNTESTED. Compile tested only The 'skb->truesize' computation is likely to be slightly slower (n additions hidden in 'skb_add_rx_frag' instead of 1 multiplica

[PATCH] ibmvnic: Use 'skb_frag_address()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
'page_address(skb_frag_page()) + skb_frag_off()' can be replaced by an equivalent 'skb_frag_address()' which is less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/ibm/ibmvnic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm

Re: [net-next 01/16] net/mlx5: CT: Add support for matching on ct_state inv and rel flags

2021-04-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Sat, 3 Apr 2021 21:19:39 -0700 you wrote: > From: Ariel Levkovich > > Add support for matching on ct_state inv and rel flags. > > Currently the support is only for match on -inv and -rel. > Matching on +inv and +rel

Re: [PATCH] net: openvswitch: Use 'skb_push_rcsum()' instead of hand coding it

2021-04-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sun, 4 Apr 2021 09:11:03 +0200 you wrote: > 'skb_push()'/'skb_postpush_rcsum()' can be replaced by an equivalent > 'skb_push_rcsum()' which is less verbose. > > Signed-off-by: Christophe JAILLET > --- > net/openvswit

[PATCH net v2 2/2] ethtool: Derive parameters from link_mode in ioctl path

2021-04-04 Thread Danielle Ratson
Currently, some ethtool link parameters, like speed, lanes and duplex, are derived from the link_mode parameter. These link parameters are only derived in __ethtool_get_link_ksettings(), but the ioctl path does not go through this function. This means that old ethtool (w/o netlink) won't get any re

[PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Danielle Ratson
Some drivers clear the 'ethtool_link_ksettings' struct in their get_link_ksettings() callback, before populating it with actual values. Such drivers will set the new 'link_mode' field to zero, resulting in user space receiving wrong link mode information given that zero is a valid value for the fie

[PATCH net v2 0/2] Fix link_mode derived params functionality

2021-04-04 Thread Danielle Ratson
Currently, link_mode parameter derives 3 other link parameters, speed, lanes and duplex, and the derived information is sent to user space. Two bugs were found in that functionality. First, some drivers clear the 'ethtool_link_ksettings' struct in their get_link_ksettings() callback and cause rece

Re: [PATCH rdma-next 6/7] RDMA/mlx5: Add support in MEMIC operations

2021-04-04 Thread Leon Romanovsky
On Thu, Apr 01, 2021 at 02:47:04PM -0300, Jason Gunthorpe wrote: > On Thu, Mar 18, 2021 at 01:15:47PM +0200, Leon Romanovsky wrote: > > From: Maor Gottlieb > > > > MEMIC buffer, in addition to regular read and write operations, can > > support atomic operations from the host. > > > > Introduce a

Re: [PATCH mlx5-next v8 0/4] Dynamically assign MSI-X vectors count

2021-04-04 Thread Leon Romanovsky
On Sun, Mar 14, 2021 at 02:42:52PM +0200, Leon Romanovsky wrote: > - > Changelog > v8: > * Added "physical/virtual function" words near PF and VF acronyms. > v7: https://lore.kernel.org/linux-pci/20210301075524.441609-

[PATCH] net: openvswitch: Use 'skb_push_rcsum()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
'skb_push()'/'skb_postpush_rcsum()' can be replaced by an equivalent 'skb_push_rcsum()' which is less verbose. Signed-off-by: Christophe JAILLET --- net/openvswitch/conntrack.c| 6 ++ net/openvswitch/vport-netdev.c | 7 +++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git

Re: [PATCH mlx5-next v8 1/4] PCI: Add a sysfs file to change the MSI-X table size of SR-IOV VFs

2021-04-04 Thread Leon Romanovsky
On Fri, Apr 02, 2021 at 07:24:26PM -0500, Bjorn Helgaas wrote: > Possible subject, since this adds *two* files, not just "a file": > > PCI/IOV: Add sysfs MSI-X vector assignment interface Sure > > On Sun, Mar 14, 2021 at 02:42:53PM +0200, Leon Romanovsky wrote: > > A typical cloud provider SR