[PATCH v7 0/3] x86/tdx: Fix HLT logic execution for TDX VMs

2025-02-27 Thread Vishal Annapurve
Direct HLT instruction execution causes #VEs for TDX VMs which is routed to hypervisor via TDCALL. safe_halt() routines execute HLT in STI-shadow so IRQs need to remain disabled until the TDCALL to ensure that pending IRQs are correctly treated as wake events. As per current TDX spec, HLT #VE handl

Re: [PATCH v2 0/3] selftests/net: deflake GRO tests and fix return value and output

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 26 Feb 2025 11:27:22 -0800 you wrote: > The GRO selftests can flake and have some confusing behavior. These > changes make the output and return value of GRO behave as expected, then > deflake the tests. > >

[PATCH v7 2/3] x86/tdx: Fix arch_safe_halt() execution for TDX VMs

2025-02-27 Thread Vishal Annapurve
Direct HLT instruction execution causes #VEs for TDX VMs which is routed to hypervisor via TDCALL. If HLT is executed in STI-shadow, resulting #VE handler will enable interrupts before TDCALL is routed to hypervisor leading to missed wakeup events, as current TDX spec doesn't expose interruptibilit

[PATCH v7 1/3] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

2025-02-27 Thread Vishal Annapurve
From: "Kirill A. Shutemov" CONFIG_PARAVIRT_XXL is mainly defined/used by XEN PV guests. For other VM guest types, features supported under CONFIG_PARAVIRT are self sufficient. CONFIG_PARAVIRT mainly provides support for TLB flush operations and time related operations. For TDX guest as well, par

[PATCH v7 3/3] x86/tdx: Emit warning if IRQs are enabled during HLT #VE handling

2025-02-27 Thread Vishal Annapurve
Direct HLT instruction execution causes #VEs for TDX VMs which is routed to hypervisor via TDCALL. safe_halt() routines execute HLT in STI-shadow so IRQs need to remain disabled until the TDCALL to ensure that pending IRQs are correctly treated as wake events. Emit warning and fail emulation if IR

[PATCH bpf-next v2 0/3] bpf: Fix use-after-free of sockmap

2025-02-27 Thread Jiayuan Chen
1. Issue Syzkaller reported this issue [1]. 2. Reproduce We can reproduce this issue by using the test_sockmap_with_close_on_write() test I provided in selftest, also you need to apply the following patch to ensure 100% reproducibility (sleep after checking sock): ''' static void sk_psock_verdic

[PATCH bpf-next v2 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-27 Thread Jiayuan Chen
Current wrapper function create_pair() is used to create a pair of connected links and returns two fds, but it does not support unix sockets. Here we introduce socketpair() into create_pair(), which supports creating a pair of unix sockets, since the semantics of the two are the same. Signed-off-

[PATCH bpf-next v2 3/3] selftests/bpf: Add edge case tests for sockmap

2025-02-27 Thread Jiayuan Chen
Add edge case tests for sockmap. Acked-by: Cong Wang Signed-off-by: Jiayuan Chen --- .../selftests/bpf/prog_tests/sockmap_basic.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c b/tools/testing/selftests/bpf/prog_

[PATCH bpf-next v2 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-27 Thread Jiayuan Chen
Use RCU lock to protect sk_socket, preventing concurrent close and release by another thread. Because TCP/UDP are already within a relatively large critical section: ''' ip_local_deliver_finish rcu_read_lock ip_protocol_deliver_rcu tcp_rcv/udp_rcv rcu_read_unlock ''' Adding rcu_read_{

Re: [PATCHv3 net 1/3] bonding: move IPsec deletion to bond_ipsec_free_sa

2025-02-27 Thread Hangbin Liu
On Thu, Feb 27, 2025 at 03:31:01PM +0200, Nikolay Aleksandrov wrote: > >> One more thing - note I'm not an xfrm expert by far but it seems to me > >> here you have > >> to also call xdo_dev_state_free() with the old active slave dev otherwise > >> that will > >> never get called with the origina

Re: [PATCH bpf-next v1 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-27 Thread Jiayuan Chen
On Thu, Feb 27, 2025 at 03:04:26PM -0800, Martin KaFai Lau wrote: > On 2/26/25 5:22 AM, Jiayuan Chen wrote: > > Use RCU lock to protect sk_socket, preventing concurrent close and release > > by another thread. > > > > Because TCP/UDP are already within a relatively large critical section: > > '''

