[PATCH v2] selftests: introduce additional eventfd test coverage

2024-05-07 Thread 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 from 1 test cases. # RUN

[linux-next:master] BUILD REGRESSION 93a39e4766083050ca0ecd6a3548093a3b9eb60c

2024-05-07 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 93a39e4766083050ca0ecd6a3548093a3b9eb60c Add linux-next specific files for 20240507 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202405080133.16zi5eay-...@intel.com https

[PATCH net] selftests: net: avoid waiting for server in amt.sh forever when it fails.

2024-05-07 Thread Taehee Yoo
In the forwarding testcase, it opens a server and a client with the nc. The server receives the correct message from NC, it prints OK. The server prints FAIL if it receives the wrong message from the client. But If the server can't receive any message, it will not close so the amt.sh waits

Re: [PATCH] selftests: Add _GNU_SOURCE definition when including kselftest_harness.h

2024-05-07 Thread Tao Su
On Tue, May 07, 2024 at 10:06:51AM -0700, Andrew Morton wrote: > On Tue, 7 May 2024 14:35:34 +0800 Tao Su wrote: > > > asprintf() is declared in stdio.h when defining _GNU_SOURCE, but stdio.h > > is so common that many files don’t define _GNU_SOURCE before including > > stdio.h, and defining

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

2024-05-07 Thread Joe Damato
On Wed, May 08, 2024 at 12:43:26AM +, 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. > >

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

2024-05-07 Thread Reinette Chatre
Hi John, On 5/7/2024 6:25 PM, John Hubbard wrote: > On 5/7/24 6:21 PM, Reinette Chatre wrote: >> Hi John, > ... >> >> The following (what was in v1) looks good to me. What am I missing? >> >> diff --git a/tools/testing/selftests/resctrl/cmt_test.c >> b/tools/testing/selftests/resctrl/cmt_test.c

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

2024-05-07 Thread John Hubbard
On 5/7/24 6:21 PM, Reinette Chatre wrote: Hi John, ... The following (what was in v1) looks good to me. What am I missing? diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index a81f91222a89..05a241519ae8 100644 ---

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

2024-05-07 Thread Reinette Chatre
Hi John, On 5/7/2024 6:16 PM, John Hubbard wrote: > On 5/7/24 3:30 PM, Reinette Chatre wrote: > ... >>> diff --git a/tools/testing/selftests/resctrl/cmt_test.c >>> b/tools/testing/selftests/resctrl/cmt_test.c >>> index a81f91222a89..af33abd1cca7 100644 >>> ---

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

2024-05-07 Thread John Hubbard
On 5/7/24 3:30 PM, Reinette Chatre wrote: ... diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index a81f91222a89..af33abd1cca7 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -29,22

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

2024-05-07 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-next v9 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4

2024-05-07 Thread Jakub Kicinski
On Tue, 7 May 2024 18:23:45 +0200 Richard Gobert wrote: > 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

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

2024-05-07 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 6 May 2024 12:02:04 -0700 you 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: > >

