Re: [PATCH bpf-next v2] bpf: check flags in 'bpf_ringbuf_discard()' and 'bpf_ringbuf_submit()'

2021-03-31 Thread Andrii Nakryiko
On Tue, Mar 30, 2021 at 4:16 PM Alexei Starovoitov wrote: > > On Tue, Mar 30, 2021 at 3:54 PM Pedro Tammela wrote: > > > > BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags) > > { > > + if (unlikely(flags & ~(BPF_RB_NO_WAKEUP | BPF_RB_FORCE_WAKEUP))) > > + return -EI

Re: [PATCH v4 bpf 0/3] AF_XDP Socket Creation Fixes

2021-03-31 Thread Björn Töpel
On Wed, 31 Mar 2021 at 08:43, Ciara Loftus wrote: > > This series fixes some issues around socket creation for AF_XDP. > > Patch 1 fixes a potential NULL pointer dereference in > xsk_socket__create_shared. > > Patch 2 ensures that the umem passed to xsk_socket__create(_shared) > remains unchanged

[PATCH net-next v3 2/8] xsk: support get page by addr

2021-03-31 Thread Xuan Zhuo
xsk adds an interface and returns the page corresponding to data. virtio-net does not initialize dma, so it needs page to construct scatterlist to pass to vring. Signed-off-by: Xuan Zhuo Reviewed-by: Dust Li --- include/net/xdp_sock_drv.h | 11 +++ 1 file changed, 11 insertions(+) diff

[PATCH net-next v3 1/8] xsk: XDP_SETUP_XSK_POOL support option check_dma

2021-03-31 Thread Xuan Zhuo
The check_dma option is added to the bpf command. Because virtio-net does not complete the dma initialization in advance. Instead, vring does the dma operation every time data is sent. Of course, in theory, it would be better to complete the dma initialization in advance. But the modification vrin

[PATCH net-next v3 3/8] virtio-net: xsk zero copy xmit setup

2021-03-31 Thread Xuan Zhuo
xsk is a high-performance packet receiving and sending technology. This patch implements the binding and unbinding operations of xsk and the virtio-net queue for xsk zero copy xmit. The xsk zero copy xmit depends on tx napi. So if tx napi is not opened, an error will be reported. And the entire o

[PATCH net-next v3 4/8] virtio-net: xsk zero copy xmit implement wakeup and xmit

2021-03-31 Thread Xuan Zhuo
When the user calls sendto to consume the data in the xsk tx queue, virtnet_xsk_wakeup will be called. In wakeup, it will try to send a part of the data directly, the quantity is operated by the module parameter xsk_budget. There are two purposes for this realization: 1. Send part of the data qui

[PATCH net-next v3 0/8] virtio-net support xdp socket zero copy xmit

2021-03-31 Thread Xuan Zhuo
XDP socket is an excellent by pass kernel network transmission framework. The zero copy feature of xsk (XDP socket) needs to be supported by the driver. The performance of zero copy is very good. mlx5 and intel ixgbe already support this feature, This patch set allows virtio-net to support xsk's ze

[PATCH net-next v3 8/8] virtio-net: free old xmit handle xsk

2021-03-31 Thread Xuan Zhuo
Based on the last two bit of ptr returned by virtqueue_get_buf, 01 represents the packet sent by xdp, 10 is the packet sent by xsk, and 00 is skb by default. If the xmit work of xsk has not been completed, but the ring is full, napi must first exit and wait for the ring to be available, so need_wa

[PATCH net-next v3 6/8] virtio-net: xsk zero copy xmit kick by threshold

2021-03-31 Thread Xuan Zhuo
After testing, the performance of calling kick every time is not stable. And if all the packets are sent and kicked again, the performance is not good. So add a module parameter to specify how many packets are sent to call a kick. 8 is a relatively stable value with the best performance. Signed-o

[PATCH net-next v3 5/8] virtio-net: xsk zero copy xmit support xsk unaligned mode

2021-03-31 Thread Xuan Zhuo
In xsk unaligned mode, the frame pointed to by desc may span two consecutive pages, but not more than two pages. Signed-off-by: Xuan Zhuo Reviewed-by: Dust Li --- drivers/net/virtio_net.c | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH net-next v3 7/8] virtio-net: poll tx call xsk zerocopy xmit

2021-03-31 Thread Xuan Zhuo
poll tx call virtnet_xsk_run, then the data in the xsk tx queue will be continuously consumed by napi. Signed-off-by: Xuan Zhuo Reviewed-by: Dust Li --- drivers/net/virtio_net.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/

[Patch bpf-next] bpf: remove unused parameter from ___bpf_prog_run

