Re: [PATCH 19/18] selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed

2024-05-06 Thread Peter Hutterer
On Mon, May 06, 2024 at 04:36:12PM +0200, bent...@kernel.org wrote: > From: Benjamin Tissoires > > udev-hid-bpf is still not installed everywhere, and we should probably > not assume it is installed automatically. > > Signed-off-by: Benjamin Tissoires > --- > > I wanted to apply this series

Re: [PATCH bpf-next v4 3/3] selftests/bpf: Support nonblock for send_recv_data

2024-05-06 Thread Geliang Tang
On Wed, 2024-04-10 at 14:34 -0700, Martin KaFai Lau wrote: > On 4/9/24 11:13 PM, Geliang Tang wrote: > > From: Geliang Tang > > > > Some tests, such as the MPTCP bpf tests, require send_recv_data > > helper > > to run in nonblock mode. > > > > This patch adds nonblock support for

Re: [PATCH net-next v2] selftest: epoll_busy_poll: epoll busy poll tests

2024-05-06 Thread Jakub Kicinski
On Mon, 6 May 2024 18:40:00 -0700 Joe Damato wrote: > Ah, sorry -- this is because I had assumed the test would run without > CAP_NET_ADMIN, but since: > > epoll_busy_poll.c:204:test_set_invalid:Expected -1 (-1) == ret (0) > > succeeds (ret = 0), clearly I am mistaken. Sorry about that. > > I

Re: [PATCH net-next v2] selftest: epoll_busy_poll: epoll busy poll tests

2024-05-06 Thread Joe Damato
On Mon, May 06, 2024 at 06:12:54PM -0700, Jakub Kicinski wrote: > On Mon, 6 May 2024 20:53:22 + Joe Damato wrote: > > Add a simple test for the epoll busy poll ioctls, using the kernel > > selftest harness. > > > > This test ensures that the ioctls have the expected return codes and > > that

Re: [PATCH v2] selftests/net: fix uninitialized variables

2024-05-06 Thread Mat Martineau
On Mon, 6 May 2024, John Hubbard wrote: When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about three variables that are not initialized in all cases: 1) The opt_ipproto_off variable is used uninitialized if "testname" is not "ip". Willem de Bruijn

Re: [PATCH net-next v2] selftest: epoll_busy_poll: epoll busy poll tests

2024-05-06 Thread Jakub Kicinski
On Mon, 6 May 2024 20:53:22 + Joe Damato wrote: > Add a simple test for the epoll busy poll ioctls, using the kernel > selftest harness. > > This test ensures that the ioctls have the expected return codes and > that the kernel properly gets and sets epoll busy poll parameters. > > The test

Re: [PATCH v4 00/30] NT synchronization primitive driver

2024-05-06 Thread Elizabeth Figura
On Friday, April 19, 2024 3:46:07 PM CDT Elizabeth Figura wrote: > On Friday, 19 April 2024 11:16:11 CDT Peter Zijlstra wrote: > > > On Tue, Apr 16, 2024 at 05:18:56PM -0500, Elizabeth Figura wrote: > > > > > On Tuesday, 16 April 2024 16:18:24 CDT Elizabeth Figura wrote: > > > > > > > On

Re: [PATCH v4 00/30] NT synchronization primitive driver

2024-05-06 Thread Elizabeth Figura
On Friday, April 19, 2024 3:46:07 PM CDT Elizabeth Figura wrote: > On Friday, 19 April 2024 11:16:11 CDT Peter Zijlstra wrote: > > > On Tue, Apr 16, 2024 at 05:18:56PM -0500, Elizabeth Figura wrote: > > > > > On Tuesday, 16 April 2024 16:18:24 CDT Elizabeth Figura wrote: > > > > > > > On

Re: [PATCH v2] selftests: exec: make binaries position independent

2024-05-06 Thread John Hubbard
On 5/6/24 5:14 PM, Fangrui Song wrote: On Mon, May 6, 2024 at 5:05 PM Kees Cook wrote: On Mon, May 06, 2024 at 04:30:27PM -0700, Fangrui Song wrote: On Tue, Apr 16, 2024 at 10:28 AM Kees Cook wrote: On Tue, Apr 16, 2024 at 08:28:29PM +0500, Muhammad Usama Anjum wrote: The -static