Re: [PATCH v22 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-05-07 Thread Steven Rostedt
On Fri, 3 May 2024 13:12:56 -0600 Shuah Khan wrote: > On 4/30/24 05:13, Vincent Donnefort wrote: > > This test maps a ring-buffer and validate the meta-page after reset and > > after emitting few events. > > > > Changelog needs to be imperative - refer to the following: > >

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: > On 5/7/24 18:56, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > > > On 5/7/24 17:48, Jason Gunthorpe wrote: > > > > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > >

Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using

2024-05-07 Thread Kees Cook
On Tue, May 07, 2024 at 09:38:25PM +, Edward Liaw wrote: > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > asprintf into kselftest_harness.h, which is a GNU extension and needs > _GNU_SOURCE to either be defined prior to including headers or with the > -D_GNU_SOURCE

[PATCH AUTOSEL 6.1 08/25] KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF

2024-05-07 Thread Sasha Levin
From: Oliver Upton [ Upstream commit 160933e330f4c5a13931d725a4d952a4b9aefa71 ] Assert that accesses to a non-existent vgic-v2 CPU interface consistently fail across the various KVM device attr ioctls. This also serves as a regression test for a bug wherein KVM hits a NULL dereference when the

[PATCH AUTOSEL 6.6 15/43] KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF

2024-05-07 Thread Sasha Levin
From: Oliver Upton [ Upstream commit 160933e330f4c5a13931d725a4d952a4b9aefa71 ] Assert that accesses to a non-existent vgic-v2 CPU interface consistently fail across the various KVM device attr ioctls. This also serves as a regression test for a bug wherein KVM hits a NULL dereference when the

[PATCH AUTOSEL 6.8 18/52] KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF

2024-05-07 Thread Sasha Levin
From: Oliver Upton [ Upstream commit 160933e330f4c5a13931d725a4d952a4b9aefa71 ] Assert that accesses to a non-existent vgic-v2 CPU interface consistently fail across the various KVM device attr ioctls. This also serves as a regression test for a bug wherein KVM hits a NULL dereference when the

[PATCH AUTOSEL 5.15 5/5] selftests: sud_test: return correct emulated syscall value on RISC-V

2024-05-07 Thread Sasha Levin
From: Clément Léger [ Upstream commit 17c67ed752d6a456602b3dbb25c5ae4d3de5deab ] Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall

[PATCH AUTOSEL 6.1 11/12] selftests: sud_test: return correct emulated syscall value on RISC-V

2024-05-07 Thread Sasha Levin
From: Clément Léger [ Upstream commit 17c67ed752d6a456602b3dbb25c5ae4d3de5deab ] Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall

[PATCH AUTOSEL 6.6 18/19] selftests: sud_test: return correct emulated syscall value on RISC-V

2024-05-07 Thread Sasha Levin
From: Clément Léger [ Upstream commit 17c67ed752d6a456602b3dbb25c5ae4d3de5deab ] Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall

[PATCH AUTOSEL 6.8 20/23] selftests: sud_test: return correct emulated syscall value on RISC-V

2024-05-07 Thread Sasha Levin
From: Clément Léger [ Upstream commit 17c67ed752d6a456602b3dbb25c5ae4d3de5deab ] Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption only works on architectures were the syscall calling convention use the same register for syscall

Re: [PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile

2024-05-07 Thread Jarkko Sakkinen
On Wed May 8, 2024 at 12:38 AM EEST, Edward Liaw wrote: > Add KHDR_INCLUDES to CFLAGS to pull in the kselftest harness > dependencies (-D_GNU_SOURCE). > > Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") > Signed-off-by: Edward Liaw Oops, this is not for this patch but for SGX.

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

2024-05-07 Thread Reinette Chatre
Hi John, On 5/3/2024 4:40 PM, John Hubbard wrote: > First of all, in order to build with clang at all, one must first apply > Valentin Obst's build fix for LLVM [1]. Furthermore, for this particular > resctrl directory, my pending fix [2] must also be applied. Once those > fixes are in place,

[PATCH v2 5/5] selftests: Drop duplicate -D_GNU_SOURCE

2024-05-07 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by KHDR_INCLUDES. Signed-off-by: Edward Liaw --- tools/testing/selftests/futex/functional/Makefile | 2 +- tools/testing/selftests/iommu/Makefile| 2 -- tools/testing/selftests/net/tcp_ao/Makefile | 2 +-

[PATCH v2 4/5] selftests: Drop define _GNU_SOURCE

2024-05-07 Thread Edward Liaw
_GNU_SOURCE is provided by KHDR_INCLUDES, so it should be dropped to prevent _GNU_SOURCE redefined warnings. Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Signed-off-by: Edward Liaw --- tools/testing/selftests/cachestat/test_cachestat.c| 2 --

[PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile

2024-05-07 Thread Edward Liaw
Add KHDR_INCLUDES to CFLAGS to pull in the kselftest harness dependencies (-D_GNU_SOURCE). Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Signed-off-by: Edward Liaw --- tools/testing/selftests/alsa/Makefile | 2 +-

[PATCH v2 2/5] selftests/sgx: Include KHDR_INCLUDES in Makefile

2024-05-07 Thread Edward Liaw
Add KHDR_INCLUDES to the CFLAGS to pull in the kselftest harness dependencies (-D_GNU_SOURCE). Also, remove redefinitions of _GNU_SOURCE in the source code. Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Reported-by: kernel test robot Closes:

[PATCH v2 1/5] selftests: Compile kselftest headers with -D_GNU_SOURCE

2024-05-07 Thread Edward Liaw
Add the -D_GNU_SOURCE flag to KHDR_INCLUDES so that it is defined in a central location. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with

[PATCH v2 0/5] Define _GNU_SOURCE for sources using

2024-05-07 Thread Edward Liaw
809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. v1:

Re: [PATCH bpf-next 3/4] selftests/bpf: Add mptcp subflow example

2024-05-07 Thread Alexei Starovoitov
On Tue, May 7, 2024 at 9:03 AM Matthieu Baerts wrote: > > Hi Alexei, > > Thank you for the review! > > On 07/05/2024 16:49, Alexei Starovoitov wrote: > > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > > wrote: > >> > >> From: Nicolas Rybowski > >> > >> Move Nicolas's patch into bpf

Re: [PATCH bpf-next 2/4] selftests/bpf: Add RUN_MPTCP_TEST macro

2024-05-07 Thread Alexei Starovoitov
On Tue, May 7, 2024 at 9:02 AM Matthieu Baerts wrote: > > Hi Alexei, > > Thank you for the review! > > On 07/05/2024 16:44, Alexei Starovoitov wrote: > > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > > wrote: > >> > >> From: Geliang Tang > >> > >> Each MPTCP subtest tests

[BUG selftests/pidfd] pidfd_setns_test HANG

2024-05-07 Thread Mirsad Todorovac
Hi, all, With the latest 6.9-rc7 torvalds tree kernel, the "make kselftest" always hangs in the following ./pidfd_setns_test. Symptoms are that all ./pidfd_netne_test processes end up in pause() syscalls, with nothing to wake them up. Please find the config attached. All the options from the

Re: [PATCH][next] selftests/bpf: Fix spelling mistake "{GET|SET}SOCKOP" -> "{GET|SET}SOCKOPT"

2024-05-07 Thread Andrii Nakryiko
On Wed, May 1, 2024 at 4:21 AM Colin Ian King wrote: > > There are two spelling mistakes in .descr literal strings. Fix them. > > Signed-off-by: Colin Ian King > --- > tools/testing/selftests/bpf/prog_tests/sockopt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > This doesn't

[PATCH 2/2] Update uffd-stress to handle EINVAL for unset config features

2024-05-07 Thread Audra Mitchell
Now that we have updated userfaultfd_api to correctly return EIVAL when a feature is requested but not available, let's fix the uffd-stress test to only set the UFFD_FEATURE_WP_UNPOPULATED feature when the config is set. In addition, still run the test if the CONFIG_PTE_MARKER_UFFD_WP is not set,

[PATCH 1/2] Fix userfaultfd_api to return EINVAL as expected

2024-05-07 Thread Audra Mitchell
Currently if we request a feature that is not set in the Kernel config we fail silently and return the available features. However, the documentation indicates we should return an EINVAL. We need to fix this issue since we can end up with a Kernel warning should a program request the feature

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: 1. Align with devmem TCP to use udmabuf for your io_uring memory. I think in the past

Re: [PATCH v2 01/15] KVM: x86/xen: Do not corrupt KVM clock in kvm_xen_shared_info_init()

2024-05-07 Thread David Woodhouse
On Sat, 2024-05-04 at 04:42 -0300, Marcelo Tosatti wrote: > On Sat, Apr 27, 2024 at 12:04:58PM +0100, David Woodhouse wrote: > > > > In particular, KVM_REQ_MASTERCLOCK_UPDATE will take a new snapshot of > > time as the reference in master_kernel_ns and master_cycle_now, yanking > > the guest's

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

2024-05-07 Thread Eric Dumazet
On Tue, May 7, 2024 at 6:30 PM 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

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > On 5/7/24 17:48, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > > > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > > > think in the past you said it's a uapi

Re: [PATCH v1 00/10] Define _GNU_SOURCE for sources using

2024-05-07 Thread Edward Liaw
On Tue, Apr 30, 2024 at 10:41 PM Muhammad Usama Anjum wrote: > > Thanks for the fixes. > > On 5/1/24 6:59 AM, Mark Brown wrote: > > On Tue, Apr 30, 2024 at 11:50:09PM +, Edward Liaw wrote: > >> 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > >> asprintf into

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 18:15, Mina Almasry wrote: On Tue, May 7, 2024 at 9:55 AM Pavel Begunkov wrote: On 5/7/24 17:23, Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: 1. Align with devmem TCP to use udmabuf for your io_uring memory. I think in the past you said it's a uapi you don't link but in the face of this pushback you may want to reconsider. dmabuf

Re: [PATCH v6 00/17] riscv: Support vendor extensions and xtheadvector

2024-05-07 Thread Conor Dooley
On Fri, May 03, 2024 at 11:18:15AM -0700, Charlie Jenkins wrote: > This patch series ended up much larger than expected, please bear with > me! The goal here is to support vendor extensions, starting at probing > the device tree and ending with reporting to userspace. I think I've reviewed all

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

2024-05-07 Thread Daniel Vetter
On Tue, May 07, 2024 at 01:48:38PM -0300, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > > > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > > think in the past you said it's a uapi you don't link but in the face > > of this pushback

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:42, Mina Almasry wrote: On Tue, May 7, 2024 at 9:24 AM Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them enough rope, and they should not have

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

2024-05-07 Thread Mina Almasry
On Tue, May 7, 2024 at 9:55 AM Pavel Begunkov wrote: > > On 5/7/24 17:23, Christoph Hellwig wrote: > > On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: > >> On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > even in tree if you give them enough rope, and they

Re: [PATCH] selftests: Add _GNU_SOURCE definition when including kselftest_harness.h

2024-05-07 Thread Andrew Morton
On Tue, 7 May 2024 14:35:34 +0800 Tao Su wrote: > asprintf() is declared in stdio.h when defining _GNU_SOURCE, but stdio.h > is so common that many files don’t define _GNU_SOURCE before including > stdio.h, and defining _GNU_SOURCE after including stdio.h will no longer > take effect. > >

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

2024-05-07 Thread John Hubbard
On 5/7/24 1:36 AM, Felix Huettner wrote: > > As long as we are looking at this, what do you think about > this: > > diff --git a/tools/testing/selftests/netfilter/conntrack_dump_flush.c > b/tools/testing/selftests/netfilter/conntrack_dump_flush.c > index e9df4ae14e16..4a73afad4de4 100644

Re: [PATCH] selftests/mqueue: fix 5 warnings about signed/unsigned mismatches

2024-05-07 Thread John Hubbard
On 5/7/24 12:54 AM, Ryan Roberts wrote: On 05/05/2024 23:13, John Hubbard wrote: ... diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c index 5c16159d0bcd..fb898850867c 100644 --- a/tools/testing/selftests/mqueue/mq_perf_tests.c +++

Re: [PATCH v6 06/17] riscv: Add vendor extensions to /proc/cpuinfo

2024-05-07 Thread Conor Dooley
On Fri, May 03, 2024 at 11:18:21AM -0700, Charlie Jenkins wrote: > All of the supported vendor extensions that have been listed in > riscv_isa_vendor_ext_list can be exported through /proc/cpuinfo. > > Signed-off-by: Charlie Jenkins This seems fine, thanks for updating this interface :)

Re: [PATCH 1/2] selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS

2024-05-07 Thread Ryan Roberts
On 07/05/2024 17:47, John Hubbard wrote: > On 5/7/24 9:34 AM, Ryan Roberts wrote: >> On 07/05/2024 17:19, John Hubbard wrote: >>> On 5/7/24 12:45 AM, Ryan Roberts wrote: On 04/05/2024 05:43, John Hubbard wrote: >>> ... Hi John, I sent out a similar fix a couple of weeks ago,

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

2024-05-07 Thread Pavel Begunkov
On 5/7/24 17:23, Christoph Hellwig wrote: On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: even in tree if you give them enough rope, and they should not have that rope when the only sensible options are page/folio

Re: [PATCH 1/2] selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS

2024-05-07 Thread John Hubbard
On 5/7/24 9:34 AM, Ryan Roberts wrote: On 07/05/2024 17:19, John Hubbard wrote: On 5/7/24 12:45 AM, Ryan Roberts wrote: On 04/05/2024 05:43, John Hubbard wrote: ... Hi John, I sent out a similar fix a couple of weeks ago, see [1]. I don't think it got picked up though. It takes a slightly

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

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > 1. Align with devmem TCP to use udmabuf for your io_uring memory. I > think in the past you said it's a uapi you don't link but in the face > of this pushback you may want to reconsider. dmabuf does not force a uapi, you can acquire

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

2024-05-07 Thread Mina Almasry
On Tue, May 7, 2024 at 9:24 AM Christoph Hellwig wrote: > > On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: > > On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > > > > even in tree if you give them enough rope, and they should not have > > > > that rope when the

Re: [PATCH 1/2] selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS

2024-05-07 Thread Ryan Roberts
On 07/05/2024 17:19, John Hubbard wrote: > On 5/7/24 12:45 AM, Ryan Roberts wrote: >> On 04/05/2024 05:43, John Hubbard wrote: > ... >> Hi John, >> >> I sent out a similar fix a couple of weeks ago, see [1]. I don't think it got >> picked up though. It takes a slightly different approach,

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

2024-05-07 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 | 138

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

2024-05-07 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 v9 1/3] net: gro: use cb instead of skb->network_header

2024-05-07 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 ++---

Re: [PATCH 1/2] selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS

2024-05-07 Thread John Hubbard
On 5/7/24 12:45 AM, Ryan Roberts wrote: On 04/05/2024 05:43, John Hubbard wrote: ... Hi John, I sent out a similar fix a couple of weeks ago, see [1]. I don't think it got picked up though. It takes a slightly different approach, explicitly adding -static-libsan (note no 'a') for clang,

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

2024-05-07 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: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-07 Thread Christoph Hellwig
On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > > > even in tree if you give them enough rope, and they should not have > > > that rope when the only sensible options are page/folio based kernel > > > memory

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

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > 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: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-07 Thread Jason Gunthorpe
On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote: > > even in tree if you give them enough rope, and they should not have > > that rope when the only sensible options are page/folio based kernel > > memory (incuding large/huge folios) and dmabuf. > > I believe there is at least one

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

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > 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

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

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > 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 >>

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

2024-05-07 Thread Pavel Begunkov
On 5/6/24 13:04, Christoph Hellwig wrote: 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 We're not

Re: [PATCH bpf-next 3/4] selftests/bpf: Add mptcp subflow example

2024-05-07 Thread Matthieu Baerts
Hi Alexei, Thank you for the review! On 07/05/2024 16:49, Alexei Starovoitov wrote: > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > wrote: >> >> From: Nicolas Rybowski >> >> Move Nicolas's patch into bpf selftests directory. This example added a >> test that was adding a different

Re: [PATCH bpf-next 2/4] selftests/bpf: Add RUN_MPTCP_TEST macro

2024-05-07 Thread Matthieu Baerts
Hi Alexei, Thank you for the review! On 07/05/2024 16:44, Alexei Starovoitov wrote: > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > wrote: >> >> From: Geliang Tang >> >> Each MPTCP subtest tests test__start_subtest(suffix), then invokes >> test_suffix(). It makes sense to add a new

Re: [PATCH bpf-next 1/4] selftests/bpf: Handle SIGINT when creating netns

2024-05-07 Thread Matthieu Baerts
Hi Alexei, Thank you for the review! On 07/05/2024 16:43, Alexei Starovoitov wrote: > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > wrote: >> >> From: Geliang Tang >> >> It's necessary to delete netns during the MPTCP bpf tests interrupt, >> otherwise the next tests run will fail due

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

2024-05-07 Thread Mickaël Salaün
On Tue, May 07, 2024 at 07:12:51AM GMT, Sean Christopherson wrote: > On Mon, May 06, 2024, Kees Cook wrote: > > 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,

[PATCH net-next v3] selftests: drv-net: add checksum tests

2024-05-07 Thread Willem de Bruijn
From: Willem de Bruijn Run tools/testing/selftest/net/csum.c as part of drv-net. This binary covers multiple scenarios, based on arguments given, for both IPv4 and IPv6: - Accept UDP correct checksum - Detect UDP invalid checksum - Accept TCP correct checksum - Detect TCP invalid checksum -

Re: [PATCH 00/18] HID: Include current HID-BPF fixes in tree

2024-05-07 Thread Benjamin Tissoires
On Wed, 10 Apr 2024 19:19:20 +0200, Benjamin Tissoires wrote: > When I introduced HID-BPF, I mentioned that we should ship the HID-BPF > programs in the kernel when they are fixes so that everybody can benefit > from them. > > I tried multiple times to do so but I was confronted to a tough

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

2024-05-07 Thread Wen Yang
On 2024/5/7 02:30, Bird, Tim wrote: -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

Re: [PATCH bpf-next 3/4] selftests/bpf: Add mptcp subflow example

2024-05-07 Thread Alexei Starovoitov
On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) wrote: > > From: Nicolas Rybowski > > Move Nicolas's patch into bpf selftests directory. This example added a > test that was adding a different mark (SO_MARK) on each subflow, and > changing the TCP CC only on the first subflow. > > This