Re: [PATCH bpf-next v1 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-27 Thread Jiayuan Chen
On Thu, Feb 27, 2025 at 11:52:04AM -0800, Cong Wang wrote: > On Wed, Feb 26, 2025 at 09:22:41PM +0800, Jiayuan Chen wrote: > > Current wrapper function create_pair() is used to create a pair of > > connected links and returns two fds, but it does not support unix sockets. > > > > Here we introduce

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-27 Thread Alistair Popple
On Thu, Feb 27, 2025 at 11:01:55AM +0100, Danilo Krummrich wrote: > On Thu, Feb 27, 2025 at 11:25:55AM +1100, Alistair Popple wrote: > > On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > > > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote: > > > > > I think build_

Re: [PATCH v6 2/3] x86/tdx: Fix arch_safe_halt() execution for TDX VMs

2025-02-27 Thread Vishal Annapurve
On Wed, Feb 26, 2025 at 3:49 AM Kirill A. Shutemov wrote: > > On Tue, Feb 25, 2025 at 12:47:03AM +, Vishal Annapurve wrote: > > Direct HLT instruction execution causes #VEs for TDX VMs which is routed > > to hypervisor via TDCALL. If HLT is executed in STI-shadow, resulting #VE > > handler wil

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-27 Thread Jakub Kicinski
On Thu, 27 Feb 2025 02:21:25 +0100 Antonio Quartulli wrote: > After some time of struggle trying to fix all hidden bugs that Sabrina > has found...here is v20! > Please note that some patches were already reviewed/tested by a few > people. These patches have retained the tags as they have hardly b

[PATCH v4 0/4] Properly handle module_kobject creation

2025-02-27 Thread Shyam Saini
Hi Everyone, This patch series fixes handling of module_kobject creation. A driver expect module_kset list populated with its corresponding module_kobject to create its /sys/module//drivers directory. Since, [1] commit 96a1a2412acb ("kernel/params.c: defer most of param_sysfs_init() to late_init

[PATCH v4 4/4] drivers: base: handle module_kobject creation

2025-02-27 Thread Shyam Saini
module_add_driver() relies on module_kset list for /sys/module//drivers directory creation. Since, commit 96a1a2412acba ("kernel/params.c: defer most of param_sysfs_init() to late_initcall time") drivers which are initialized from subsys_initcall() or any other higher precedence initcall couldn't

[PATCH v4 1/4] kernel: param: rename locate_module_kobject

2025-02-27 Thread Shyam Saini
The locate_module_kobject() function looks up an existing module_kobject for a given module name. If it cannot find the corresponding module_kobject, it creates one for the given name. This commit renames locate_module_kobject() to lookup_or_create_module_kobject() to better describe its operation

[PATCH v4 2/4] kernel: refactor lookup_or_create_module_kobject()

2025-02-27 Thread Shyam Saini
In the unlikely event of the allocation failing, it is better to let the machine boot with a not fully populated sysfs than to kill it with this BUG_ON(). All callers are already prepared for lookup_or_create_module_kobject() returning NULL. This is also preparation for calling this function from

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-27 Thread Paul E. McKenney
On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote: > Hi Ulad, > > I put these three patches into next (and misc.2025.02.27a) for some > testing, hopefully it all goes well and they can make it v6.15. > > A few tag changed below: > > On Thu, Feb 27, 2025 at 02:16:13PM +0100, Uladzislau R

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-27 Thread Boqun Feng
Hi Ulad, I put these three patches into next (and misc.2025.02.27a) for some testing, hopefully it all goes well and they can make it v6.15. A few tag changed below: On Thu, Feb 27, 2025 at 02:16:13PM +0100, Uladzislau Rezki (Sony) wrote: > Switch for using of get_state_synchronize_rcu_full() an

Re: [PATCH v3 0/2 RESEND] update kselftest framework to check for required configs

2025-02-27 Thread Shuah Khan
On 2/26/25 22:29, Siddharth Menon wrote: Currently, kselftests does not have a generalised mechanism to skip compilation and run tests when required kernel configuration options are disabled. Skipping compile by default is not what we want to do. Tests are supposed to compile and run even when

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-27 Thread Uladzislau Rezki
On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote: > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote: > > Hi Ulad, > > > > I put these three patches into next (and misc.2025.02.27a) for some > > testing, hopefully it all goes well and they can make it v6.15. > > > > A fe

Re: [PATCH v2 3/7] iommu: Make iommu_dma_prepare_msi() into a generic operation

2025-02-27 Thread Nicolin Chen
On Thu, Feb 27, 2025 at 11:32:42AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 27, 2025 at 11:21:28AM +, Robin Murphy wrote: > > All I'm saying is to hide the callback detail in the IOMMUFD code because > > being IOMMUFD modular is unique to IOMMUFD and not the rest of the core > > code's probl

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 27 Feb 2025 02:21:25 +0100 you wrote: > After some time of struggle trying to fix all hidden bugs that Sabrina > has found...here is v20! > > Notable changes since v19: > * copyright years updated to 2025 > * rtn

Re: [PATCH bpf-next v4 0/6] XDP metadata support for tun driver

2025-02-27 Thread Lei Yang
Hi Marcus Since your patches are about the virtual network, I'd like to test it, but it conflicts (Please review the attachment to review more details) when I apply it to the master branch. My test based on this commit: commit 1e15510b71c99c6e49134d756df91069f7d18141 (origin/master, origin/HEAD) M

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-27 Thread Indu Bhagat
On 2/27/25 1:38 AM, Puranjay Mohan wrote: Indu Bhagat writes: On 2/26/25 2:23 AM, Puranjay Mohan wrote: Indu Bhagat writes: On 2/25/25 3:54 PM, Weinan Liu wrote: On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote: On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: I already have a WI

[PATCH] selftests/pcie_bwctrl: Add "set_pcie_speed.sh" to TEST_PROGS

2025-02-27 Thread Yi Lai
The test shell script "set_pcie_speed.sh" is not installed in INSTALL_PATH. Attempting to execute set_pcie_cooling_state.sh shows warning: " ./set_pcie_cooling_state.sh: line 119: ./set_pcie_speed.sh: No such file or directory " Add "set_pcie_speed.sh" to TEST_PROGS. Fixes: 838f12c3d551 ("selft

Re: [PATCH v2 1/3] selftests/net: have `gro.sh -t` return a correct exit code

2025-02-27 Thread Willem de Bruijn
Kevin Krakauer wrote: > On Thu, Feb 27, 2025 at 11:20:15AM -0500, Willem de Bruijn wrote: > > > --- > > > tools/testing/selftests/net/gro.sh | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/testing/selftests/net/gro.sh > > > b/tools/testing/selftests/n

Re: [PATCH bpf-next v1 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-27 Thread John Fastabend
On 2025-02-27 11:45:53, Cong Wang wrote: > On Wed, Feb 26, 2025 at 09:22:40PM +0800, Jiayuan Chen wrote: > > Use RCU lock to protect sk_socket, preventing concurrent close and release > > by another thread. > > > > Because TCP/UDP are already within a relatively large critical section: > > ''' > >

[PATCH][next] KVM: selftests: Fix spelling mistake "avaialable" -> "available"

2025-02-27 Thread Colin Ian King
There is a spelling mistake in a ksft_test_result_skip message. Fix it. Signed-off-by: Colin Ian King --- tools/testing/selftests/kvm/s390/cpumodel_subfuncs_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/s390/cpumodel_subfuncs_test.c b/too

Re: [PATCH bpf-next v1 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-27 Thread Martin KaFai Lau
On 2/26/25 5:22 AM, Jiayuan Chen wrote: Use RCU lock to protect sk_socket, preventing concurrent close and release by another thread. Because TCP/UDP are already within a relatively large critical section: ''' ip_local_deliver_finish rcu_read_lock ip_protocol_deliver_rcu tcp_rcv/udp

Re: [PATCH bpf-next 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > A fair amount of code duplication is present among tests to attach BPF > programs. > > Create generic_attach* helpers that attach BPF programs to a given > interface. > Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. > Use th

Re: [PATCH bpf-next 03/10] selftests/bpf: test_tunnel: Move gre tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > gre tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test gre tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_gre() and te

Re: [PATCH bpf-next 06/10] selftests/bpf: test_tunnel: Move ip6erspan tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > ip6erspan tunnels are tested in the test_tunnel.sh but not in the > test_progs framework. > > Add a new test in test_progs to test ip6erspan tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_

Re: [PATCH bpf-next 09/10] selftests/bpf: test_tunnel: Move ip6tnl tunnel tests to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > ip6tnl tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test ip6tnl tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_ipip6(

Re: [PATCH v2 1/3] selftests/net: have `gro.sh -t` return a correct exit code

2025-02-27 Thread Kevin Krakauer
On Thu, Feb 27, 2025 at 11:20:15AM -0500, Willem de Bruijn wrote: > > --- > > tools/testing/selftests/net/gro.sh | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/net/gro.sh > > b/tools/testing/selftests/net/gro.sh > > index 02c21ff4ca81..aa

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-27 Thread Uladzislau Rezki
Hello, Boqun! > Hi Ulad, > > I put these three patches into next (and misc.2025.02.27a) for some > testing, hopefully it all goes well and they can make it v6.15. > > A few tag changed below: > > On Thu, Feb 27, 2025 at 02:16:13PM +0100, Uladzislau Rezki (Sony) wrote: > > Switch for using of ge

Re: [PATCH v4 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-27 Thread Boqun Feng
On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote: > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote: > > Hi Ulad, > > > > I put these three patches into next (and misc.2025.02.27a) for some > > testing, hopefully it all goes well and they can make it v6.15. > > > > A fe

Re: [PATCH] bpf/selftests: test_select_reuseport_kern: remove unused header

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Thu, 27 Feb 2025 15:08:23 +0100 you wrote: > test_select_reuseport_kern.c is currently including , but it > does not use any definition from there. > > Remove stdlib.h inclusion from test_select_reuseport_kern.c

[PATCH net-next v5 0/4] virtio-net: Link queues to NAPIs

2025-02-27 Thread Joe Damato
Greetings: Welcome to v5. Patches 1, 2, and 4 have no functional changes only updated tags. Patch 3 was refactored as requested by Jason. See the changelog below and the commit message for details. Jakub recently commented [1] that I should not hold this series on virtio-net linking queues to NAP

[PATCH net-next v5 1/4] virtio-net: Refactor napi_enable paths

2025-02-27 Thread Joe Damato
Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct receive_queue. Create a helper, virtnet_napi_do_enable, which contains the logic to enable a NAPI. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_ne

[PATCH v4 3/4] kernel: globalize lookup_or_create_module_kobject()

2025-02-27 Thread Shyam Saini
lookup_or_create_module_kobject() is marked as static and __init, to make it global drop static keyword. Since this function can be called from non-init code, use __modinit instead of __init, __modinit marker will make it __init if CONFIG_MODULES is not defined. Fixes: 96a1a2412acb ("kernel/params

[PATCH net-next v5 4/4] virtio_net: Use persistent NAPI config

2025-02-27 Thread Joe Damato
Use persistent NAPI config so that NAPI IDs are not renumbered as queue counts change. $ sudo ethtool -l ens4 | tail -5 | egrep -i '(current|combined)' Current hardware settings: Combined: 4 $ ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/specs/netdev.yaml \ --dump qu

[PATCH net-next v5 2/4] virtio-net: Refactor napi_disable paths

2025-02-27 Thread Joe Damato
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable to take a struct send_queue. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_net.c | 25 + 1 file changed, 17 insertions(+), 8

[PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-02-27 Thread Joe Damato
Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping can be accessed by user apps. Note that the netif_queue_set_napi currently requires RTNL, so care must be taken to ensure RTNL is held on paths where this API might be reached. The paths in the driver where this API can be reac

Re: [PATCH bpf-next v1 3/3] selftests/bpf: Add edge case tests for sockmap

2025-02-27 Thread Cong Wang
On Wed, Feb 26, 2025 at 09:22:42PM +0800, Jiayuan Chen wrote: > Add edge case tests for sockmap. > > Signed-off-by: Jiayuan Chen Acked-by: Cong Wang I always love to see fixes with test cases. Thanks!

[PATCH]][next] KVM: selftests: Fix spelling mistake "UFFDIO_CONINUE" -> "UFFDIO_CONTINUE"

2025-02-27 Thread Colin Ian King
There is a spelling mistake in a PER_PAGE_DEBUG debug message. Fix it. Signed-off-by: Colin Ian King --- tools/testing/selftests/kvm/lib/userfaultfd_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/lib/userfaultfd_util.c b/tools/testing/self

Re: [PATCH bpf-next 02/10] selftests/bpf: test_tunnel: Add ping helpers

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > All tests use more or less the same ping commands as final validation. > Also test_ping()'s return value is checked with ASSERT_OK() while this > check is already done by the SYS() macro inside test_ping(). > > Create helpers around test_ping(

Re: [PATCH bpf-next 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test ip6gre tunnels. It uses the same > network topology and the same BPF programs than the script. Disable the > IPv6 D

Re: [PATCH bpf-next v1 3/3] selftests/bpf: Add edge case tests for sockmap

2025-02-27 Thread John Fastabend
On 2025-02-26 21:22:42, Jiayuan Chen wrote: > Add edge case tests for sockmap. > > Signed-off-by: Jiayuan Chen > --- Reviewed-by: John Fastabend > .../selftests/bpf/prog_tests/sockmap_basic.c | 57> + > void test_sockmap_basic(void) > { > if (test__start_subtest("sockmap create_update

Re: [PATCH bpf-next 05/10] selftests/bpf: test_tunnel: Move erspan tunnel tests to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > erspan tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test erspan tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_erspan

Re: [PATCH bpf-next 08/10] selftests/bpf: test_tunnel: Move ip6geneve tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > ip6geneve tunnels are tested in the test_tunnel.sh but not in the > test_progs framework. > > Add a new test in test_progs to test ip6geneve tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_

Re: [PATCH bpf-next 10/10] selftests/bpf: test_tunnel: Remove test_tunnel.sh

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > All tests from test_tunnel.sh have been migrated into test test_progs. > The last test remaining in the script is the test_ipip() that is already > covered in the test_prog framework by the NONE case of test_ipip_tunnel(). > > Remove the test_

Re: [PATCH bpf-next v4 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-27 Thread Stanislav Fomichev
On 02/27, Marcus Wichelmann wrote: > Add a selftest that creates a tap device, attaches XDP and TC programs, > writes a packet with a test payload into the tap device and checks the > test result. This test ensures that the XDP metadata support in the tun > driver is enabled and that the metadata s

Re: [PATCH bpf-next 07/10] selftests/bpf: test_tunnel: Move geneve tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > geneve tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test geneve tunnels. It uses the same > network topology and the same BPF programs than the script. > Remove test_geneve

Re: [PATCH bpf-next v1 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-27 Thread John Fastabend
On 2025-02-27 11:52:04, Cong Wang wrote: > On Wed, Feb 26, 2025 at 09:22:41PM +0800, Jiayuan Chen wrote: > > Current wrapper function create_pair() is used to create a pair of > > connected links and returns two fds, but it does not support unix sockets. > > > > Here we introduce socketpair() into

Re: [PATCH bpf-next v1 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-27 Thread Cong Wang
On Wed, Feb 26, 2025 at 09:22:41PM +0800, Jiayuan Chen wrote: > Current wrapper function create_pair() is used to create a pair of > connected links and returns two fds, but it does not support unix sockets. > > Here we introduce socketpair() into create_pair(), which supports creating > a pair of

Re: [PATCH v6 2/3] x86/tdx: Fix arch_safe_halt() execution for TDX VMs

2025-02-27 Thread Vishal Annapurve
On Thu, Feb 27, 2025 at 8:25 AM kernel test robot wrote: > > Hi Vishal, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on tip/x86/core] > [also build test ERROR on tip/master linus/master v6.14-rc4 next-20250227] > [cannot apply to tip

Re: [PATCH v2 6/7] iommufd: Implement sw_msi support natively

2025-02-27 Thread Jason Gunthorpe
On Wed, Feb 19, 2025 at 05:31:41PM -0800, Nicolin Chen wrote: > + cur = kzalloc(sizeof(*cur), GFP_KERNEL); > + if (!cur) > + cur = ERR_PTR(-ENOMEM); > + cur->sw_msi_start = sw_msi_start; > + cur->msi_addr = msi_addr; > + cur->pgoff = max

Re: [PATCH bpf-next v1 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-27 Thread Cong Wang
On Wed, Feb 26, 2025 at 09:22:40PM +0800, Jiayuan Chen wrote: > Use RCU lock to protect sk_socket, preventing concurrent close and release > by another thread. > > Because TCP/UDP are already within a relatively large critical section: > ''' > ip_local_deliver_finish > rcu_read_lock > ip_proto

Re: [PATCH v2 3/7] iommu: Make iommu_dma_prepare_msi() into a generic operation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 09:46:55AM -0800, Nicolin Chen wrote: > I found a bit confusing to use "owner" as the domain->owner isn't > the same thing in this context. Maybe it should be "driver_ops"? Maybe, but I wouldn't churn it > Then, "owner" could be another op structure that holds the owner- >

Re: [PATCHv3 net 1/3] bonding: move IPsec deletion to bond_ipsec_free_sa

2025-02-27 Thread Nikolay Aleksandrov
On 2/27/25 10:50, Nikolay Aleksandrov wrote: > On 2/27/25 10:37, Hangbin Liu wrote: >> The fixed commit placed mutex_lock() inside spin_lock_bh(), which triggers >> a warning: >> >> BUG: sleeping function called from invalid context at... >> >> Fix this by moving the IPsec deletion operation to b

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-27 Thread Puranjay Mohan
Indu Bhagat writes: > On 2/26/25 2:23 AM, Puranjay Mohan wrote: >> Indu Bhagat writes: >> >>> On 2/25/25 3:54 PM, Weinan Liu wrote: On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote: > > On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: >>> I already have a WIP patch

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-27 Thread Danilo Krummrich
On Thu, Feb 27, 2025 at 11:25:55AM +1100, Alistair Popple wrote: > On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote: > > > I think build_assert() is not widely used yet and, until the situation > > improves, > >

Re: [PATCH net-next v7 6/8] net: pktgen: fix mpls reset parsing

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > diff --git a/net/core/pktgen.c b/net/core/pktgen.c > index ae5e81e62733..bb13a4591709 100644 > --- a/net/core/pktgen.c > +++ b/net/core/pktgen.c > @@ -915,8 +915,13 @@ static ssize_t get_labels(const char __user *buffer, > > max = min(8,

Re: [PATCH net-next v7 1/8] net: pktgen: fix mix of int/long

2025-02-27 Thread Simon Horman
On Mon, Feb 24, 2025 at 10:38:56AM +0100, Peter Seiderer wrote: > Hello *, > > On Mon, 24 Feb 2025 10:22:35 +0100, Peter Seiderer wrote: > > > Fix mix of int/long (and multiple conversion from/to) by using consequently > > size_t for i and max and ssize_t for len and adjust function signatures >

Re: [PATCH net-next v7 8/8] selftest: net: add proc_net_pktgen

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > +TEST_F(proc_net_pktgen, dev_cmd_min_pkt_size) { > + ssize_t len; > + > + // with trailing '\0' ... same here. Much more occurrences below. /P

[PATCH v8 4/7] rust: str: implement `strip_prefix` for `BStr`

2025-02-27 Thread Andreas Hindborg
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`. Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Reviewed-by: Daniel Almeida Tested-by: Daniel Almeida Signed-off-by: Andreas Hindborg --- It is also possible to get this method by implementing

[PATCH v8 3/7] rust: str: implement `AsRef` for `[u8]` and `BStr`

2025-02-27 Thread Andreas Hindborg
Implement `AsRef` for `[u8]` and `BStr` so these can be used interchangeably for operations on `BStr`. Reviewed-by: Gary Guo Tested-by: Daniel Almeida Reviewed-by: Daniel Almeida Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 12 1 file changed, 12 insertions(+) diff -

[PATCH v8 7/7] modules: add rust modules files to MAINTAINERS

2025-02-27 Thread Andreas Hindborg
The module subsystem people agreed to maintain rust support for modules [1]. Thus, add entries for relevant files to modules entry in MAINTAINERS. Link: https://lore.kernel.org/all/0d9e596a-5316-4e00-862b-fd77552ae...@suse.com/ [1] Signed-off-by: Andreas Hindborg --- MAINTAINERS | 2 ++ 1 file

[PATCH v8 1/7] rust: str: implement `PartialEq` for `BStr`

2025-02-27 Thread Andreas Hindborg
Implement `PartialEq` for `BStr` by comparing underlying byte slices. Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Daniel Almeida Tested-by: Daniel Almeida Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/rust/kern

Re: [PATCH v7 0/6] rust: extend `module!` macro with integer parameter support

2025-02-27 Thread Petr Pavlu
On 2/25/25 12:54, Miguel Ojeda wrote: > On Tue, Feb 25, 2025 at 11:22 AM Petr Pavlu wrote: >> >> I'd say the easiest is for the entire series to go through the Rust >> tree. I'd also propose that any updates go primarily through that tree >> as well. >> >> Makes sense, I think it is useful for all

[PATCH net-next v8 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-27 Thread Peter Seiderer
Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS entries (instead of up to MAX_MPLS_LABELS - 1). Addresses the following: $ echo "mpls 0f00,0f01,0f02,0f03,0f04,0f05,0f06,0f07,0f08,0f09,0f0a,0f0b,0f0c,0f0d,0f0e,0f0f

[PATCH bpf-next v1 1/3] selftests/bpf: Allow auto port binding for cgroup connect

2025-02-27 Thread Jiayuan Chen
Allow auto port binding for cgroup connect test to avoid binding conflict. Result: ./test_progs -a cgroup_v1v2 59 cgroup_v1v2:OK Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Jiayuan Chen --- .../testing/selftests/bpf/prog_tests/cgroup_v1v2.c | 13 + .../testing/self

[PATCH bpf-next v4 3/6] selftests/bpf: move open_tuntap to network helpers

2025-02-27 Thread Marcus Wichelmann
To test the XDP metadata functionality of the tun driver, it's necessary to create a new tap device first. A helper function for this already exists in lwt_helpers.h. Move it to the common network helpers header, so it can be reused in other tests. Signed-off-by: Marcus Wichelmann Reviewed-by: Wi

[PATCH bpf-next v4 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-27 Thread Marcus Wichelmann
The existing XDP metadata test works by creating a veth pair and attaching XDP & TC programs that drop the packet when the condition of the test isn't fulfilled. The test then pings through the veth pair and succeeds when the ping comes through. While this test works great for a veth pair, it is h

[PATCH v8 5/7] rust: str: add radix prefixed integer parsing functions

2025-02-27 Thread Andreas Hindborg
Add the trait `ParseInt` for parsing string representations of integers where the string representations are optionally prefixed by a radix specifier. Implement the trait for the primitive integer types. Tested-by: Daniel Almeida Reviewed-by: Daniel Almeida Signed-off-by: Andreas Hindborg ---

[PATCH v8 6/7] rust: add parameter support to the `module!` macro

2025-02-27 Thread Andreas Hindborg
Add support for module parameters to the `module!` macro. Implement read only support for integer types without `sysfs` support. Acked-by: Petr Pavlu # from modules perspective Signed-off-by: Andreas Hindborg --- rust/kernel/lib.rs | 1 + rust/kernel/module_param.rs | 221 +

[PATCH bpf-next v1 2/3] selftests/bpf: Allow auto port binding for bpf nf

2025-02-27 Thread Jiayuan Chen
Allow auto port binding for bpf nf test to avoid binding conflict. ./test_progs -a bpf_nf 24/1bpf_nf/xdp-ct:OK 24/2bpf_nf/tc-bpf-ct:OK 24/3bpf_nf/alloc_release:OK 24/4bpf_nf/insert_insert:OK 24/5bpf_nf/lookup_insert:OK 24/6bpf_nf/set_timeout_after_insert:OK 24/7bpf_nf/s

[PATCH net-next v8 3/8] net: pktgen: remove some superfluous variable initializing

2025-02-27 Thread Peter Seiderer
Remove some superfluous variable initializing before hex32_arg call (as the same init is done here already). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 -> v8 - rebased on actual net-next/main - no changes Changes v6 -> v7 - rebased on actual net-next/main - n

[PATCH] bpf/selftests: test_select_reuseport_kern: remove unused header

2025-02-27 Thread eBPF Foundation
t (c) 2018 Facebook */ -#include #include #include #include --- base-commit: 072c40912477ebac2ef98cd0b1532ba9bebda20a change-id: 20250227-remove_wrong_header-02d288d64204 Best regards, -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH v8 2/7] rust: str: implement `Index` for `BStr`

2025-02-27 Thread Andreas Hindborg
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. Add back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`. Reviewed-by: Daniel Almeida Tested-by: Daniel Almeida Reviewed-by: Fiona Behrens Sign

[PATCH bpf-next v4 2/6] net: tun: enable transfer of XDP metadata to skb

2025-02-27 Thread Marcus Wichelmann
When the XDP metadata area was used, it is expected that the same metadata can also be accessed from TC, as can be read in the description of the bpf_xdp_adjust_meta helper function. In the tun driver, this was not yet implemented. To make this work, the skb that is being built on XDP_PASS should

[PATCH v8 0/7] rust: extend `module!` macro with integer parameter support

2025-02-27 Thread Andreas Hindborg
Extend the `module!` macro with support module parameters. Also add some string to integer parsing functions and updates `BStr` with a method to strip a string prefix. Based on code by Adam Bratschi-Kaye lifted from the original `rust` branch [1]. Link: https://github.com/Rust-for-Linux/linux/tr

[PATCH bpf-next v4 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-27 Thread Marcus Wichelmann
Add a selftest that creates a tap device, attaches XDP and TC programs, writes a packet with a test payload into the tap device and checks the test result. This test ensures that the XDP metadata support in the tun driver is enabled and that the metadata size is correctly passed to the skb. See th

[PATCH bpf-next v4 0/6] XDP metadata support for tun driver

2025-02-27 Thread Marcus Wichelmann
Hi all, this series contains some improvements for the selftest patches. The other patches remain unchanged. Please check the changelist below. I have reverted the addition of the NOARP flag from the previous version, as it was not effective and the CI was still failing occasionally because of th

Re: [PATCHv3 net 3/3] selftests: bonding: add ipsec offload test

2025-02-27 Thread Petr Machata
Hangbin Liu writes: > This introduces a test for IPSec offload over bonding, utilizing netdevsim > for the testing process, as veth interfaces do not support IPSec offload. > The test will ensure that the IPSec offload functionality remains operational > even after a failover event occurs in th

[PATCH bpf-next v1 0/3] Optimize bpf selftest to increase CI success rate

2025-02-27 Thread Jiayuan Chen
1. Optimized some static bound port selftests to avoid port occupation when running test_progs -j. 2. Optimized the retry logic for test_maps. Some Failed CI: https://github.com/kernel-patches/bpf/actions/runs/13275542359/job/37064974076 https://github.com/kernel-patches/bpf/actions/runs/135492274

[PATCH bpf-next v1 3/3] selftests/bpf: Fixes for test_maps test

2025-02-27 Thread Jiayuan Chen
BPF CI has failed 3 times in the last 24 hours. Add retry for ENOMEM. It's similar to the optimization plan: commit 2f553b032cad ("selftsets/bpf: Retry map update for non-preallocated per-cpu map") Failed CI: https://github.com/kernel-patches/bpf/actions/runs/13549227497/job/37868926343 https://g

[PATCH bpf-next v4 6/6] selftests/bpf: fix file descriptor assertion in open_tuntap helper

2025-02-27 Thread Marcus Wichelmann
The open_tuntap helper function uses open() to get a file descriptor for /dev/net/tun. The open(2) manpage writes this about its return value: On success, open(), openat(), and creat() return the new file descriptor (a nonnegative integer). On error, -1 is returned and errno is set to indi

[PATCH bpf-next v4 1/6] net: tun: enable XDP metadata support

2025-02-27 Thread Marcus Wichelmann
Enable the support for the bpf_xdp_adjust_meta helper function for XDP buffers initialized by the tun driver. This allows to reserve a metadata area that is useful to pass any information from one XDP program to another one, for example when using tail-calls. Whether this helper function can be us

Re: [PATCHv2 0/2] kvm/x86: vhost task creation failure handling

2025-02-27 Thread Keith Busch
On Thu, Feb 27, 2025 at 06:21:34PM +0800, Lei Yang wrote: > Hi Keith > > There are some error messages from qemu output when I tested this > series of patches with the virtio-net regression test. It can > reproduced by boot up a guest with vhost device after applied your > patches. > Error message

Re: [PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-27 Thread Matthew Wilcox
On Thu, Feb 27, 2025 at 05:55:43AM +, Matthew Wilcox wrote: > On Wed, Feb 26, 2025 at 04:00:25PM -0500, Zi Yan wrote: > > +static int __split_unmapped_folio(struct folio *folio, int new_order, > > + struct page *split_at, struct page *lock_at, > > + struct list_head *list, p

Re: [PATCH v2 3/7] iommu: Make iommu_dma_prepare_msi() into a generic operation

2025-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2025 at 11:21:28AM +, Robin Murphy wrote: > It wouldn't need a hard dependency, it's easy to have a trivial built-in > stub function which becomes valid once the module loads - you literally have > the iommufd_driver infrastructure for precisely that sort of thing already. Yes

Re: [PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-27 Thread Zi Yan
On 27 Feb 2025, at 10:14, Matthew Wilcox wrote: > On Thu, Feb 27, 2025 at 05:55:43AM +, Matthew Wilcox wrote: >> On Wed, Feb 26, 2025 at 04:00:25PM -0500, Zi Yan wrote: >>> +static int __split_unmapped_folio(struct folio *folio, int new_order, >>> + struct page *split_at, struct page

Re: [PATCH net v2] selftests: drv-net: Check if combined-count exists

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 26 Feb 2025 18:19:57 + you wrote: > Some drivers, like tg3, do not set combined-count: > > $ ethtool -l enp4s0f1 > Channel parameters for enp4s0f1: > Pre-set maximums: > RX: 4 > TX: 4 > Oth

[PATCH v11 3/3] selftests/rseq: Add test for mm_cid compaction

2025-02-27 Thread Gabriele Monaco
A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, runs in short bursts for some time. During thi

Re: [PATCH v7 0/6] rust: extend `module!` macro with integer parameter support

2025-02-27 Thread Miguel Ojeda
On Thu, Feb 27, 2025 at 3:55 PM Petr Pavlu wrote: > > From what I can see in this series, the bindings required adding > a number of generic functions to the Rust support code and also most > discussion revolved around that. I'm worried this might be the case also > for foreseeable future updates,

Re: [PATCH] KVM: selftests: access_tracking_perf_test: add option to skip the sanity check

2025-02-27 Thread Sean Christopherson
On Wed, Feb 26, 2025, Maxim Levitsky wrote: > Add an option to skip sanity check of number of still idle pages, > and force it on, in case hypervisor or NUMA balancing > is detected. > > Signed-off-by: Maxim Levitsky > --- > .../selftests/kvm/access_tracking_perf_test.c | 23 +--

  1   2   >