Re: [PATCH 3/4] KVM: riscv: selftests: Change command line option

2025-02-27 Thread Andrew Jones
On Wed, Feb 26, 2025 at 12:25:05PM -0800, Atish Patra wrote: > The PMU test commandline option takes an argument to disable a > certain test. The initial assumption behind this was a common use case > is just to run all the test most of the time. However, running a single > test seems more useful i

Re: [PATCH 4/4] KVM: riscv: selftests: Allow number of interrupts to be configurable

2025-02-27 Thread Andrew Jones
On Wed, Feb 26, 2025 at 12:25:06PM -0800, Atish Patra wrote: > It is helpful to vary the number of the LCOFI interrupts generated > by the overflow test. Allow additional argument for overflow test > to accommodate that. It can be easily cross-validated with > /proc/interrupts output in the host. >

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

2025-02-27 Thread Hangbin Liu
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 the bonding configuration. Signed

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

2025-02-27 Thread Hangbin Liu
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 bond_ipsec_free_sa, which is not held by spin_lock_bh(). Additionally, delete the IPsec list in bond

[PATCHv3 net 2/3] bonding: fix xfrm offload feature setup on active-backup mode

2025-02-27 Thread Hangbin Liu
The active-backup bonding mode supports XFRM ESP offload. However, when a bond is added using command like `ip link add bond0 type bond mode 1 miimon 100`, the `ethtool -k` command shows that the XFRM ESP offload is disabled. This occurs because, in bond_newlink(), we change bond link first and reg

[PATCHv3 net 0/3] bond: fix xfrm offload issues

2025-02-27 Thread Hangbin Liu
The first patch fixes the incorrect locks using in bond driver. The second patch fixes the xfrm offload feature during setup active-backup mode. The third patch add a ipsec offload testing. v3: move the ipsec deletion to bond_ipsec_free_sa (Cosmin Ratiu) v2: do not turn carrier on if bond change l

Re: [PATCH 2/4] KVM: riscv: selftests: Do not start the counter in the overflow handler

2025-02-27 Thread Andrew Jones
On Wed, Feb 26, 2025 at 12:25:04PM -0800, Atish Patra wrote: > There is no need to start the counter in the overflow handler as we > intend to trigger precise number of LCOFI interrupts through these > tests. The overflow irq handler has already stopped the counter. As > a result, the stop call fro

Re: [PATCH 1/4] RISC-V: KVM: Disable the kernel perf counter during configure

2025-02-27 Thread Andrew Jones
On Wed, Feb 26, 2025 at 12:25:03PM -0800, Atish Patra wrote: > The perf event should be marked disabled during the creation as > it is not ready to be scheduled until there is SBI PMU start call > or config matching is called with auto start. Otherwise, event add/start > gets called during perf_eve

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: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 bond_ipsec_free_sa, > which is not held by spin_lock

Re: [PATCH sysctl-next v2] selftests/sysctl: fix wording of help messages

2025-02-27 Thread Joel Granados
On Fri, Feb 21, 2025 at 03:51:49PM +0530, Bharadwaj Raju wrote: > Fix grammar such as "number amount of times is > recommended" etc -> "the recommended number of > times". > > Signed-off-by: Bharadwaj Raju > --- > tools/testing/selftests/sysctl/sysctl.sh | 6 +++--- > 1 file changed, 3 insertion

[PATCH][next] selftests/x86/xstate: Fix spelling mistake "hader" -> "header"

2025-02-27 Thread Colin Ian King
There is a spelling mistake in a sig_print message. Fix it. Signed-off-by: Colin Ian King --- tools/testing/selftests/x86/xstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/xstate.c b/tools/testing/selftests/x86/xstate.c index 875777911d82..

[PATCH 3/3] net: ipa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7

2025-02-27 Thread Luca Weiss
Enable the checksum option for these two endpoints in order to allow mobile data to actually work. Without this, no packets seem to make it through the IPA. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss --- drivers/net/ipa/data/ipa_data-v4.7.c | 2 ++ 1 file ch

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