Re: [PATCH v7 2/3] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-05-07 Thread Oliver Upton
Hi, On Tue, May 07, 2024 at 10:45:24AM +0200, Eric Auger wrote: > On 4/9/24 05:03, Shaoqin Huang wrote: > > +#define GICD_BASE_GPA 0x800ULL > > +#define GICR_BASE_GPA 0x80AULL > in v4 Oliver suggested "Shouldn't a standardized layout of the GIC > frames go with the rest of the

Re: [PATCH bpf-next 2/4] selftests/bpf: Add RUN_MPTCP_TEST macro

2024-05-07 Thread Alexei Starovoitov
On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) wrote: > > From: Geliang Tang > > Each MPTCP subtest tests test__start_subtest(suffix), then invokes > test_suffix(). It makes sense to add a new macro RUN_MPTCP_TEST to > simpolify the code. > > Signed-off-by: Geliang Tang > Reviewed-by:

Re: [PATCH bpf-next 1/4] selftests/bpf: Handle SIGINT when creating netns

2024-05-07 Thread Alexei Starovoitov
On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) wrote: > > From: Geliang Tang > > It's necessary to delete netns during the MPTCP bpf tests interrupt, > otherwise the next tests run will fail due to unable to create netns. > > This patch adds a new SIGINT handle sig_int, and deletes

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

