[PATCH 1/4] nfc: fix refcount leak in llcp_sock_bind()

2021-03-03 Thread Xiaoming Ni
nfc_llcp_local_get() is invoked in llcp_sock_bind(), but nfc_llcp_local_put() is not invoked in subsequent failure branches. As a result, refcount leakage occurs. To fix it, add calling nfc_llcp_local_put(). fix CVE-2020-25670 Fixes: c7aa12252f51 ("NFC: Take a reference on the LLCP local pointer w

Re: [Patch bpf-next v2 4/9] udp: implement ->read_sock() for sockmap

2021-03-03 Thread Yonghong Song
On 3/1/21 6:37 PM, Cong Wang wrote: From: Cong Wang Some even simple commit message here will be preferred compared to empty commit message. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/net/udp.h | 2 ++ net/ipv

[PATCH 0/4] nfc: fix Resource leakage and endless loop

2021-03-03 Thread Xiaoming Ni
fix Resource leakage and endless loop in net/nfc/llcp_sock.c, reported by "kiyin(尹亮)". Link: https://www.openwall.com/lists/oss-security/2020/11/01/1 Xiaoming Ni (4): nfc: fix refcount leak in llcp_sock_bind() nfc: fix refcount leak in llcp_sock_connect() nfc: fix memory leak in llcp_soc

Re: [PATCH] iwlwifi: mvm: add terminate entry for dmi_system_id tables

2021-03-03 Thread Coelho, Luciano
On Tue, 2021-03-02 at 13:42 -0800, Jakub Kicinski wrote: > On Tue, 02 Mar 2021 21:50:18 +0200 Kalle Valo wrote: > > > if Wei doesn't respond could you please step in to make sure this > > > fix is part of Dave's next PR to Linus? > > > > Will do. Related to this, what's your pull request schedul

Re: [Patch bpf-next v2 8/9] sock_map: update sock type checks for UDP

2021-03-03 Thread Yonghong Song
On 3/1/21 6:37 PM, Cong Wang wrote: From: Cong Wang Now UDP supports sockmap and redirection, we can safely update the sock type checks for it accordingly. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/core/sock_map.c | 5

Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.

2021-03-03 Thread Heiner Kallweit
On 03.03.2021 07:09, Valdis Klētnieks wrote: > So my kernel build died.. > > UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.S > make[4]: *** No rule to make target '/lib/firmware/rtl_nic/rtl8106e-1.fw', > needed by 'drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1

[PATCH] net/mlx5: use kvfree() for memory allocated with kvzalloc()

2021-03-03 Thread angkery
From: Junlin Yang It is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Junlin Yang --- drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 10 +-

Re: [PATCH net] docs: networking: drop special stable handling

2021-03-03 Thread Greg KH
On Tue, Mar 02, 2021 at 06:46:43PM -0800, Jakub Kicinski wrote: > Leave it to Greg. > > Signed-off-by: Jakub Kicinski Acked-by: Greg Kroah-Hartman

Re: [PATCH] bpf: Simplify the calculation of variables

2021-03-03 Thread Yonghong Song
On 3/2/21 11:20 PM, Jiapeng Chong wrote: Fix the following coccicheck warnings: ./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Yonghong Song

[PATCH] bpf: Simplify the calculation of variables

2021-03-03 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/bpf/bpf_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpf_dbg.c b/tools/

Re: [PATCH bpf-next 1/2] xsk: update rings for load-acquire/store-release semantics

2021-03-03 Thread Björn Töpel
On Tue, 2 Mar 2021 at 11:23, Toke Høiland-Jørgensen wrote: > > Björn Töpel writes: > > > On 2021-03-01 17:08, Toke Høiland-Jørgensen wrote: > >> Björn Töpel writes: > >> > >>> From: Björn Töpel > >>> > >>> Currently, the AF_XDP rings uses smp_{r,w,}mb() fences on the > >>> kernel-side. By updat

Re: [PATCH] net/mlx5: use kvfree() for memory allocated with kvzalloc()

2021-03-03 Thread Roi Dayan
On 2021-03-03 4:40 AM, angkery wrote: From: Junlin Yang It is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Junlin Yang --- drivers/net/ethernet/mellanox

Re: [PATCH v3 3/6] can: c_can: fix control interface used by c_can_do_tx

2021-03-03 Thread Dario Binacchi
Hi Kurt, > Il 02/03/2021 19:44 Kurt Van Dijck ha > scritto: > > > On Sun, 28 Feb 2021 11:38:52 +0100, Dario Binacchi wrote: > > According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use > > IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX). > > > > Signed-off-by: Dario Binacchi

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-03 Thread Björn Töpel
On 2021-03-03 05:38, Andrii Nakryiko wrote: On Mon, Mar 1, 2021 at 2:43 AM Björn Töpel wrote: From: Björn Töpel Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf to that as well. The library-internal libbpf_smp_{load_acquire,store_release} are only valid for 3