2025-02-27 Thread Lei Yang
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 messages: Qemu output: qemu-kvm: -netdev {"id": "idoejzv8", "type": "tap", "vho

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

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries > (instead of up to MAX_MPLS_LABELS - 1). Very minor nit... The above comments sounds misleading to me. I read it as the new limit is MAX_MPLS_LABELS divided by 16, that is 1. Thank

[PATCH 1/3] net: ipa: Fix v4.7 resource group names

2025-02-27 Thread Luca Weiss
In the downstream IPA driver there's only one group defined for source and destination, and the destination group doesn't have a _DPL suffix. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss --- drivers/net/ipa/data/ipa_data-v4.7.c | 12 +--- 1 file change

[PATCH 0/3] Fixes for IPA v4.7

2025-02-27 Thread Luca Weiss
pa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7 drivers/net/ipa/data/ipa_data-v4.7.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) --- base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6 change-id: 20250227-ipa-v4-7-fixes-20f2af9702e4 Best regards, -- Luca Weiss

[PATCH 2/3] net: ipa: Fix QSB data for v4.7

2025-02-27 Thread Luca Weiss
As per downstream reference, max_writes should be 12 and max_reads should be 13. Fixes: b310de784bac ("net: ipa: add IPA v4.7 support") Signed-off-by: Luca Weiss --- drivers/net/ipa/data/ipa_data-v4.7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/data/

Re: [PATCH 7/8] arm64: Define TIF_PATCH_PENDING for livepatch

2025-02-27 Thread Miroslav Benes
Hi, > diff --git a/arch/arm64/kernel/entry-common.c > b/arch/arm64/kernel/entry-common.c > index b260ddc4d3e9..b537af333b42 100644 > --- a/arch/arm64/kernel/entry-common.c > +++ b/arch/arm64/kernel/entry-common.c > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > #include >

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

2025-02-27 Thread Robin Murphy
On 2025-02-21 4:44 pm, Jason Gunthorpe wrote: On Fri, Feb 21, 2025 at 03:39:45PM +, Robin Murphy wrote: Yuck. Realistically we are going to have no more than two different implementations of this; a fiddly callback interface seems overkill. All we should need in the domain is a simple indica

Re: [PATCH v2 8/9] selftests/mm: Skip map_populate on weird filesystems

2025-02-27 Thread Brendan Jackman
On Mon, 24 Feb 2025 at 11:25, Brendan Jackman wrote: > > On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote: > > > > It seems that 9pfs does not allow truncating unlinked files, Mark Brown > > has noted that NFS may also behave this way. > > I have not investigated at all but I _think_ over the

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

2025-02-27 Thread Petr Pavlu
On 2/25/25 18:24, Shyam Saini wrote: > On Tue, Feb 25, 2025 at 09:33:10AM +0100, Petr Pavlu wrote: >> On 2/21/25 11:42, Rasmus Villemoes wrote: >>> On Thu, Feb 13 2025, Petr Pavlu wrote: >>> On 2/11/25 22:48, Shyam Saini wrote: > In the unlikely event of the allocation failing, it is bett

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

2025-02-27 Thread Uladzislau Rezki (Sony)
Switch for using of get_state_synchronize_rcu_full() and poll_state_synchronize_rcu_full() pair to debug a normal synchronize_rcu() call. Just using "not" full APIs to identify if a grace period is passed or not might lead to a false-positive kernel splat. It can happen, because get_state_synchro

[PATCH v4 1/3] rcutorture: Allow a negative value for nfakewriters

2025-02-27 Thread Uladzislau Rezki (Sony)
Currently "nfakewriters" parameter can be set to any value but there is no possibility to adjust it automatically based on how many CPUs a system has where a test is run on. To address this, if the "nfakewriters" is set to negative it will be adjusted to num_online_cpus() during torture initializa

[PATCH v4 2/3] rcu: Update TREE05.boot to test normal synchronize_rcu()

2025-02-27 Thread Uladzislau Rezki (Sony)
Add extra parameters for rcutorture module. One is the "nfakewriters" which is set -1. There will be created number of test-kthreads which correspond to number of CPUs in a test system. Those threads randomly invoke synchronize_rcu() call. Apart of that "rcu_normal" is set to 1, because it is spec