Re: [PATCH v2] selftests: exec: make binaries position independent

2024-05-06 Thread Fangrui Song
On Mon, May 6, 2024 at 5:05 PM Kees Cook wrote: > > On Mon, May 06, 2024 at 04:30:27PM -0700, Fangrui Song wrote: > > On Tue, Apr 16, 2024 at 10:28 AM Kees Cook wrote: > > > > > > On Tue, Apr 16, 2024 at 08:28:29PM +0500, Muhammad Usama Anjum wrote: > > > > The -static overrides the -pie and

Re: [PATCH v2] selftests: exec: make binaries position independent

2024-05-06 Thread Kees Cook
On Mon, May 06, 2024 at 04:30:27PM -0700, Fangrui Song wrote: > On Tue, Apr 16, 2024 at 10:28 AM Kees Cook wrote: > > > > On Tue, Apr 16, 2024 at 08:28:29PM +0500, Muhammad Usama Anjum wrote: > > > The -static overrides the -pie and binaries aren't position independent > > > anymore. Use

Re: [PATCH net-next v3 2/2] selftests/net: add ICMP unreachable over IPsec tunnel

2024-05-06 Thread Jakub Kicinski
On Mon, 6 May 2024 17:37:54 +0200 Antony Antony wrote: > This appears to be an error from the v2 run, which was sent yesterday. > The v3 patch should have superseded it. > > The branch net-dev-testing/net-next-2024-05-06--12-00 contains the v2 patch. > I wonder if net-dev testing recognized v3

Re: [PATCH v2] selftests: exec: make binaries position independent

2024-05-06 Thread Fangrui Song
On Tue, Apr 16, 2024 at 10:28 AM Kees Cook wrote: > > On Tue, Apr 16, 2024 at 08:28:29PM +0500, Muhammad Usama Anjum wrote: > > The -static overrides the -pie and binaries aren't position independent > > anymore. Use -static-pie instead which would produce a static and > > position independent

Re: [PATCH 0/8] selftests: x86: build suite with clang

2024-05-06 Thread Fangrui Song
On Wed, May 1, 2024 at 5:29 AM Muhammad Usama Anjum wrote: > > This series fixes build errors found by clang to allow the x86 suite to > get built with the clang. > > Unfortunately, there is one bug [1] in the clang becuase of which > extended asm isn't handled correctly by it and build fails for

Re: [PATCH v3] selftests/vDSO: Explicit unsigned char conversion for elf_hash

2024-05-06 Thread Edward Liaw
On Mon, May 6, 2024 at 12:32 PM David Laight wrote: > > > That makes a lot more sense. I sent v4 https://lore.kernel.org/all/20240506181951.1804451-1-edl...@google.com/. I updated the commit log to reflect the change but I'm not sure if I did it right for the mailing list. Should I have added

Re: [PATCH bpf-next v3] selftests/bpf: Move test_dev_cgroup to prog_tests

2024-05-06 Thread Yonghong Song
On 5/3/24 6:55 AM, Muhammad Usama Anjum wrote: On 4/5/24 1:06 AM, Yonghong Song wrote: On 4/3/24 5:03 AM, Muhammad Usama Anjum wrote: On 4/3/24 7:36 AM, Yonghong Song wrote: On 4/2/24 8:16 AM, Muhammad Usama Anjum wrote: Yonghong Song, Thank you so much for replying. I was missing how to