[PATCH] selftests/bpf: Simplify the calculation of variables

2021-03-03 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/test_sockmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-03 Thread Björn Töpel
On Tue, 2 Mar 2021 at 10:25, Daniel Borkmann wrote: > [...] > > I wonder if it's possible to cook a LKMM litmus test for this...? > > That would be amazing! :-) > With the help of Paul and Alan [1] (Thanks!) I've cooked 8 litmus tests for this [2]. The litmus tests is based on a one entry ring

Re: [PATCH 4/5] net: page_pool: refactor dma_map into own function page_pool_dma_map

2021-03-03 Thread Jesper Dangaard Brouer
On Wed, 3 Mar 2021 09:18:25 + Mel Gorman wrote: > On Tue, Mar 02, 2021 at 08:49:06PM +0200, Ilias Apalodimas wrote: > > On Mon, Mar 01, 2021 at 04:11:59PM +, Mel Gorman wrote: > > > From: Jesper Dangaard Brouer > > > > > > In preparation for next patch, move the dma mapping into its ow

[PATCH 2/4] nfc: fix refcount leak in llcp_sock_connect()

2021-03-03 Thread Xiaoming Ni
nfc_llcp_local_get() is invoked in llcp_sock_connect(), but nfc_llcp_local_put() is not invoked in subsequent failure branches. As a result, refcount leakage occurs. To fix it, add calling nfc_llcp_local_put(). fix CVE-2020-25671 Fixes: c7aa12252f51 ("NFC: Take a reference on the LLCP local pointe

Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.

2021-03-03 Thread Valdis Klētnieks
On Wed, 03 Mar 2021 07:51:06 +0100, Heiner Kallweit said: > > # Firmware loader > > CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw" > > CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" > > > This is wrong, simply remove it. > > But then I take a closer look at drivers/net/ethernet/realtek/r8169_main.c >

Re: [Patch bpf-next v2 2/9] sock: introduce sk_prot->update_proto()

2021-03-03 Thread Lorenz Bauer
On Tue, 2 Mar 2021 at 18:23, Cong Wang wrote: > > > if the function returned a struct proto * like it does at the moment. > > That way we keep sk->sk_prot manipulation confined to the sockmap code > > and don't have to copy paste it into every proto. > > Well, TCP seems too special to do this, as

[PATCH bpf-next v4 5/5] selftests: bpf: don't run sk_lookup in verifier tests

2021-03-03 Thread Lorenz Bauer
sk_lookup doesn't allow setting data_in for bpf_prog_run. This doesn't play well with the verifier tests, since they always set a 64 byte input buffer. Allow not running verifier tests by setting bpf_test.runs to a negative value and don't run the ctx access case for sk_lookup. We have dedicated ct

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Marc Kleine-Budde
On 03.03.2021 09:23:13, Dario Binacchi wrote: [...] > > > @@ -1205,17 +1203,31 @@ static int c_can_close(struct net_device *dev) > > > return 0; > > > } > > > > > > -struct net_device *alloc_c_can_dev(void) > > > +struct net_device *alloc_c_can_dev(int msg_obj_num) > > > { > > > struct net_

[PATCH bpf-next v4 1/5] bpf: consolidate shared test timing code

2021-03-03 Thread Lorenz Bauer
Share the timing / signal interruption logic between different implementations of PROG_TEST_RUN. There is a change in behaviour as well. We check the loop exit condition before checking for pending signals. This resolves an edge case where a signal arrives during the last iteration. Instead of abor

[PATCH bpf-next v4 4/5] selftests: bpf: check that PROG_TEST_RUN repeats as requested

2021-03-03 Thread Lorenz Bauer
Extend a simple prog_run test to check that PROG_TEST_RUN adheres to the requested repetitions. Convert it to use BPF skeleton. Signed-off-by: Lorenz Bauer --- .../selftests/bpf/prog_tests/prog_run_xattr.c | 51 +++ 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/t

[PATCH bpf-next v4 2/5] bpf: add PROG_TEST_RUN support for sk_lookup programs

2021-03-03 Thread Lorenz Bauer
Allow to pass sk_lookup programs to PROG_TEST_RUN. User space provides the full bpf_sk_lookup struct as context. Since the context includes a socket pointer that can't be exposed to user space we define that PROG_TEST_RUN returns the cookie of the selected socket or zero in place of the socket poin

[PATCH bpf-next v4 0/5] PROG_TEST_RUN support for sk_lookup programs

2021-03-03 Thread Lorenz Bauer
We don't have PROG_TEST_RUN support for sk_lookup programs at the moment. So far this hasn't been a problem, since we can run our tests in a separate network namespace. For benchmarking it's nice to have PROG_TEST_RUN, so I've gone and implemented it. Based on discussion on the v1 I've dropped sup

[PATCH bpf-next v4 3/5] selftests: bpf: convert sk_lookup ctx access tests to PROG_TEST_RUN

2021-03-03 Thread Lorenz Bauer
Convert the selftests for sk_lookup narrow context access to use PROG_TEST_RUN instead of creating actual sockets. This ensures that ctx is populated correctly when using PROG_TEST_RUN. Assert concrete values since we now control remote_ip and remote_port. Signed-off-by: Lorenz Bauer --- .../se

Re: [Patch bpf-next v2 9/9] selftests/bpf: add a test case for udp sockmap

2021-03-03 Thread Lorenz Bauer
On Tue, 2 Mar 2021 at 18:05, Cong Wang wrote: > > On Tue, Mar 2, 2021 at 8:32 AM Lorenz Bauer wrote: > > > > On Tue, 2 Mar 2021 at 02:38, Cong Wang wrote: > > > > > > From: Cong Wang > > > > > > Add a test case to ensure redirection between two UDP sockets work. > > > > I basically don't unders

Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.

2021-03-03 Thread Heiner Kallweit
On 03.03.2021 08:39, Valdis Klētnieks wrote: > On Wed, 03 Mar 2021 07:51:06 +0100, Heiner Kallweit said: >>> # Firmware loader >>> CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw" >>> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" >>> >> This is wrong, simply remove it. > >>> But then I take a closer look

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Dario Binacchi
Hi Kurt, > Il 02/03/2021 19:49 Kurt Van Dijck ha > scritto: > > > On Sun, 28 Feb 2021 11:38:54 +0100, Dario Binacchi wrote: > > Date: Sun, 28 Feb 2021 11:38:54 +0100 > > From: Dario Binacchi > > To: linux-ker...@vger.kernel.org > > Cc: Federico Vaga , Alexander Stein > > , Dario Binacchi

[PATCH 4/4] nfc: Avoid endless loops caused by repeated llcp_sock_connect()

2021-03-03 Thread Xiaoming Ni
When sock_wait_state() returns -EINPROGRESS, "sk->sk_state" is LLCP_CONNECTING. In this case, llcp_sock_connect() is repeatedly invoked, nfc_llcp_sock_link() will add sk to local->connecting_sockets twice. sk->sk_node->next will point to itself, that will make an endless loop and hang-up the sy

[PATCH net] Revert "r8152: adjust the settings about MAC clock speed down for RTL8153"

2021-03-03 Thread Hayes Wang
This reverts commit 134f98bcf1b898fb9d6f2b91bc85dd2e5478b4b8. The r8153_mac_clk_spd() is used for RTL8153A only, because the register table of RTL8153B is different from RTL8153A. However, this function would be called when RTL8153B calls r8153_first_init() and r8153_enter_oob(). That causes RTL81

Re: [Linux-kernel-mentees] [PATCH net] Bluetooth: Fix NULL pointer dereference in amp_read_loc_assoc_final_data()

2021-03-03 Thread Gopal Tiwari
Hi, I tried to search the patch for one of the bugzilla reported (Internal) https://bugzilla.redhat.com/show_bug.cgi?id=1916057 with the traces [ 405.938525] Workqueue: hci0 hci_rx_work [bluetooth] [ 405.941360] RIP: 0010:amp_read_loc_assoc_final_data+0xfc/0x1c0 [bluetooth] [ 405.944740] Co

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Dario Binacchi
Hi Marc, > Il 03/03/2021 10:00 Marc Kleine-Budde ha scritto: > > > On 03.03.2021 09:23:13, Dario Binacchi wrote: > [...] > > > > @@ -1205,17 +1203,31 @@ static int c_can_close(struct net_device *dev) > > > > return 0; > > > > } > > > > > > > > -struct net_device *alloc_c_can_dev(voi

[PATCH 3/4] nfc: fix memory leak in llcp_sock_connect()

2021-03-03 Thread Xiaoming Ni
In llcp_sock_connect(), use kmemdup to allocate memory for "llcp_sock->service_name". The memory is not released in the sock_unlink label of the subsequent failure branch. As a result, memory leakage occurs. fix CVE-2020-25672 Fixes: d646960f7986 ("NFC: Initial LLCP support") Reported-by: "kiyin

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Marc Kleine-Budde
On 03.03.2021 11:31:10, Dario Binacchi wrote: > I think these features need to be developed in a later series. > I would stay with the extension to 64 messages equally divided > between reception and transmission. Fine with me. Marc -- Pengutronix e.K. | Marc Kleine-Budde

Re: [RFC PATCH 4/4] i40e: don't open i40iw client for kdump

2021-03-03 Thread Coiby Xu
Hi Bhupesh, Glad to meet you here:) On Thu, Feb 25, 2021 at 03:41:55PM +0530, Bhupesh SHARMA wrote: Hello Coiby, On Mon, Feb 22, 2021 at 12:40 PM Coiby Xu wrote: i40iw consumes huge amounts of memory. For example, on a x86_64 machine, i40iw consumed 1.5GB for Intel Corporation Ethernet Conn