[PATCH bpf-next 00/10] selftests/bpf: Migrate test_tunnel.sh to test_progs

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
Hi all, This patch series continues the work to migrate the *.sh tests into prog_tests framework. The test_tunnel.sh script has already been partly migrated to test_progs in prog_tests/test_tunnel.c so I add my work to it. PATCH 1 & 2 create some helpers to avoid code duplication and ease the mi

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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 these helpers in all the available tests. Signed-off-by: Bastien Cur

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 11:21:51AM +0200, Nikolay Aleksandrov wrote: > >> @@ -617,6 +611,12 @@ static void bond_ipsec_del_sa_all(struct bonding > >> *bond) > >> > >>mutex_lock(&bond->ipsec_lock); > >>list_for_each_entry(ipsec, &bond->ipsec_list, list) { > >> + if (ipsec->xs->km.

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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 test_gre_no_tunnel_key() from the script. Signed-off-by: Bastien C

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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() and use them in the tests to avoid code duplication. Remove t

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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 DAD feature because it can take lot of time and cause some tests t

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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_ip6erspan() from the script. Signed-off-by: Bastien Curutchet (e

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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() from the script. Signed-off-by: Bastien Curutchet (eBPF Found

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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() and test_ip6ip6() from the script. Signed-off-by: Bastien Curu

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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() from the script. Signed-off-by: Bastien Curutchet (eBPF Found

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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_tunnel.sh script and its Makefile entry Signed-off-by: Bastien

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

2025-02-27 Thread Bastien Curutchet (eBPF Foundation)
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_ip6geneve() from the script. Signed-off-by: Bastien Curutchet (e

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

2025-02-27 Thread Nikolay Aleksandrov
On 2/27/25 15:21, Hangbin Liu wrote: > On Thu, Feb 27, 2025 at 11:21:51AM +0200, Nikolay Aleksandrov wrote: @@ -617,6 +611,12 @@ static void bond_ipsec_del_sa_all(struct bonding *bond) mutex_lock(&bond->ipsec_lock); list_for_each_entry(ipsec, &bond->ipsec_list, lis

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

2025-02-27 Thread Peter Seiderer
On Thu, 27 Feb 2025 11:19:33 +0100, Paolo Abeni wrote: > 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 ge

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

2025-02-27 Thread Peter Seiderer
Hello Paolo, On Thu, 27 Feb 2025 11:24:48 +0100, Paolo Abeni wrote: > On 2/24/25 10:22 AM, Peter Seiderer wrote: > > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries > > (instead of up to MAX_MPLS_LABELS - 1). > > Very minor nit... > > The above comments sounds misleading to

[PATCH net-next v8 5/8] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-27 Thread Peter Seiderer
Honour the user given buffer size for the hex32_arg(), num_arg(), strn_len(), get_imix_entries() and get_labels() calls (otherwise they will access memory outside of the user given buffer). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 -> v8 - rebased on actual net-nex

[PATCH net-next v8 7/8] net: pktgen: remove all superfluous index assignements

2025-02-27 Thread Peter Seiderer
Remove all superfluous index ('i += len') assignements (value not used afterwards). 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 - no changes Changes v5 ->

[PATCH net-next v8 2/8] net: pktgen: remove extra tmp variable (re-use len instead)

2025-02-27 Thread Peter Seiderer
Remove extra tmp variable in pktgen_if_write (re-use len instead). 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 - no changes Changes v5 -> v6 - no changes

[PATCH net-next v8 0/8] Some pktgen fixes/improvments (part II)

2025-02-27 Thread Peter Seiderer
While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given

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

2025-02-27 Thread Peter Seiderer
Add some test for /proc/net/pktgen/... interface. - enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 -> v8 - rebased on actual net-next/main - fix c99 comments (suggested by Paolo Abeni) - add rev-by

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

2025-02-27 Thread Peter Seiderer
Fix mpls list reset parsing to work as describe in Documentation/networking/pktgen.rst: pgset "mpls 0"turn off mpls (or any invalid argument works too!) - before the patch $ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0

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

2025-02-27 Thread Peter Seiderer
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 of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly. Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 ->

[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_

  1   2   >