2024-05-07 Thread Sean Christopherson
On Mon, May 06, 2024, Kees Cook wrote: > 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

[PATCH RFC bpf-next 8/8] bpf: rely on __aux suffix for bpf_wq_set_callback_impl

2024-05-07 Thread Benjamin Tissoires
And then cleanup the verifier about the special cases about this kfunc. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain in

[PATCH RFC bpf-next 7/8] bpf: implement __aux kfunc argument suffix to fetch prog_aux

2024-05-07 Thread Benjamin Tissoires
This allows kfunc to request the prog_aux environment in their implementation, to have access to the originated bpf_prog for example. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain

[PATCH RFC bpf-next 6/8] bpf: remove one special case of is_bpf_wq_set_callback_impl_kfunc

2024-05-07 Thread Benjamin Tissoires
It looks like the generic implementation based on __s_async suffix works well enough. So let's use it. Note: - currently we lose the return value range - the second argument is not of type PTR_TO_MAP_KEY Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully

[PATCH RFC bpf-next 5/8] selftests/bpf: rely on wq_callback_fn_t

2024-05-07 Thread Benjamin Tissoires
The type of bpf_wq callbacks changed. So adapt to it and make use of wq_callback_fn_t. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain in

[PATCH RFC bpf-next 4/8] bpf: typedef a type for the bpf_wq callbacks