RE: [PATCH net 1/1] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10

2021-03-03 Thread Joakim Zhang
> -Original Message- > From: ramesh.bab...@intel.com > Sent: 2021年3月3日 23:09 > To: Giuseppe Cavallaro ; Alexandre Torgue > ; Jose Abreu ; David S . > Miller ; Jakub Kicinski ; Maxime > Coquelin > Cc: netdev@vger.kernel.org; linux-st...@st-md-mailman.stormreply.com; > linux-arm-ker...@lis

[RFC V3 net-next 0/3] net: stmmac: implement clocks management

2021-03-03 Thread Joakim Zhang
This patch set tries to implement clocks management, and takes i.MX platform as an example. --- ChangeLogs: V1->V2: * change to pm runtime mechanism. * rename function: _enable() -> _config() * take MDIO bus into account, it needs clocks when interface is closed.

[RFC V3 net-next 1/3] net: stmmac: add clocks management for gmac driver

2021-03-03 Thread Joakim Zhang
This patch intends to add clocks management for stmmac driver: If CONFIG_PM enabled: 1. Keep clocks disabled after driver probed. 2. Enable clocks when up the net device, and disable clocks when down the net device. If CONFIG_PM disabled: Keep clocks always enabled after driver probed. Note: 1.

[RFC V3 net-next 2/3] net: stmmac: add platform level clocks management