2021-03-31 Thread He Fengqing
'stack' parameter is not used in ___bpf_prog_run, the base address have been set to FP reg. So consequently remove it. Signed-off-by: He Fengqing --- kernel/bpf/core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index f5423251c

Re: [PATCH] xfrm/compat: Cleanup WARN()s that can be user-triggered

2021-03-31 Thread Steffen Klassert
On Tue, Mar 30, 2021 at 12:25:06AM +0100, Dmitry Safonov wrote: > Replace WARN_ONCE() that can be triggered from userspace with > pr_warn_once(). Those still give user a hint what's the issue. > > I've left WARN()s that are not possible to trigger with current > code-base and that would mean that

RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Joakim Zhang
> -Original Message- > From: Jon Hunter > Sent: 2021年3月30日 20:51 > To: Joakim Zhang > Cc: netdev@vger.kernel.org; Linux Kernel Mailing List > ; linux-tegra ; > Jakub Kicinski > Subject: Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac > resume back > > > > On 25/03/

Re: [PATCH v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-31 Thread Vlad Buslov
On Wed 31 Mar 2021 at 07:40, Cong Wang wrote: > On Mon, Mar 29, 2021 at 3:55 PM Kumar Kartikeya Dwivedi > wrote: >> diff --git a/net/sched/act_api.c b/net/sched/act_api.c >> index b919826939e0..43cceb924976 100644 >> --- a/net/sched/act_api.c >> +++ b/net/sched/act_api.c >> @@ -1042,6 +1042,9 @

[PATCH v6 00/10] Introduce VDUSE - vDPA Device in Userspace

2021-03-31 Thread Xie Yongji
This series introduces a framework, which can be used to implement vDPA Devices in a userspace program. The work consist of two parts: control path forwarding and data path offloading. In the control path, the VDUSE driver will make use of message mechnism to forward the config operation from vdpa

[PATCH v6 05/10] vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

2021-03-31 Thread Xie Yongji
Add an opaque pointer for DMA mapping. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 +++--- drivers/vhost/vdpa.c | 2 +- include/linux/vdpa.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) di

[PATCH v6 02/10] eventfd: Increase the recursion depth of eventfd_signal()

2021-03-31 Thread Xie Yongji
Increase the recursion depth of eventfd_signal() to 1. This is the maximum recursion depth we have found so far, which can be triggered with the following call chain: kvm_io_bus_write[kvm] --> ioeventfd_write [kvm] --> eventfd_signal

[PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Xie Yongji
Export receive_fd() so that some modules can use it to pass file descriptor between processes without missing any security stuffs. Signed-off-by: Xie Yongji --- fs/file.c| 6 ++ include/linux/file.h | 7 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fs/fi

[PATCH v6 06/10] vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

2021-03-31 Thread Xie Yongji
The upcoming patch is going to support VA mapping/unmapping. So let's factor out the logic of PA mapping/unmapping firstly to make the code more readable. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vhost/vdpa.c | 53 +

[PATCH v6 04/10] vhost-iotlb: Add an opaque pointer for vhost IOTLB

2021-03-31 Thread Xie Yongji
Add an opaque pointer for vhost IOTLB. And introduce vhost_iotlb_add_range_ctx() to accept it. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vhost/iotlb.c | 20 include/linux/vhost_iotlb.h | 3 +++ 2 files changed, 19 insertions

[PATCH v6 03/10] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-03-31 Thread Xie Yongji
Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Cc: sta...@vger.kernel.org Signed-off-by: Xie Yongji Acked-by: Jason Wang Reviewed-by: Stefano Garzarella --- drivers/vhost/vdpa.c | 6 +- 1 file changed, 5 ins

[PATCH v6 08/10] vduse: Implement an MMU-based IOMMU driver

2021-03-31 Thread Xie Yongji
This implements an MMU-based IOMMU driver to support mapping kernel dma buffer into userspace. The basic idea behind it is treating MMU (VA->PA) as IOMMU (IOVA->PA). The driver will set up MMU mapping instead of IOMMU mapping for the DMA transfer so that the userspace process is able to use its vir

[PATCH v6 07/10] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-31 Thread Xie Yongji
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 mapping. And corresponding vma->vm_file and of

[PATCH v6 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-31 Thread Xie Yongji
This VDUSE driver enables implementing vDPA devices in userspace. Both control path and data path of vDPA devices will be able to be handled in userspace. In the control path, the VDUSE driver will make use of message mechnism to forward the config operation from vdpa bus driver to userspace. User

[PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-03-31 Thread Xie Yongji
VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/vduse.rst

Re: [PATCH net] net: avoid 32 x truesize under-estimation for tiny skbs

2021-03-31 Thread Michael S. Tsirkin
On Mon, Mar 29, 2021 at 11:06:09AM +0200, Eric Dumazet wrote: > On Mon, Mar 29, 2021 at 10:52 AM Xuan Zhuo wrote: > > > > On Wed, 13 Jan 2021 08:18:19 -0800, Eric Dumazet > > wrote: > > > From: Eric Dumazet > > > > > > Both virtio net and napi_get_frags() allocate skbs > > > with a very small s

[PATCH 01/11] xfrm: interface: fix ipv4 pmtu check to honor ip header df

2021-03-31 Thread Steffen Klassert
From: Eyal Birger Frag needed should only be sent if the header enables DF. This fix allows packets larger than MTU to pass the xfrm interface and be fragmented after encapsulation, aligning behavior with non-interface xfrm. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-b

[PATCH 10/11] xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets

2021-03-31 Thread Steffen Klassert
Commit 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec crypto offload.") added a XFRM_XMIT flag to avoid duplicate ESP trailer insertion on HW offload. This flag is set on the secpath that is shared amongst segments. This lead to a situation where some segments are not transformed co

[PATCH 05/11] net: xfrm: Localize sequence counter per network namespace

2021-03-31 Thread Steffen Klassert
From: "Ahmed S. Darwish" A sequence counter write section must be serialized or its internal state can get corrupted. The "xfrm_state_hash_generation" seqcount is global, but its write serialization lock (net->xfrm.xfrm_state_lock) is instantiated per network namespace. The write protection is th

pull request (net): ipsec 2021-03-31

2021-03-31 Thread Steffen Klassert
1) Fix ipv4 pmtu checks for xfrm anf vti interfaces. From Eyal Birger. 2) There are situations where the socket passed to xfrm_output_resume() is not the same as the one attached to the skb. Use the socket passed to xfrm_output_resume() to avoid lookup failures when xfrm is used wit

[PATCH 04/11] xfrm: Use actual socket sk instead of skb socket for xfrm_output_resume

2021-03-31 Thread Steffen Klassert
From: Evan Nimmo A situation can occur where the interface bound to the sk is different to the interface bound to the sk attached to the skb. The interface bound to the sk is the correct one however this information is lost inside xfrm_output2 and instead the sk on the skb is used in xfrm_output_

[PATCH 07/11] esp: delete NETIF_F_SCTP_CRC bit from features for esp offload

2021-03-31 Thread Steffen Klassert
From: Xin Long Now in esp4/6_gso_segment(), before calling inner proto .gso_segment, NETIF_F_CSUM_MASK bits are deleted, as HW won't be able to do the csum for inner proto due to the packet encrypted already. So the UDP/TCP packet has to do the checksum on its own .gso_segment. But SCTP is using

[PATCH 08/11] xfrm: BEET mode doesn't support fragments for inner packets

2021-03-31 Thread Steffen Klassert
From: Xin Long BEET mode replaces the IP(6) Headers with new IP(6) Headers when sending packets. However, when it's a fragment before the replacement, currently kernel keeps the fragment flag and replace the address field then encaps it with ESP. It would cause in RX side the fragments to get rea

[PATCH 11/11] xfrm/compat: Cleanup WARN()s that can be user-triggered

2021-03-31 Thread Steffen Klassert
From: Dmitry Safonov Replace WARN_ONCE() that can be triggered from userspace with pr_warn_once(). Those still give user a hint what's the issue. I've left WARN()s that are not possible to trigger with current code-base and that would mean that the code has issues: - relying on current compat_ms

[PATCH 06/11] net: xfrm: Use sequence counter with associated spinlock

2021-03-31 Thread Steffen Klassert
From: "Ahmed S. Darwish" A sequence counter write section must be serialized or its internal state can get corrupted. A plain seqcount_t does not contain the information of which lock must be held to guaranteee write side serialization. For xfrm_state_hash_generation, use seqcount_spinlock_t ins

[PATCH 09/11] xfrm: Fix NULL pointer dereference on policy lookup

2021-03-31 Thread Steffen Klassert
When xfrm interfaces are used in combination with namespaces and ESP offload, we get a dst_entry NULL pointer dereference. This is because we don't have a dst_entry attached in the ESP offloading case and we need to do a policy lookup before the namespace transition. Fix this by expicit checking o

[PATCH 02/11] vti: fix ipv4 pmtu check to honor ip header df

2021-03-31 Thread Steffen Klassert
From: Eyal Birger Frag needed should only be sent if the header enables DF. This fix allows packets larger than MTU to pass the vti interface and be fragmented after encapsulation, aligning behavior with non-vti xfrm. Fixes: d6af1a31cc72 ("vti: Add pmtu handling to vti_xmit.") Signed-off-by: Ey

[PATCH 03/11] vti6: fix ipv4 pmtu check to honor ip header df

2021-03-31 Thread Steffen Klassert
From: Eyal Birger Frag needed should only be sent if the header enables DF. This fix allows IPv4 packets larger than MTU to pass the vti6 interface and be fragmented after encapsulation, aligning behavior with non-vti6 xfrm. Fixes: ccd740cbc6e0 ("vti6: Add pmtu handling to vti6_xmit.") Signed-o

[PATCH net-next 0/7] net: fix some coding style issues

2021-03-31 Thread Weihang Li
Do some cleanups according to the coding style of kernel, including wrong print type, redundant and missing spaces and so on. Yangyang Li (1): net: lpc_eth: fix format warnings of block comments Yixing Liu (6): net: ena: fix inaccurate print type net: ena: remove extra words from comments

[PATCH net-next 4/7] net: amd: correct some format issues

2021-03-31 Thread Weihang Li
From: Yixing Liu There should be a blank line after declarations. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/amd/hplance.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c index e1

[PATCH net-next 6/7] net: toshiba: fix the trailing format of some block comments

2021-03-31 Thread Weihang Li
From: Yixing Liu Use a trailling */ on a separate line for block comments. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/toshiba/spider_net.c | 42 --- drivers/net/ethernet/toshiba/tc35815.c| 3 ++- 2 files changed, 30 insertions

[PATCH net-next 2/7] net: ena: remove extra words from comments

2021-03-31 Thread Weihang Li
From: Yixing Liu Remove the redundant "for" from the commment. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/e

[PATCH net-next 7/7] net: lpc_eth: fix format warnings of block comments

2021-03-31 Thread Weihang Li
From: Yangyang Li Fix the following format warning: 1. Block comments use * on subsequent lines 2. Block comments use a trailing */ on a separate line Signed-off-by: Yangyang Li Signed-off-by: Weihang Li --- drivers/net/ethernet/nxp/lpc_eth.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH net-next 5/7] net: ocelot: fix a trailling format issue with block comments