Re: [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings

2024-05-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Sun, 5 May 2024 16:00:54 -0700 you wrote: > When building either tools/bpf/bpftool, or tools/testing/selftests/hid, > (the same Makefile is used for these), clang generates many instances of > the following: > >

Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Mon, 6 May 2024 16:50:22 +0200 you wrote: > Cast operation has a higher precedence than addition. The code here > wants to zero the 2nd half of the 64-bit metadata, but due to a pointer > arithmetic mistake, it

[PATCH net-next v2] selftest: epoll_busy_poll: epoll busy poll tests

2024-05-06 Thread Joe Damato
Add a simple test for the epoll busy poll ioctls, using the kernel selftest harness. This test ensures that the ioctls have the expected return codes and that the kernel properly gets and sets epoll busy poll parameters. The test can be expanded in the future to do real busy polling (provided

Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread Toke Høiland-Jørgensen
Michal Schmidt writes: > Cast operation has a higher precedence than addition. The code here > wants to zero the 2nd half of the 64-bit metadata, but due to a pointer > arithmetic mistake, it writes the zero at offset 16 instead. > > Just adding parentheses around "data + 4" would fix this, but

RE: [PATCH v3] selftests/vDSO: Explicit unsigned char conversion for elf_hash

2024-05-06 Thread David Laight
From: Edward Liaw > Sent: 06 May 2024 18:34 > > On Mon, May 6, 2024 at 10:16 AM Justin Stitt wrote: > > > > On Sun, May 5, 2024 at 6:21 AM David Laight wrote: > > > > > > From: Justin Stitt > > > > Sent: 01 May 2024 20:55 > > > ... > > > > > static unsigned long elf_hash(const unsigned char

Re: [PATCH v2] selftests/net: fix uninitialized variables

2024-05-06 Thread Willem de Bruijn
John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about three variables that are not initialized in all > cases: > > 1) The opt_ipproto_off variable is used uninitialized if "testname" is > not "ip". Willem de Bruijn pointed

Re: [PATCH] selftests/exec: build with -fPIE instead of -pie, to make clang happy

2024-05-06 Thread John Hubbard
On 5/6/24 10:09 AM, Kees Cook wrote: On Fri, May 03, 2024 at 07:23:01PM -0700, John Hubbard wrote: clang doesn't deal well with "-pie -static": it warns that -pie is an unused option here. Changing to "-fPIE -static" solves this problem for clang, while keeping the gcc results identical. The

[PATCH v2] selftests/net: fix uninitialized variables

2024-05-06 Thread John Hubbard
When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about three variables that are not initialized in all cases: 1) The opt_ipproto_off variable is used uninitialized if "testname" is not "ip". Willem de Bruijn pointed out that this is an actual bug, and

Re: [PATCH 2/2] selftests/net: fix uninitialized variables

2024-05-06 Thread John Hubbard
On 5/6/24 11:00 AM, Willem de Bruijn wrote: John Hubbard wrote: ... diff --git a/tools/testing/selftests/net/gro.c b/tools/testing/selftests/net/gro.c index 353e1e867fbb..0eb61edaad83 100644 --- a/tools/testing/selftests/net/gro.c +++ b/tools/testing/selftests/net/gro.c @@ -110,7 +110,8 @@

[PATCH v2] selftests/netfilter: return a value for several "int" functions

2024-05-06 Thread John Hubbard
When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns, correctly, that several functions declared with an "int" return type are not always returning values in all cases (or at least, clang cannot prove that they always return a value). Fix this by returning an

RE: [PATCH] selftests: introduce additional eventfd test coverage

2024-05-06 Thread Bird, Tim
> -Original Message- > From: Wen Yang > Add several new test cases which assert corner cases on the eventfd > mechanism, for example, the supplied buffer is less than 8 bytes, > attempting to write a value that is too large, etc. > > ./eventfd_test > # Starting 9 tests

Re: [PATCH 2/2] selftests/netfilter: return a value for several "int" functions

2024-05-06 Thread John Hubbard
On 5/6/24 7:41 AM, Felix Huettner wrote: On Sun, May 05, 2024 at 02:47:16PM -0700, John Hubbard wrote: ... > @@ -207,6 +210,7 @@ static int conntrack_data_generate_v6(struct mnl_socket *sock, >  static int count_entries(const struct nlmsghdr *nlh, void *data) >  { >        

[PATCH v4] selftests/vDSO: change elf_hash parameter to signed char

2024-05-06 Thread Edward Liaw
Fixes clang compilation warnings by changing elf_hash's parameter type to char * and casting to unsigned char * inside elf_hash: parse_vdso.c:206:22: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the

Re: [PATCH 0/3] selftests/futex: clang-inspired fixes

2024-05-06 Thread Davidlohr Bueso
On Thu, 02 May 2024, John Hubbard wrote: Hi, Here's a few fixes that are part of my effort to get all selftests building cleanly under clang. Plus one that I noticed by inspection. lgtm - feel free to add: Reviewed-by: Davidlohr Bueso

Re: [PATCH 2/2] selftests/net: fix uninitialized variables

2024-05-06 Thread Willem de Bruijn
John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about three variables that are not initialized in all > cases: > > 1) The opt_ipproto_off variable is used uninitialized if "testname" is > not "ip". This seems like an actual

Re: [PATCH v3] selftests/vDSO: Explicit unsigned char conversion for elf_hash

2024-05-06 Thread Edward Liaw
On Mon, May 6, 2024 at 10:16 AM Justin Stitt wrote: > > On Sun, May 5, 2024 at 6:21 AM David Laight wrote: > > > > From: Justin Stitt > > > Sent: 01 May 2024 20:55 > > ... > > > > static unsigned long elf_hash(const unsigned char *name) > > ... > > > Is it possible to just change the types of

Re: [PATCH net-next v8 3/3] selftests/net: add flush id selftests

2024-05-06 Thread Willem de Bruijn
Richard Gobert wrote: > Added flush id selftests to test different cases where DF flag is set or > unset and id value changes in the following packets. All cases where the > packets should coalesce or should not coalesce are tested. > > Signed-off-by: Richard Gobert > --- >

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread John Hubbard
On 5/6/24 7:44 AM, Mark Brown wrote: On Mon, May 06, 2024 at 09:45:21AM +0200, Takashi Iwai wrote: Jaroslav Kysela wrote: This function is nice for debugging. I'd prefer to keep it with the fix. I'm find in either way; just submit a fix patch, then. The fix was already submitted as v1,

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-06 Thread John Hubbard
On 5/6/24 2:07 AM, Ilpo Järvinen wrote: On Fri, 3 May 2024, John Hubbard wrote: On 5/3/24 11:37 AM, Reinette Chatre wrote: On 5/3/2024 9:52 AM, John Hubbard wrote: On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: ... diff --git

Re: [PATCH net-next v8 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-06 Thread Willem de Bruijn
Richard Gobert wrote: > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > iph->id, ...) against all packets in a loop. These flush checks are used in > all merging UDP and TCP flows. > > These checks need to be done only once and only against the found p skb, > since they only

Re: [PATCH v3] selftests/vDSO: Explicit unsigned char conversion for elf_hash

2024-05-06 Thread Justin Stitt
On Sun, May 5, 2024 at 6:21 AM David Laight wrote: > > From: Justin Stitt > > Sent: 01 May 2024 20:55 > ... > > > static unsigned long elf_hash(const unsigned char *name) > ... > > Is it possible to just change the types of the parameters of vdso_sym() > > or does that trigger even more warnings

Re: [PATCH] selftests/exec: build with -fPIE instead of -pie, to make clang happy

2024-05-06 Thread Kees Cook
On Fri, May 03, 2024 at 07:23:01PM -0700, John Hubbard wrote: > clang doesn't deal well with "-pie -static": it warns that -pie is an > unused option here. Changing to "-fPIE -static" solves this problem for > clang, while keeping the gcc results identical. > > The problem is visible when

Re: [PATCH v6 00/10] Fix Kselftest's vfork() side effects

2024-05-06 Thread Kees Cook
On Mon, May 06, 2024 at 06:55:08PM +0200, Mickaël Salaün wrote: > Shuah, I think this should be in -next really soon to make sure > everything works fine for the v6.9 release, which is not currently the > case. I cannot test against all kselftests though. I would prefer to > let you handle this,

[PATCH v6 10/10] selftests/harness: Handle TEST_F()'s explicit exit codes

2024-05-06 Thread Mickaël Salaün
If TEST_F() explicitly calls exit(code) with code different than 0, then _metadata->exit_code is set to this code (e.g. KVM_ONE_VCPU_TEST()). We need to keep in mind that _metadata->exit_code can be KSFT_SKIP while the process exit code is 0. Cc: Jakub Kicinski Cc: Kees Cook Cc: Mark Brown

[PATCH v6 09/10] selftests/harness: Fix vfork() side effects

2024-05-06 Thread Mickaël Salaün
Setting the time namespace with CLONE_NEWTIME returns -EUSERS if the calling thread shares memory with another thread (because of the shared vDSO), which is the case when it is created with vfork(). Fix pidfd_setns_test by replacing test harness's vfork() call with a clone3() call with

[PATCH v6 08/10] selftests/harness: Share _metadata between forked processes

2024-05-06 Thread Mickaël Salaün
Unconditionally share _metadata between all forked processes, which enables to actually catch errors which were previously ignored. This is required for a following commit replacing vfork() with clone3() and CLONE_VFORK (i.e. not sharing the full memory) . It should also be useful to share

[PATCH v6 06/10] selftests/harness: Constify fixture variants

2024-05-06 Thread Mickaël Salaün
FIXTURE_VARIANT_ADD() types are passed as const pointers to FIXTURE_TEARDOWN(). Make that explicit by constifying the variants declarations. Cc: Shuah Khan Cc: Will Drewry Reviewed-by: Kees Cook Signed-off-by: Mickaël Salaün Link:

[PATCH v6 05/10] selftests/landlock: Do not allocate memory in fixture data

2024-05-06 Thread Mickaël Salaün
Do not allocate self->dir_path in the test process because this would not be visible in the FIXTURE_TEARDOWN() process when relying on fork()/clone3() instead of vfork(). This change is required for a following commit removing vfork() call to not break the layout3_fs.* test cases. Cc: Günther

[PATCH v6 04/10] selftests/harness: Fix interleaved scheduling leading to race conditions

2024-05-06 Thread Mickaël Salaün
Fix a race condition when running several FIXTURE_TEARDOWN() managing the same resource. This fixes a race condition in the Landlock file system tests when creating or unmounting the same directory. Using clone3() with CLONE_VFORK guarantees that the child and grandchild test processes are

[PATCH v6 07/10] selftests/pidfd: Fix wrong expectation

2024-05-06 Thread Mickaël Salaün
Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(), which will be actually tested on the parent and child sides with a following commit. Cc: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: Christian Brauner Signed-off-by: Mickaël Salaün Link:

[PATCH v6 02/10] selftests/landlock: Fix FS tests when run on a private mount point

2024-05-06 Thread Mickaël Salaün
According to the test environment, the mount point of the test's working directory may be shared or not, which changes the visibility of the nested "tmp" mount point for the test's parent process calling umount("tmp"). This was spotted while running tests in containers [1], where mount points are

[PATCH v6 01/10] selftests/pidfd: Fix config for pidfd_setns_test

2024-05-06 Thread Mickaël Salaün
Required by switch_timens() to open /proc/self/ns/time_for_children. CONFIG_GENERIC_VDSO_TIME_NS is not available on UML, so pidfd_setns_test cannot be run successfully on this architecture. Cc: Shuah Khan Fixes: 2b40c5db73e2 ("selftests/pidfd: add pidfd setns tests") Reviewed-by: Kees Cook

[PATCH v6 00/10] Fix Kselftest's vfork() side effects

2024-05-06 Thread Mickaël Salaün
Hi, This sixth series just update the last patch description. Shuah, I think this should be in -next really soon to make sure everything works fine for the v6.9 release, which is not currently the case. I cannot test against all kselftests though. I would prefer to let you handle this, but I

[PATCH v6 03/10] selftests/harness: Fix fixture teardown

2024-05-06 Thread Mickaël Salaün
Make sure fixture teardowns are run when test cases failed, including when _metadata->teardown_parent is set to true. Make sure only one fixture teardown is run per test case, handling the case where the test child forks. Cc: Jakub Kicinski Cc: Shengyu Li Cc: Shuah Khan Fixes: 72d7cb5c190b

Re: [PATCH net-next v8 1/3] net: gro: use cb instead of skb->network_header

2024-05-06 Thread Willem de Bruijn
Richard Gobert wrote: > This patch converts references of skb->network_header to napi_gro_cb's > network_offset and inner_network_offset. > > Signed-off-by: Richard Gobert > --- > include/net/gro.h| 9 +++-- > net/ipv4/af_inet.c | 4 > net/ipv4/tcp_offload.c | 3 ++- >

Re: [PATCH v5 10/10] selftests/harness: Handle TEST_F()'s explicit exit codes

2024-05-06 Thread Mickaël Salaün
On Fri, May 03, 2024 at 07:17:16AM GMT, Sean Christopherson wrote: > On Fri, May 03, 2024, Mickaël Salaün wrote: > > If TEST_F() explicitly calls exit(code) with code different than 0, then > > _metadata->exit_code is set to this code (e.g. KVM_ONE_VCPU_TEST()). We > > need to keep in mind that

Re: [PATCH net-next v3 0/2] fix icmp error source address over xfrm tunnel

2024-05-06 Thread Antony Antony
Hi Sabrina, On Mon, May 06, 2024 at 03:36:15PM +0200, Sabrina Dubroca via Devel wrote: > 2024-05-06, 09:58:26 +0200, Antony Antony wrote: > > Hi, > > This fix, originally intended for XFRM/IPsec, has been recommended by > > Steffen Klassert to submit to the net tree. > > > > The patch addresses

Re: [PATCH net-next v3 2/2] selftests/net: add ICMP unreachable over IPsec tunnel

2024-05-06 Thread Antony Antony
Hi Jakub, On Mon, May 06, 2024 at 06:28:30AM -0700, Jakub Kicinski via Devel wrote: > On Mon, 6 May 2024 10:05:54 +0200 Antony Antony wrote: > > Add IPsec tunnel, aka xfrm state, tests with ICMP flags enabled. > > IPv4 and IPv6, unreachable tests over xfrm/IPsec tunnels, > > xfrm SA with "flag

[PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread Michal Schmidt
Cast operation has a higher precedence than addition. The code here wants to zero the 2nd half of the 64-bit metadata, but due to a pointer arithmetic mistake, it writes the zero at offset 16 instead. Just adding parentheses around "data + 4" would fix this, but I think this will be slightly

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Mark Brown
On Mon, May 06, 2024 at 09:45:21AM +0200, Takashi Iwai wrote: > Jaroslav Kysela wrote: > > This function is nice for debugging. I'd prefer to keep it with the fix. > I'm find in either way; just submit a fix patch, then. The fix was already submitted as v1, I noticed that the function was

[PATCH 19/18] selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed

2024-05-06 Thread bentiss
From: Benjamin Tissoires udev-hid-bpf is still not installed everywhere, and we should probably not assume it is installed automatically. Signed-off-by: Benjamin Tissoires --- I wanted to apply this series given that it wasn't reviewed in a month, but I thought that maybe I should not enforce

Re: [PATCH net-next v3 0/2] fix icmp error source address over xfrm tunnel

2024-05-06 Thread Sabrina Dubroca
2024-05-06, 09:58:26 +0200, Antony Antony wrote: > Hi, > This fix, originally intended for XFRM/IPsec, has been recommended by > Steffen Klassert to submit to the net tree. > > The patch addresses a minor issue related to the IPv4 source address of > ICMP error messages, which originated from an

Re: [PATCH net-next v3 2/2] selftests/net: add ICMP unreachable over IPsec tunnel

2024-05-06 Thread Jakub Kicinski
On Mon, 6 May 2024 10:05:54 +0200 Antony Antony wrote: > Add IPsec tunnel, aka xfrm state, tests with ICMP flags enabled. > IPv4 and IPv6, unreachable tests over xfrm/IPsec tunnels, > xfrm SA with "flag icmp" set. Doesn't seem to work: # selftests: net: xfrm_state.sh # ./xfrm_state.sh: line 91:

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-06 Thread Christoph Hellwig
On Fri, May 03, 2024 at 01:10:44PM -0700, Mina Almasry wrote: > Is the concern still that folks may be able to hook proprietary stuff > into this like you mentioned before[1]? That is on concern. The other is that people will do stupid stuff even in tree if you give them enough rope, and they

[PATCH 2/2] selftests/watchdog: convert the test output to KTAP format

2024-05-06 Thread Laura Nao
Modify the script output to conform to the KTAP format standard. The number of tests executed is determined by the script arguments, and options such as -c, -f, -h, -i, and -p do not impact the total test count. No functional change is intended. Signed-off-by: Laura Nao ---

[PATCH 1/2] selftests/watchdog: limit ping loop and allow configuring the number of pings

2024-05-06 Thread Laura Nao
In order to run the watchdog selftest with the kselftest runner, the loop responsible for pinging the watchdog should be finite. This change limits the loop to 5 iterations by default and introduces a new '-c' option to adjust the number of pings as needed. Signed-off-by: Laura Nao ---

[PATCH 0/2] Modify the watchdog selftest for execution with kselftest runner

2024-05-06 Thread Laura Nao
The watchdog selftest script supports various parameters for testing different IOCTLs. The watchdog ping functionality is validated by starting a loop where the watchdog device is periodically pet, which can only be stopped by the user interrupting the script. This results in a timeout when

[PATCH net-next v8 3/3] selftests/net: add flush id selftests

2024-05-06 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 147

[PATCH net-next v8 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-06 Thread Richard Gobert
{inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, iph->id, ...) against all packets in a loop. These flush checks are used in all merging UDP and TCP flows. These checks need to be done only once and only against the found p skb, since they only affect flush and not same_flow.

[PATCH net-next v8 1/3] net: gro: use cb instead of skb->network_header

2024-05-06 Thread Richard Gobert
This patch converts references of skb->network_header to napi_gro_cb's network_offset and inner_network_offset. Signed-off-by: Richard Gobert --- include/net/gro.h| 9 +++-- net/ipv4/af_inet.c | 4 net/ipv4/tcp_offload.c | 3 ++- net/ipv6/ip6_offload.c | 5 ++---

[PATCH net-next v8 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4

2024-05-06 Thread Richard Gobert
The cb fields network_offset and inner_network_offset are used instead of skb->network_header throughout GRO. These fields are then leveraged in the next commit to remove flush_id state from napi_gro_cb, and stateful code in {ipv6,inet}_gro_receive which may be unnecessarily complicated due to

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-06 Thread Ilpo Järvinen
On Fri, 3 May 2024, John Hubbard wrote: > On 5/3/24 11:37 AM, Reinette Chatre wrote: > > On 5/3/2024 9:52 AM, John Hubbard wrote: > > > On 5/3/24 1:00 AM, Ilpo Järvinen wrote: > > > > On Thu, 2 May 2024, John Hubbard wrote: > > > ... > > > > > diff --git

[PATCH net-next v3 2/2] selftests/net: add ICMP unreachable over IPsec tunnel

2024-05-06 Thread Antony Antony
Add IPsec tunnel, aka xfrm state, tests with ICMP flags enabled. IPv4 and IPv6, unreachable tests over xfrm/IPsec tunnels, xfrm SA with "flag icmp" set. Signed-off-by: Antony Antony --- v2->v3: fix the IFS whitespace. It got mangled --- tools/testing/selftests/net/Makefile | 1 +

[PATCH net-next v3 1/2] xfrm: fix source address in icmp error generation from IPsec gateway

2024-05-06 Thread Antony Antony
When enabling support for XFRM lookup using reverse ICMP payload, we have identified an issue where the source address of the IPv4, e.g., "Destination Host Unreachable" message, is incorrect. The error message received by the sender appears to originate from a non-existing/unreachable host. IPv6

[PATCH net-next v3 0/2] fix icmp error source address over xfrm tunnel

2024-05-06 Thread Antony Antony
Hi, This fix, originally intended for XFRM/IPsec, has been recommended by Steffen Klassert to submit to the net tree. The patch addresses a minor issue related to the IPv4 source address of ICMP error messages, which originated from an old 2011 commit: 415b3334a21a ("icmp: Fix regression in

Re: [PATCH 2/2] selftests/net: fix uninitialized variables

2024-05-06 Thread Matthieu Baerts
Hi John, On 06/05/2024 00:26, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about three variables that are not initialized in all > cases: > > 1) The opt_ipproto_off variable is used uninitialized if "testname" is > not

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Takashi Iwai
On Mon, 06 May 2024 09:27:38 +0200, Jaroslav Kysela wrote: > > On 06. 05. 24 9:19, Takashi Iwai wrote: > > On Sun, 05 May 2024 23:08:24 +0200, > > John Hubbard wrote: > >> > >> dump_config_tree() is declared to return an int, but the compiler cannot > >> prove that it always returns any value at

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Jaroslav Kysela
On 06. 05. 24 9:19, Takashi Iwai wrote: On Sun, 05 May 2024 23:08:24 +0200, John Hubbard wrote: dump_config_tree() is declared to return an int, but the compiler cannot prove that it always returns any value at all. This leads to a clang warning, when building via: make LLVM=1 -C

Re: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()

2024-05-06 Thread Takashi Iwai
On Sun, 05 May 2024 23:08:24 +0200, John Hubbard wrote: > > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: > > make LLVM=1 -C tools/testing/selftests > >