2024-05-07 Thread Benjamin Tissoires
This allows users to rely on it by using it from the vmlinux.h Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain in

[PATCH RFC bpf-next 3/8] bpf: implement __async and __s_async kfunc suffixes

2024-05-07 Thread Benjamin Tissoires
still mostly a WIP, but it seems to be working for the couple of tests. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain in

[PATCH RFC bpf-next 2/8] bpf: add kfunc_meta parameter to push_callback_call()

2024-05-07 Thread Benjamin Tissoires
No code change but is a preparatory patch for being able to declare async callbacks from bpf kfuncs. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it is. I'm posting this to show what I wanted to explain in

[PATCH RFC bpf-next 1/8] bpf: ignore sleepable prog parameter for kfuncs

2024-05-07 Thread Benjamin Tissoires
There is no change of behavior: for each kfunc, we store the prog sleepable state. But this allows to declare an async non sleepable callback from a syscall, where everything is sleepable. Signed-off-by: Benjamin Tissoires --- This is an RFC, and is not meant to be fully reviewed/applied as it

[PATCH RFC bpf-next 0/8] Implement generic bpf_async cb

2024-05-07 Thread Benjamin Tissoires
/bpf_experimental.h | 3 +- tools/testing/selftests/bpf/progs/wq.c | 10 +- tools/testing/selftests/bpf/progs/wq_failures.c | 4 +- 5 files changed, 280 insertions(+), 80 deletions(-) --- base-commit: 05cbc217aafbc631a6c2fab4accf95850cb48358 change-id: 20240507-bpf_async-bd2e65847525