2021-03-31 Thread Weihang Li
From: Yixing Liu Use a tralling */ on a separate line for block comments. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/mscc/ocelot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet

[PATCH net-next 3/7] net: amd8111e: fix inappropriate spaces

2021-03-31 Thread Weihang Li
From: Yixing Liu Delete unncecessary spaces and add some reasonable spaces according to the coding-style of kernel. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/amd/amd8111e.c | 362 ++-- 1 file changed, 177 insertions(+), 185 de

[PATCH net-next 1/7] net: ena: fix inaccurate print type

2021-03-31 Thread Weihang Li
From: Yixing Liu Use "%u" to replace "hu%". Signed-off-by: Yixing Liu Signed-off-by: Weihang Li --- drivers/net/ethernet/amazon/ena/ena_com.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/en

[PATCH -next] net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()

2021-03-31 Thread Yang Yingliang
Add the missing destroy_workqueue() before return from tipc_crypto_start() in the error handling case. Fixes: 1ef6f7c9390f ("tipc: add automatic session key exchange") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- net/tipc/crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH net-next v3] net: sched: bump refcount for new action in ACT replace mode

2021-03-31 Thread Kumar Kartikeya Dwivedi
Currently, action creation using ACT API in replace mode is buggy. When invoking for non-existent action index 42, tc action replace action bpf obj foo.o sec index 42 kernel creates the action, fills up the netlink response, and then just deletes the action while notifying userspace of