2021-03-03 Thread Joakim Zhang
This patch intends to add platform level clocks management. Some platforms may have their own special clocks, they also need to be managed dynamically. If you want to manage such clocks, please implement clks_config callback. Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang --- drivers/net/

[RFC V3 net-next 3/3] net: stmmac: dwmac-imx: add platform level clocks management for i.MX

2021-03-03 Thread Joakim Zhang
Split clocks settings from init callback into clks_config callback, which could support platform level clocks management. Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang --- .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 60 +++ 1 file changed, 36 insertions(+), 24 deletio

Re: [PATCH ipsec 0/2] vti(6): fix ipv4 pmtu check to honor ip header df

2021-03-03 Thread Steffen Klassert
On Tue, Mar 02, 2021 at 10:32:13AM +0100, Sabrina Dubroca wrote: > 2021-02-26, 23:35:04 +0200, Eyal Birger wrote: > > This series aligns vti(6) handling of non-df IPv4 packets exceeding > > the size of the tunnel MTU to avoid sending "Frag needed" and instead > > fragment the packets after encapsul

[PATCH v3] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
Add basic support for the Marvell 88X multi-speed ethernet transceiver. This PHY provides data transmission over fiber-optic as well as Twinax copper links. The 88X supports 2 ports of 10GBase-R and 1000Base-X on the line-side interface. The host-side interface supports 4 ports of 10GBase-

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-03 Thread Björn Töpel
On Wed, 3 Mar 2021 at 08:14, Björn Töpel wrote: > > On 2021-03-03 05:38, Andrii Nakryiko wrote: > > On Mon, Mar 1, 2021 at 2:43 AM Björn Töpel wrote: > >> > >> From: Björn Töpel > >> > >> Now that the AF_XDP rings have load-acquire/store-release semantics, > >> move libbpf to that as well. > >>

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-03 Thread Cornelia Huck
On Wed, 3 Mar 2021 12:01:01 +0800 Jason Wang wrote: > On 2021/3/2 8:08 下午, Cornelia Huck wrote: > > On Mon, 1 Mar 2021 11:51:08 +0800 > > Jason Wang wrote: > > > >> On 2021/3/1 5:25 上午, Michael S. Tsirkin wrote: > >>> On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: > On 20