[PATCH bpf-next 4/4] selftests/bpf: Add mptcp subflow subtest

2024-05-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds a subtest named test_subflow to load and verify the newly added mptcp subflow example in test_mptcp. Add a helper endpoint_init() to add a new subflow endpoint. Add another helper ss_search() to verify the fwmark and congestion values set by mptcp_subflow prog

[PATCH bpf-next 3/4] selftests/bpf: Add mptcp subflow example

2024-05-07 Thread Matthieu Baerts (NGI0)
From: Nicolas Rybowski Move Nicolas's patch into bpf selftests directory. This example added a test that was adding a different mark (SO_MARK) on each subflow, and changing the TCP CC only on the first subflow. This example shows how it is possible to: Identify the parent msk of an MPTCP

[PATCH bpf-next 2/4] selftests/bpf: Add RUN_MPTCP_TEST macro

2024-05-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang Each MPTCP subtest tests test__start_subtest(suffix), then invokes test_suffix(). It makes sense to add a new macro RUN_MPTCP_TEST to simpolify the code. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) ---

[PATCH bpf-next 1/4] selftests/bpf: Handle SIGINT when creating netns

2024-05-07 Thread Matthieu Baerts (NGI0)
From: Geliang Tang It's necessary to delete netns during the MPTCP bpf tests interrupt, otherwise the next tests run will fail due to unable to create netns. This patch adds a new SIGINT handle sig_int, and deletes NS_TEST in it. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau

[PATCH bpf-next 0/4] selftests/bpf: new MPTCP subflow subtest & improvements

2024-05-07 Thread Matthieu Baerts (NGI0)
In this series from Geliang, modifying MPTCP BPF selftests, we have: - SIGINT support - A new macro to reduce duplicated code - A new MPTCP subflow BPF program setting socket options per subflow: it looks better to have this old test program in the BPF selftests to track regressions and to

[net-next PATCH] test: hsr: Call cleanup_all_ns when hsr_redbox.sh script exits

2024-05-07 Thread Lukasz Majewski
Without this change the created netns instances are not cleared after this script execution. To fix this problem the cleanup_all_ns function from ../lib.sh is called. Signed-off-by: Lukasz Majewski --- tools/testing/selftests/net/hsr/hsr_redbox.sh | 2 ++ 1 file changed, 2 insertions(+) diff

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

2024-05-07 Thread Sabrina Dubroca
2024-05-06, 17:57:23 +0200, Antony Antony wrote: > 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

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

2024-05-07 Thread Alexander Lobakin
From: Michal Schmidt Date: Mon, 6 May 2024 16:50:22 +0200 > 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

Re: [PATCH v7 2/3] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-05-07 Thread Eric Auger
Hi Shaoqin, On 4/9/24 05:03, Shaoqin Huang wrote: > Introduce pmu_event_filter_test for arm64 platforms. The test configures > PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and > check if the guest can see those events which user allow and can't use > those events which use

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

2024-05-07 Thread Sabrina Dubroca
Hi Antony, 2024-05-06, 10:05:54 +0200, Antony Antony wrote: > diff --git a/tools/testing/selftests/net/xfrm_state.sh > b/tools/testing/selftests/net/xfrm_state.sh > new file mode 100755 > index ..26eac013abcf > --- /dev/null > +++ b/tools/testing/selftests/net/xfrm_state.sh [...] >

Re: [PATCH] selftests/mqueue: fix 5 warnings about signed/unsigned mismatches

2024-05-07 Thread Ryan Roberts
On 05/05/2024 23:13, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about several cases of using a signed integer for the > priority argument to mq_receive(3), which expects an unsigned int. > > Fix this by declaring the

  1   2   >