Re: [PATCH v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-31 Thread Kumar Kartikeya Dwivedi
On Wed, Mar 31, 2021 at 10:10:45AM IST, Cong Wang wrote: > On Mon, Mar 29, 2021 at 3:55 PM Kumar Kartikeya Dwivedi > wrote: > > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > > index b919826939e0..43cceb924976 100644 > > --- a/net/sched/act_api.c > > +++ b/net/sched/act_api.c > > @@ -104

RE: [PATCH net-next] sit: proper dev_{hold|put} in ndo_[un]init methods

2021-03-31 Thread Wong, Vee Khee
On Wed, Mar 31, 2021 at 13:58, Eric Dumazet wrote: > > On Wed, Mar 31, 2021 at 2:01 AM Wong, Vee Khee > wrote: > > > > Hi all, > > > > > > > > This patch introduced the following massive warnings printouts on a > > > > Intel x86 Alderlake platform with STMMAC MAC and Marvell 88E2110 PHY. > > > >

Re: [PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-31 Thread Jesper Dangaard Brouer
Hi Ong, Patch is in "Changes Requested". Thus, please send a V2 patch with suggested code changes below. --Jesper On Mon, 29 Mar 2021 18:25:08 +0200 Toke Høiland-Jørgensen wrote: > Jesper Dangaard Brouer writes: > > > On Mon, 29 Mar 2021 16:00:39 +0800 > > Ong Boon Leong wrote: > > > >>

Re: memory leak in virtio_transport_send_pkt_info

2021-03-31 Thread Stefan Hajnoczi
On Mon, Feb 08, 2021 at 08:39:30AM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:9f29bd8b Merge tag 'fs_for_v5.11-rc5' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11e435af50 > kernel

[PATCH] rtlwifi: rtl8188ee: remove redundant assignment of variable rtlpriv->btcoexist.reg_bt_sco

2021-03-31 Thread Yang Li
Assigning value "3" to "rtlpriv->btcoexist.reg_bt_sco" here, but that stored value is overwritten before it can be used. Coverity reports this problem as CWE563: A value assigned to a variable is never used. drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c: rtl8188ee_bt_reg_init Reported-by: A

Re: [PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Christian Brauner
On Wed, Mar 31, 2021 at 04:05:10PM +0800, Xie Yongji wrote: > Export receive_fd() so that some modules can use > it to pass file descriptor between processes without > missing any security stuffs. > > Signed-off-by: Xie Yongji > --- Yeah, as I said in the other mail I'd be comfortable with expos

Re: [PATCH bpf-next] bpf: arm64: Redefine MOV consistent with arch insn

2021-03-31 Thread Jianlin Lv
On Tue, Mar 30, 2021 at 5:31 PM Will Deacon wrote: > > On Tue, Mar 30, 2021 at 03:42:35PM +0800, Jianlin Lv wrote: > > A64_MOV is currently mapped to Add Instruction. Architecturally MOV > > (register) is an alias of ORR (shifted register) and MOV (to or from SP) > > is an alias of ADD (immediate)

Re: [PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Dan Carpenter
On Wed, Mar 31, 2021 at 11:15:45AM +0200, Christian Brauner wrote: > On Wed, Mar 31, 2021 at 04:05:10PM +0800, Xie Yongji wrote: > > Export receive_fd() so that some modules can use > > it to pass file descriptor between processes without > > missing any security stuffs. > > > > Signed-off-by: Xie

Re: [PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Christian Brauner
On Wed, Mar 31, 2021 at 12:26:24PM +0300, Dan Carpenter wrote: > On Wed, Mar 31, 2021 at 11:15:45AM +0200, Christian Brauner wrote: > > On Wed, Mar 31, 2021 at 04:05:10PM +0800, Xie Yongji wrote: > > > Export receive_fd() so that some modules can use > > > it to pass file descriptor between process

Re: [PATCH bpf-next] bpf: arm64: Redefine MOV consistent with arch insn

2021-03-31 Thread Will Deacon
On Wed, Mar 31, 2021 at 05:22:18PM +0800, Jianlin Lv wrote: > On Tue, Mar 30, 2021 at 5:31 PM Will Deacon wrote: > > > > On Tue, Mar 30, 2021 at 03:42:35PM +0800, Jianlin Lv wrote: > > > A64_MOV is currently mapped to Add Instruction. Architecturally MOV > > > (register) is an alias of ORR (shifte

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-03-31 Thread Kumar Kartikeya Dwivedi
On Wed, Mar 31, 2021 at 02:41:40AM IST, Toke Høiland-Jørgensen wrote: > Andrii Nakryiko writes: > > > On Sun, Mar 28, 2021 at 1:11 AM Kumar Kartikeya Dwivedi > > wrote: > >> > >> On Sun, Mar 28, 2021 at 10:12:40AM IST, Andrii Nakryiko wrote: > >> > Is there some succinct but complete enough docum

Hello

2021-03-31 Thread Julian Terry
Hi, Hello my dear greetings to you and how are you doing today it is my pleasure to be in contact with you, my name is Mrs. Julian Terry Adelie and I am from France and I have something very important that I will like to share with you, so please do respond if interested for more discussion. Than

Re: [PATCH bpf-next] bpf: arm64: Redefine MOV consistent with arch insn

2021-03-31 Thread Jianlin Lv
On Wed, Mar 31, 2021 at 5:28 PM Will Deacon wrote: > > On Wed, Mar 31, 2021 at 05:22:18PM +0800, Jianlin Lv wrote: > > On Tue, Mar 30, 2021 at 5:31 PM Will Deacon wrote: > > > > > > On Tue, Mar 30, 2021 at 03:42:35PM +0800, Jianlin Lv wrote: > > > > A64_MOV is currently mapped to Add Instruction.

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-03-31 Thread Kumar Kartikeya Dwivedi
On Wed, Mar 31, 2021 at 02:55:47AM IST, Daniel Borkmann wrote: > Do we even need the _block variant? I would rather prefer to take the chance > and make it as simple as possible, and only iff really needed extend with > other APIs, for example: The block variant can be dropped, I'll use the TC_BLO

Re: [PATCH bpf-next 0/2] xsk: introduce generic almost-zerocopy xmit

2021-03-31 Thread Magnus Karlsson
On Wed, Mar 31, 2021 at 1:17 AM Alexander Lobakin wrote: > > This series is based on the exceptional generic zerocopy xmit logics > initially introduced by Xuan Zhuo. It extends it the way that it > could cover all the sane drivers, not only the ones that are capable > of xmitting skbs with no lin

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-03-31 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 3/30/21 10:39 PM, Andrii Nakryiko wrote: >> On Sun, Mar 28, 2021 at 1:11 AM Kumar Kartikeya Dwivedi >> wrote: >>> On Sun, Mar 28, 2021 at 10:12:40AM IST, Andrii Nakryiko wrote: Is there some succinct but complete enough documentation/tutorial/etc that I can

Re: [PATCH net-next v3 8/8] virtio-net: free old xmit handle xsk

2021-03-31 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Xuan-Zhuo/virtio-net-support-xdp-socket-zero-copy-xmit/20210331-151437 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net

[PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
This change introduces initial support for a WWAN subsystem. Given the complexity and heterogeneity of existing WWAN hardwares and interfaces, there is no strict definition of what a WWAN device is and how it should be represented. It's often a collection of multiple devices that perform the global

[PATCH net-next v6 2/2] net: Add Qcom WWAN control driver

2021-03-31 Thread Loic Poulain
The MHI WWWAN control driver allows MHI QCOM-based modems to expose different modem control protocols/ports to userspace, so that userspace modem tools or daemon (e.g. ModemManager) can control WWAN config and state (APN config, SMS, provider selection...). A QCOM-based modem can expose one or seve

[PATCH net-next v7 2/2] net: Add Qcom WWAN control driver

2021-03-31 Thread Loic Poulain
The MHI WWWAN control driver allows MHI QCOM-based modems to expose different modem control protocols/ports to userspace, so that userspace modem tools or daemon (e.g. ModemManager) can control WWAN config and state (APN config, SMS, provider selection...). A QCOM-based modem can expose one or seve

[PATCH net-next v7 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
This change introduces initial support for a WWAN subsystem. Given the complexity and heterogeneity of existing WWAN hardwares and interfaces, there is no strict definition of what a WWAN device is and how it should be represented. It's often a collection of multiple devices that perform the global

Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Greg KH
On Wed, Mar 31, 2021 at 12:39:09PM +0200, Loic Poulain wrote: > This change introduces initial support for a WWAN subsystem. Given the > complexity and heterogeneity of existing WWAN hardwares and interfaces, > there is no strict definition of what a WWAN device is and how it should > be represente

Re: memory leak in virtio_transport_send_pkt_info

2021-03-31 Thread Stefano Garzarella
On Wed, Mar 31, 2021 at 10:04:18AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 08, 2021 at 08:39:30AM -0800, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:9f29bd8b Merge tag 'fs_for_v5.11-rc5' of git://git.kernel... git tree: upstream console output: https://syz

Re: [PATCH v4 0/3] PCI: Disable parity checking

2021-03-31 Thread Heiner Kallweit
On 30.03.2021 19:43, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > I think this is essentially the same as Heiner's v3 posting, with these > changes: > > - Added a pci_disable_parity() interface in pci.c instead of making a > public pci_quirk_broken_parity() because quirks.c is only compi

RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Joakim Zhang
> -Original Message- > From: Joakim Zhang > Sent: 2021年3月31日 15:44 > To: Jon Hunter > Cc: netdev@vger.kernel.org; Linux Kernel Mailing List > ; linux-tegra ; > Jakub Kicinski > Subject: RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac > resume back > > > > -Origi

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Jon Hunter
On 31/03/2021 08:43, Joakim Zhang wrote: ... >>> You mean one of your boards? Does other boards with STMMAC can >>> work >> fine? >> >> We have two devices with the STMMAC and one works OK and the other fails. >> They are different generation of device and so there

Re: [PATCH v4 0/3] PCI: Disable parity checking

2021-03-31 Thread Krzysztof Wilczyński
Hi Bjorn, > I think this is essentially the same as Heiner's v3 posting, with these > changes: > > - Added a pci_disable_parity() interface in pci.c instead of making a > public pci_quirk_broken_parity() because quirks.c is only compiled when > CONFIG_PCI_QUIRKS=y. Very nice idea to ad

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Jon Hunter
On 31/03/2021 12:10, Joakim Zhang wrote: ... You mean one of your boards? Does other boards with STMMAC can work >>> fine? >>> >>> We have two devices with the STMMAC and one works OK and the >>> other > fails. >>> They are different generation of devic

Re: Re: [PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Yongji Xie
On Wed, Mar 31, 2021 at 5:15 PM Christian Brauner wrote: > > On Wed, Mar 31, 2021 at 04:05:10PM +0800, Xie Yongji wrote: > > Export receive_fd() so that some modules can use > > it to pass file descriptor between processes without > > missing any security stuffs. > > > > Signed-off-by: Xie Yongji

Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
Hi Greg, On Wed, 31 Mar 2021 at 12:44, Greg KH wrote: > > On Wed, Mar 31, 2021 at 12:39:09PM +0200, Loic Poulain wrote: > > This change introduces initial support for a WWAN subsystem. Given the > > complexity and heterogeneity of existing WWAN hardwares and interfaces, > > there is no strict def

RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-31 Thread Joakim Zhang
> -Original Message- > From: Jon Hunter > Sent: 2021年3月31日 19:29 > To: Joakim Zhang ; Giuseppe Cavallaro > ; Alexandre Torgue ; > Jose Abreu > Cc: netdev@vger.kernel.org; Linux Kernel Mailing List > ; linux-tegra ; > Jakub Kicinski > Subject: Re: Regression v5.12-rc3: net: stmmac: re-in

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-31 Thread Will Deacon
On Tue, Mar 30, 2021 at 05:28:19PM +0100, Robin Murphy wrote: > On 2021-03-30 14:58, Will Deacon wrote: > > On Tue, Mar 30, 2021 at 02:19:38PM +0100, Robin Murphy wrote: > > > On 2021-03-30 14:11, Will Deacon wrote: > > > > On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christoph Hellwig wrote: > > > >

Re: [PATCH] ip-nexthop: support flush by id

2021-03-31 Thread Ido Schimmel
On Wed, Mar 31, 2021 at 10:22:34AM +0800, Chunmei Xu wrote: > add id to struct filter to record the 'id', > filter id only when id is set, otherwise flush all. > > Signed-off-by: Chunmei Xu > --- > ip/ipnexthop.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/

Re: [PATCH bpf-next 0/2] xsk: introduce generic almost-zerocopy xmit

2021-03-31 Thread Alexander Lobakin
From: Magnus Karlsson Date: Wed, 31 Mar 2021 11:44:45 +0200 > On Wed, Mar 31, 2021 at 1:17 AM Alexander Lobakin wrote: > > > > This series is based on the exceptional generic zerocopy xmit logics > > initially introduced by Xuan Zhuo. It extends it the way that it > > could cover all the sane dr

Re: [PATCH V2 1/1] mm:improve the performance during fork

2021-03-31 Thread Vlastimil Babka
On 3/31/21 7:44 AM, Andrew Morton wrote: > On Mon, 29 Mar 2021 20:36:35 +0800 qianjun.ker...@gmail.com wrote: > >> From: jun qian >> >> In our project, Many business delays come from fork, so >> we started looking for the reason why fork is time-consuming. >> I used the ftrace with function_grap

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

2021-03-31 Thread Jason Gunthorpe
On Wed, Mar 31, 2021 at 08:38:39AM +0200, Greg Kroah-Hartman wrote: > On Tue, Mar 30, 2021 at 07:43:41PM -0300, Jason Gunthorpe wrote: > > > With :01:00.0/sriov/BB:DD.F/vf_msix_count, sriov/ will contain > > > 1 file and 1K subdirectories. > > > > The smallest directory sizes is with the curre

Re: [PATCH v6 01/10] file: Export receive_fd() to modules

2021-03-31 Thread Christian Brauner
On Wed, Mar 31, 2021 at 07:32:33PM +0800, Yongji Xie wrote: > On Wed, Mar 31, 2021 at 5:15 PM Christian Brauner > wrote: > > > > On Wed, Mar 31, 2021 at 04:05:10PM +0800, Xie Yongji wrote: > > > Export receive_fd() so that some modules can use > > > it to pass file descriptor between processes wit

[PATCH v2 bpf-next 0/2] xsk: introduce generic almost-zerocopy xmit

2021-03-31 Thread Alexander Lobakin
This series is based on the exceptional generic zerocopy xmit logics initially introduced by Xuan Zhuo. It extends it the way that it could cover all the sane drivers, not only the ones that are capable of xmitting skbs with no linear space. The first patch is a random while-we-are-here improvemen

Re: [PATCH net-next v1 3/3] net: fec: add basic selftest support

2021-03-31 Thread Andrew Lunn
On Tue, Mar 30, 2021 at 03:54:07PM +0200, Oleksij Rempel wrote: > Port some parts of the stmmac selftest to the FEC. This patch was tested > on iMX6DL. > With this tests it is possible to detect some basic issues like: > - MAC loopback fail: most probably wrong clock configuration. > - PHY loopback

[PATCH v2 bpf-next 1/2] xsk: speed-up generic full-copy xmit

2021-03-31 Thread Alexander Lobakin
There are a few moments that are known for sure at the moment of copying: - allocated skb is fully linear; - its linear space is long enough to hold the full buffer data. So, the out-of-line skb_put(), skb_store_bits() and the check for a retcode can be replaced with plain memcpy(__skb_put()) wi

[PATCH v2 bpf-next 2/2] xsk: introduce generic almost-zerocopy xmit

2021-03-31 Thread Alexander Lobakin
The reasons behind IFF_TX_SKB_NO_LINEAR are: - most drivers expect skb with the linear space; - most drivers expect hard header in the linear space; - many drivers need some headroom to insert custom headers and/or pull headers from frags (pskb_may_pull() etc.). With some bits of overhead, w

RE: [Intel-wired-lan] [PATCH intel-net] i40e: fix receiving of single packets in xsk zero-copy mode

2021-03-31 Thread Bhandare, KiranX
> -Original Message- > From: Intel-wired-lan On Behalf Of > Magnus Karlsson > Sent: Friday, March 19, 2021 3:14 PM > To: Karlsson, Magnus ; intel-wired- > l...@lists.osuosl.org; Nguyen, Anthony L ; > Fijalkowski, Maciej > Cc: netdev@vger.kernel.org; Joshi, Sreedevi > Subject: [Intel-wire

RE: [PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-31 Thread Ong, Boon Leong
>> diff --git a/net/core/xdp.c b/net/core/xdp.c >> index 05354976c1fc..4eaa28972af2 100644 >> --- a/net/core/xdp.c >> +++ b/net/core/xdp.c >> @@ -350,7 +350,8 @@ static void __xdp_return(void *data, struct >xdp_mem_info *mem, bool napi_direct, >> /* mem->id is valid, checked in >xdp_rx

Sevgili

2021-03-31 Thread Evelyn Robinson
I'm Evelyn, I need to discuss something with you, I hope we can start a relationship from here. I hope to come here soon. Thanks. -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-31 Thread Robin Murphy
On 2021-03-31 12:49, Will Deacon wrote: On Tue, Mar 30, 2021 at 05:28:19PM +0100, Robin Murphy wrote: On 2021-03-30 14:58, Will Deacon wrote: On Tue, Mar 30, 2021 at 02:19:38PM +0100, Robin Murphy wrote: On 2021-03-30 14:11, Will Deacon wrote: On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christo

Re: [PATCH] udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...)

2021-03-31 Thread Norman Maurer
Friendly ping… As this missing change was most likely an oversight in the original commit I do think it should go into 5.12 and subsequently stable as well. That’s also the reason why I didn’t send a v2 and changed the commit message / subject for the patch. For me it clearly is a bug and not

Re: [PATCH v5 bpf-next 06/17] libbpf: xsk: use bpf_link

2021-03-31 Thread Toke Høiland-Jørgensen
Maciej Fijalkowski writes: > Currently, if there are multiple xdpsock instances running on a single > interface and in case one of the instances is terminated, the rest of > them are left in an inoperable state due to the fact of unloaded XDP > prog from interface. > > Consider the scenario below

Re: [PATCH] udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...)

2021-03-31 Thread Paolo Abeni
On Wed, 2021-03-31 at 15:10 +0200, Norman Maurer wrote: > As this missing change was most likely an oversight in the original > commit I do think it should go into 5.12 and subsequently stable as > well. That’s also the reason why I didn’t send a v2 and changed the > commit message / subject for th

Re: [PATCH net-next 2/3] net: dsa: Allow default tag protocol to be overridden from DT

2021-03-31 Thread Vladimir Oltean
On Fri, Mar 26, 2021 at 02:57:20PM +0200, Vladimir Oltean wrote: > Hi Tobias, > > On Fri, Mar 26, 2021 at 11:56:47AM +0100, Tobias Waldekranz wrote: > > } else { > > - dst->tag_ops = dsa_tag_driver_get(tag_protocol); > > - if (IS_ERR(dst->tag_ops)) { > > -

[PATCH net v2 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-31 Thread Ong Boon Leong
xdp_return_frame() may be called outside of NAPI context to return xdpf back to page_pool. xdp_return_frame() calls __xdp_return() with napi_direct = false. For page_pool memory model, __xdp_return() calls xdp_return_frame_no_direct() unconditionally and below false negative kernel BUG throw happen

[ANNOUNCE] New list for technical discussion about IPsec implementation and specification.

2021-03-31 Thread Steffen Klassert
Hi netdev, I want to announce a new public mailinglist for technical discussion about IPsec implementation and specification. Discussion topics are development on IPsec implementation (ESP, IKEv2 etc.) and specification. Patches for an early review are welcome too. If you are interested, please

  1   2   3   >