Re: [RFC v4 05/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-03 Thread Mika Penttilä
On 23.2.2021 13.50, Xie Yongji wrote: This patch introduces an attribute for vDPA device to indicate whether virtual address can be used. If vDPA device driver set it, vhost-vdpa bus driver will not pin user page and transfer userspace virtual address instead of physical address during DMA map

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-03 Thread Shay Agroskin
Jesper Dangaard Brouer writes: On Mon, 1 Mar 2021 13:23:06 +0200 Shay Agroskin wrote: Jesper Dangaard Brouer writes: > On Sun, 28 Feb 2021 23:27:25 +0100 > Lorenzo Bianconi wrote: > >> > > drops = bq->count - sent; >> > > -out: >> > > -bq->count = 0; >> > > +if (unlikely(dr

[PATCH] scsi: target: vhost-scsi: remove redundant initialization of variable ret

2021-03-03 Thread Colin King
From: Colin Ian King The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/vhost/scsi.c | 2 +- 1

next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.

2021-03-03 Thread Valdis Klētnieks
So my kernel build died.. UPD drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.S make[4]: *** No rule to make target '/lib/firmware/rtl_nic/rtl8106e-1.fw', needed by 'drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.o'. Stop. make[3]: *** [scripts/Makefile.buil

Re: [PATCH v3] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
On Wed, Mar 03, 2021 at 11:36:55AM +, Russell King - ARM Linux admin wrote: > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_1baseKR_Full_BIT, supported); > > Does the PHY support backplane links? > It looks like it does, but our hardware only have SFP cages, so I'll drop backplane link mod

[PATCH v1 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong In preparation to make stmmac support multi-vector MSI, we introduce the interrupt status masking according to RX, TX or RXTX. Default to use RXTX inside stmmac_dma_interrupt(), so there is no run-time logic difference now. Signed-off-by: Ong Boon Leong Signed-off-by: Voon

[PATCH v1 net-next 0/5] net: stmmac: enable multi-vector MSI

2021-03-03 Thread Voon Weifeng
This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency,

[PATCH v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong Refactor stmmac_interrupt() by introducing stmmac_common_interrupt() so that we prepare the ISR operation to be friendly to MSI later. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 59 +++ 1 f

[PATCH v1 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI

2021-03-03 Thread Voon Weifeng
From: "Wong, Vee Khee" For interrupt mode INTM=0, TX/RX transfer complete will trigger signal not only on sbd_perch_[tx|rx]_intr_o (Transmit/Receive Per Channel) but also on the sbd_intr_o (Common). As for multi-MSI implementation, setting interrupt mode INTM=1 is more efficient as each TX intr

[PATCH v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong Now we introduce MSI interrupt service routines and hook these routines up if stmmac_open() sees valid irq line being requested:- stmmac_mac_interrupt():- MAC (dev->irq), WOL (wol_irq), LPI (lpi_irq) stmmac_safety_interrupt() :- Safety Feat Correctible Error (sfty_ce_irq

[PATCH v1 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong Intel mgbe controller supports multi-vector interrupts: msi_rx_vec 0,2,4,6,8,10,12,14 msi_tx_vec 1,3,5,7,9,11,13,15 msi_sfty_ue_vec 26 msi_sfty_ce_vec 27 msi_lpi_vec 28 msi_mac_vec 29 During probe(), the driver will starts with request allocation for multi-

[PATCH intel-net 0/3] intel: Rx headroom fixes

2021-03-03 Thread Maciej Fijalkowski
Fix Rx headroom by calling *_rx_offset() after the build_skb Rx ring flag is set. It was reported by Jesper in [0] that XDP_REDIRECT stopped working after [1] patch in i40e. Thanks and sorry! Maciej [0]: https://lore.kernel.org/netdev/20210301131832.0d765179@carbon/ [1]: https://lore.kernel.org

Re: [PATCH v2 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED > to

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-03 Thread Will Deacon
On Tue, Mar 02, 2021 at 10:13:21AM +0100, Daniel Borkmann wrote: > On 3/2/21 9:05 AM, Björn Töpel wrote: > > On 2021-03-01 17:10, Toke Høiland-Jørgensen wrote: > > > Björn Töpel writes: > > > > From: Björn Töpel > > > > > > > > Now that the AF_XDP rings have load-acquire/store-release semantics,

Re: [PATCH v3] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Russell King - ARM Linux admin
Hi, Mostly great, but just a couple more points. On Wed, Mar 03, 2021 at 01:57:57PM +0300, Ivan Bornyakov wrote: > + adv = 0; > + > + if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, > + priv->supported)) > + adv |= ADVERTISE_1000XFULL; > +

Re: [PATCH 4/5] net: page_pool: refactor dma_map into own function page_pool_dma_map

2021-03-03 Thread Mel Gorman
On Tue, Mar 02, 2021 at 08:49:06PM +0200, Ilias Apalodimas wrote: > Hi Mel, > > Can you please CC me in future revisions. I almost missed that! > Will do. > On Mon, Mar 01, 2021 at 04:11:59PM +, Mel Gorman wrote: > > From: Jesper Dangaard Brouer > > > > In preparation for next patch, move

RE: [PATCH] net/mlx5: remove unneeded semicolon

2021-03-03 Thread Parav Pandit
Hi Saeed, > From: Parav Pandit > Sent: Monday, February 22, 2021 3:32 PM > > > > From: Jiapeng Chong > > Sent: Monday, February 22, 2021 3:27 PM > > > > Fix the following coccicheck warnings: > > > > ./drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c:495:2-3: > > Unneeded semicolon. > > >

RE: [PATCH 4/4] nfc: Avoid endless loops caused by repeated llcp_sock_connect()(Internet mail)

2021-03-03 Thread 尹亮
Hi xiaoming, the path can only fix the endless loop problem. it can't fix the meaningless llcp_sock->service_name problem. if we set llcp_sock->service_name to meaningless string, the connect will be failed. and sk->sk_state will not be LLCP_CONNECTED. then we can call llcp_sock_connect() ma

Re: [RFC PATCH v5 19/19] virtio/vsock: update trace event for SEQPACKET

2021-03-03 Thread Arseny Krasnov
On 03.03.2021 01:25, Steven Rostedt wrote: > On Thu, 18 Feb 2021 08:42:15 +0300 > Arseny Krasnov wrote: > > Not sure if this was pulled in yet, but I do have a small issue with this > patch. No, it is in RFC state. > >> @@ -69,14 +82,19 @@ TRACE_EVENT(virtio_transport_alloc_pkt, >>

[PATCH iproute2] q_cake: Fix incorrect printing of signed values in class statistics

2021-03-03 Thread Toke Høiland-Jørgensen
The deficit returned from the kernel is signed, but was printed with a %u specifier in the format string, leading to negative values to be printed as high unsigned values instead. In addition, we passed a negative value to sprint_time() even though that expects an unsigned value. Fix this by changi

[PATCH/v4] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
From: Xuesen Huang bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. Update test_tc_tunnel to verify adding vxl

Re: Re: [RFC v4 05/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-03 Thread Yongji Xie
On Wed, Mar 3, 2021 at 6:52 PM Mika Penttilä wrote: > > > > On 23.2.2021 13.50, Xie Yongji wrote: > > This patch introduces an attribute for vDPA device to indicate > > whether virtual address can be used. If vDPA device driver set > > it, vhost-vdpa bus driver will not pin user page and transfer

net: usb: lan78xx: Problem with ERR_STS

2021-03-03 Thread Sven Schuchmann
Hello Woojung, I am currently working on a project where we use a LAN7801 together with a DP83TC811R phy. The Problem is that if we change link state of the phy to down and up again the LAN7801 is not receiving anything anymore, while sending still works. I already discussed this on the TI Forums

[PATCH nf-next] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-03 Thread Oz Shlomo
Currently the flow table offload replace, destroy and stats work items are executed on a single workqueue. As such, DESTROY and STATS commands may be backloged after a burst of REPLACE work items. This scenario can bloat up memory and may cause active connections to age. Instatiate add, del and st

Re: [PATCH/v4] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
Thanks Cong! Thanks to your suggestion, I try to add a simple test case to test_tc_tunnel. It works for me :) Thanks for your review. > 2021年3月3日 下午8:33,Xuesen Huang 写道: > > From: Xuesen Huang > > bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets > encapsulation. But

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-03-03 Thread Martin Schiller
On 2021-03-03 00:30, Jakub Kicinski wrote: On Tue, 02 Mar 2021 08:04:20 +0100 Martin Schiller wrote: On 2021-03-01 09:56, Xie He wrote: > On Sun, Feb 28, 2021 at 10:56 PM Martin Schiller wrote: >> I mean the change from only one hdlc interface to both hdlc and >> hdlc_x25. >> >> I can't estimat

[PATCH net v2] net: l2tp: reduce log level of messages in receive path, add counter instead

2021-03-03 Thread Matthias Schiffer
Commit 5ee759cda51b ("l2tp: use standard API for warning log messages") changed a number of warnings about invalid packets in the receive path so that they are always shown, instead of only when a special L2TP debug flag is set. Even with rate limiting these warnings can easily cause significant lo

[PATCH intel-net 2/3] ice: move headroom initialization to ice_setup_rx_ctx

2021-03-03 Thread Maciej Fijalkowski
ice_rx_offset(), that is supposed to initialize the Rx buffer headroom, relies on ICE_RX_FLAGS_RING_BUILD_SKB flag as well as XDP prog presence. Currently, the callsite of mentioned function is placed incorrectly within ice_setup_rx_ring() where Rx ring's build skb flag is not set yet. This causes

[PATCH intel-net 1/3] i40e: move headroom initialization to i40e_configure_rx_ring

2021-03-03 Thread Maciej Fijalkowski
i40e_rx_offset(), that is supposed to initialize the Rx buffer headroom, relies on I40E_RXR_FLAGS_BUILD_SKB_ENABLED flag. Currently, the callsite of mentioned function is placed incorrectly within i40e_setup_rx_descriptors() where Rx ring's build skb flag is not set yet. This causes the XDP_REDIRE

[PATCH intel-net 3/3] ixgbe: move headroom initialization to ixgbe_configure_rx_ring

2021-03-03 Thread Maciej Fijalkowski
ixgbe_rx_offset(), that is supposed to initialize the Rx buffer headroom, relies on __IXGBE_RX_BUILD_SKB_ENABLED flag. Currently, the callsite of mentioned function is placed incorrectly within ixgbe_setup_rx_resources() where Rx ring's build skb flag is not set yet. This causes the XDP_REDIRECT t

Re: [RFC v4 05/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-03 Thread Mika Penttilä
On 3.3.2021 14.45, Yongji Xie wrote: On Wed, Mar 3, 2021 at 6:52 PM Mika Penttilä wrote: On 23.2.2021 13.50, Xie Yongji wrote: This patch introduces an attribute for vDPA device to indicate whether virtual address can be used. If vDPA device driver set it, vhost-vdpa bus driver will not p

[PATCH bpf] veth: store queue_mapping independently of XDP prog presence

2021-03-03 Thread Maciej Fijalkowski
Currently, veth_xmit() would call the skb_record_rx_queue() only when there is XDP program loaded on peer interface in native mode. If peer has XDP prog in generic mode, then netif_receive_generic_xdp() has a call to netif_get_rxqueue(skb), so for multi-queue veth it will not be possible to grab a

KASAN: use-after-free Write in cipso_v4_doi_putdef

2021-03-03 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:7a7fd0de Merge branch 'kmap-conversion-for-5.12' of git://.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=164a74dad0 kernel config: https://syzkaller.appspot.com/x/.config?x=779a2568b654c1c6 das

Re: iwlwifi: mvm: add terminate entry for dmi_system_id tables

2021-03-03 Thread Kalle Valo
Wei Yongjun wrote: > Make sure dmi_system_id tables are NULL terminated. This crashed when LTO was > enabled: > > BUG: KASAN: global-out-of-bounds in dmi_check_system+0x5a/0x70 > Read of size 1 at addr c16af750 by task NetworkManager/1913 > > CPU: 4 PID: 1913 Comm: NetworkManager Not t

Re: [PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-03 Thread Kalle Valo
Pierre-Louis Bossart wrote: > An unsigned long variable should rely on '%lu' format strings, not '%zd' > > Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") > Signed-off-by: Pierre-Louis Bossart > Acked-by: Luca Coelho Patch applied to wireless-drivers.git, thanks. 436

[PATCH v4] net: phy: add Marvell 88X2222 transceiver support

2021-03-03 Thread Ivan Bornyakov
Add basic support for the Marvell 88X multi-speed ethernet transceiver. This PHY provides data transmission over fiber-optic as well as Twinax copper links. The 88X supports 2 ports of 10GBase-R and 1000Base-X on the line-side interface. The host-side interface supports 4 ports of 10GBase-

Re: [PATCH] selftests/bpf: Simplify the calculation of variables

2021-03-03 Thread Yonghong Song
On 3/2/21 11:52 PM, Jiapeng Chong wrote: Fix the following coccicheck warnings: ./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Yonghong Song

Re: [PATCH nf-next] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-03 Thread Pablo Neira Ayuso
Hi, On Wed, Mar 03, 2021 at 02:59:53PM +0200, Oz Shlomo wrote: > Currently the flow table offload replace, destroy and stats work items are > executed on a single workqueue. As such, DESTROY and STATS commands may > be backloged after a burst of REPLACE work items. This scenario can bloat > up mem

Re: [PATCH] iwlwifi: ensure that DMI scan table is properly terminated

2021-03-03 Thread Kalle Valo
Jens Axboe writes: > On 3/2/21 8:49 PM, Jens Axboe wrote: >> On 3/2/21 11:34 AM, Coelho, Luciano wrote: >> >>> Thanks for the report and patch! And I'm sorry that we broke your >>> laptop's boot... >>> >>> We already have a patch to fix this: >>> >>> https://patchwork.kernel.org/project/linux-wir

Re: KASAN: use-after-free Write in cipso_v4_doi_putdef

2021-03-03 Thread Paul Moore
On Wed, Mar 3, 2021 at 10:53 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:7a7fd0de Merge branch 'kmap-conversion-for-5.12' of git://.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=164a74dad0 > kernel config:

Re: [RFC PATCH net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-03 Thread Vladyslav Tarasiuk
On 28-Feb-21 02:45, Andrew Lunn wrote: On Wed, Feb 24, 2021 at 05:41:10PM +0200, Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a par

[PATCH] net: mac802154: Fix null pointer dereference

2021-03-03 Thread Pavel Skripkin
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 won't be initialized it will cause NULL dereference in crypto_destroy_tfm(). Call Trace: crypto_free_aead include/crypto/aead.h:191 [inline]

Re: [RFC PATCH 1/12] x86/Hyper-V: Add visibility parameter for vmbus_establish_gpadl()

2021-03-03 Thread Vitaly Kuznetsov
Tianyu Lan writes: > From: Tianyu Lan > > Add visibility parameter for vmbus_establish_gpadl() and prepare > to change host visibility when create gpadl for buffer. > "No functional change" as you don't actually use the parameter. > Signed-off-by: Sunil Muthuswamy > Co-Developed-by: Sunil Mut

[PATCH v3 0/1] Bluetooth: Suspend improvements

2021-03-03 Thread Abhishek Pandit-Subedi
Hi Marcel (and linux bluetooth), Here are a few suspend improvements based on user reports we saw on ChromeOS and feedback from Hans de Goede on the mailing list. I have tested this using our ChromeOS suspend/resume automated tests (full SRHealth test coverage and some suspend resume stress tes

[PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Abhishek Pandit-Subedi
During suspend, there are a few scan enable and set event filter commands that don't need to be sent unless there are actual BR/EDR devices capable of waking the system. Check the HCI_PSCAN bit before writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED to control whether to clea

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-03 Thread Björn Töpel
On 2021-03-03 16:39, Will Deacon wrote: On Tue, Mar 02, 2021 at 10:13:21AM +0100, Daniel Borkmann wrote: [...] Would also be great to get Will's ACK on that when you have a v2. :) Please stick me on CC for that and I'll take a look as I've forgotten pretty much everything about this since

Re: [PATCH net] octeontx2-af: cn10k: fix an array overflow in is_lmac_valid()

2021-03-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 2 Mar 2021 14:21:54 +0300 you wrote: > The value of "lmac_id" can be controlled by the user and if it is larger > then the number of bits in long then it reads outside the bitmap. > The highest valid value is less than M

Re: [PATCH] ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning.

2021-03-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 2 Mar 2021 20:47:47 +0100 you wrote: > GCC 7.5 reports: > ../drivers/net/ethernet/ibm/ibmvnic.c: In function 'ibmvnic_reset_init': > ../drivers/net/ethernet/ibm/ibmvnic.c:5373:51: warning: 'old_num_tx_queues' > may be

Re: [PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED > to

Re: [PATCH net] docs: networking: drop special stable handling

2021-03-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 2 Mar 2021 18:46:43 -0800 you wrote: > Leave it to Greg. > > Signed-off-by: Jakub Kicinski > --- > Documentation/networking/netdev-FAQ.rst | 72 ++- > Documentation/process/stable-kernel-rules.r

Re: [PATCH net 1/1] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10

2021-03-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 3 Mar 2021 20:38:40 +0530 you wrote: > From: Ong Boon Leong > > We introduce dwmac410_dma_init_channel() here for both EQoS v4.10 and > above which use different DMA_CH(n)_Interrupt_Enable bit definitions for > NIE an

pull-request: wireless-drivers-2021-03-03

2021-03-03 Thread Kalle Valo
Hi, here's a pull request to net tree, more info below. Please let me know if there are any problems. Kalle The following changes since commit c490492f15f656340b35cb9e36b9bfdea3539e19: mt76: mt7915: fix unused 'mode' variable (2021-02-26 17:35:15 +0200) are available in the git repository at

Re: [Patch bpf-next v2 8/9] sock_map: update sock type checks for UDP

2021-03-03 Thread Cong Wang
On Tue, Mar 2, 2021 at 10:37 PM Yonghong Song wrote: > > > > On 3/1/21 6:37 PM, Cong Wang wrote: > > From: Cong Wang > > > > Now UDP supports sockmap and redirection, we can safely update > > the sock type checks for it accordingly. > > > > Cc: John Fastabend > > Cc: Daniel Borkmann > > Cc: Jak

Re: [PATCH bpf-next] selftests/bpf: Fix test_attach_probe for powerpc uprobes

2021-03-03 Thread Naveen N. Rao
On 2021/03/02 11:35AM, Jiri Olsa wrote: > On Mon, Mar 01, 2021 at 02:58:53PM -0800, Yonghong Song wrote: > > > > > > On 3/1/21 11:04 AM, Jiri Olsa wrote: > > > When testing uprobes we the test gets GEP (Global Entry Point) > > > address from kallsyms, but then the function is called locally > > >

  1   2   >