Re: [PATCH bpf-next v5 6/7] selftests/bpf: Use connect_to_fd_opts in do_test in bpf_tcp_ca

2024-05-28 Thread Martin KaFai Lau
On 5/25/24 5:08 AM, Geliang Tang wrote: From: Geliang Tang This patch uses connect_to_fd_opts() instead of using connect_fd_to_fd() and settcpca() in do_test() in prog_tests/bpf_tcp_ca.c to accept a struct network_helper_opts argument. Then define a dctcp dedicated post_socket_cb callback stg_

Re: [PATCH bpf-next v5 0/7] use network helpers, part 5

2024-05-28 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Sat, 25 May 2024 20:08:14 +0800 you wrote: > From: Geliang Tang > > This patchset uses post_socket_cb and post_connect_cb callbacks of struct > network_helper_opts to refactor do_test() in bpf_tcp_ca.c to move

Re: [PATCH HID 03/13] HID: bpf: implement HID-BPF through bpf_struct_ops

2024-05-28 Thread Alexei Starovoitov
On Tue, May 28, 2024 at 6:15 AM Benjamin Tissoires wrote: > > We do this implementation in several steps to not have the CI failing: > - first (this patch), we add struct_ops while keeping the existing infra > available > - then we change the selftests, the examples and the existing in-tree >

Re: [PATCH net 1/2] net/sched: taprio: make q->picos_per_byte available to fill_sched_entry()

2024-05-28 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Mon, 27 May 2024 18:39:54 +0300 you wrote: > In commit b5b73b26b3ca ("taprio: Fix allowing too small intervals"), a > comparison of user input against length_to_duration(q, ETH_ZLEN) was > introduced, to avoid RCU stal

Re: [PATCH net-next v9 11/14] tcp: RX path for devmem TCP

2024-05-28 Thread Pavel Begunkov
On 5/28/24 18:36, Mina Almasry wrote: On Wed, May 22, 2024 at 11:02 PM David Wei wrote: ... + */ + if (!skb_frag_net_iov(frag)) { + net_err_ratelimited("Found non-dmabuf skb with net_iov"); + err

[PATCH v2 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler

2024-05-28 Thread John Hubbard
It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this: $(CC) -D_GNU_SOURCE= ...because otherwise, if this form is used: $(CC) -D_GNU_SOURCE ...then that leads the compiler to set a value, as if y

[PATCH v2 2/3] selftests/futex: don't pass a const char* to asprintf(3)

2024-05-28 Thread John Hubbard
When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang issues a warning, because test_name is passed into asprintf(3), which then changes it. Fix this by simply removing the const qualifier. This is a local automatic variable in a very short function, so there is not

[PATCH v2 1/3] selftests/futex: don't redefine .PHONY targets (all, clean)

2024-05-28 Thread John Hubbard
The .PHONY targets "all" and "clean" are both defined in the file that is included in the very next line: ../lib.mk. Reviewed-by: Davidlohr Bueso Signed-off-by: John Hubbard --- tools/testing/selftests/futex/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/

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

2024-05-28 Thread John Hubbard
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. Changes since the first version: 1) Rebased onto Linux 6.10-rc1 2) Added Reviewed-by's. ...and it turns out that all three patches are still required, on -

[PATCH 2/2] selftests/lib.mk: silence some clang warnings that gcc already ignores

2024-05-28 Thread John Hubbard
gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. These warnings are not useful for kselftests, so silence them for the clang builds as well: -Wno-address-of-packed-member -Wno-gnu-variable-sized-type-not-at-end This eliminates warnings for the

[PATCH 1/2] selftests/lib.mk: handle both LLVM=1 and CC=clang builds

2024-05-28 Thread John Hubbard
The kselftests may be built in a couple different ways: make LLVM=1 make CC=clang In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of lib.mk, and any Makefiles that include lib.mk, can base decisions solely on whether or not LLVM is set. Cc: Nathan Chancellor Cc:

[PATCH 0/2] selftests/lib.mk: LLVM=1, CC=clang, and warnings

2024-05-28 Thread John Hubbard
The kselftests may be built in a couple different ways: make LLVM=1 make CC=clang In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest of lib.mk, and any Makefiles that include lib.mk, can base decisions solely on whether or not LLVM is set. Then, build upon that to di

Re: [PATCH bpf-next] selftests/bpf: Enable INET_XFRM_TUNNEL in config

2024-05-28 Thread Ilya Leoshkevich
On Fri, 2024-05-24 at 18:27 +0200, Daniel Borkmann wrote: > On 5/16/24 3:41 AM, Geliang Tang wrote: > > From: Geliang Tang > > > > The kconfigs CONFIG_INET_XFRM_TUNNEL and CONFIG_INET6_XFRM_TUNNEL > > are > > needed by test_tunnel tests. This patch enables them together with > > the > > dependent

Re: [PATCH 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler

2024-05-28 Thread John Hubbard
On 5/28/24 3:24 PM, Edward Liaw wrote: On Wed, May 8, 2024 at 2:05 PM John Hubbard wrote: On 5/2/24 9:18 PM, John Hubbard wrote: It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this: Hi Shuah, Edwar

Re: [PATCH 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler

2024-05-28 Thread Edward Liaw
On Wed, May 8, 2024 at 2:05 PM John Hubbard wrote: > > On 5/2/24 9:18 PM, John Hubbard wrote: > > It's slightly better to set _GNU_SOURCE in the source code, but if one > > must do it via the compiler invocation, then the best way to do so is > > this: > > Hi Shuah, Edward and all, > > This patch

kselftest/next kselftest-seccomp: 4 runs, 4 regressions (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 4 runs, 4 regressions (v6.10-rc1) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.10-rc1) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--+-

kselftest/next kselftest-cpufreq: 7 runs, 1 regressions (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/next kselftest-cpufreq: 7 runs, 1 regressions (v6.10-rc1) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions ---+---+---+--+--

kselftest/fixes kselftest-livepatch: 2 runs, 1 regressions (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/fixes kselftest-livepatch: 2 runs, 1 regressions (v6.10-rc1) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--+

kselftest/fixes kselftest-lkdtm: 5 runs, 1 regressions (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/fixes kselftest-lkdtm: 5 runs, 1 regressions (v6.10-rc1) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+---+--+--+

kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.10-rc1) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.10-rc1/ Tree: kselftest Branch: next Git Describe: v6.10-rc1 Git Commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 Git URL: https://git.kernel.

Re: [PATCH v2] selftests/net: suppress clang's "variable-sized type not at the end" warning

2024-05-28 Thread John Hubbard
On 5/28/24 1:39 PM, Nathan Chancellor wrote: On Mon, May 27, 2024 at 02:36:41PM -0700, John Hubbard wrote: ... diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index bd01e4a0be2c..9a3b766c8781 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools

Re: [PATCH v2] selftests/user_events: silence a clang warning: address of packed member

2024-05-28 Thread John Hubbard
On 5/28/24 1:35 PM, Nathan Chancellor wrote: On Tue, May 28, 2024 at 01:28:33PM -0700, Nathan Chancellor wrote: ... diff --git a/tools/testing/selftests/user_events/Makefile b/tools/testing/selftests/user_events/Makefile index 10fcd0066203..617e94344711 100644 --- a/tools/testing/selftests/use

Re: [PATCH v2] selftests/net: suppress clang's "variable-sized type not at the end" warning

2024-05-28 Thread Nathan Chancellor
On Mon, May 27, 2024 at 02:36:41PM -0700, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns that "a variable sized type not at the end of a struct or > class is a GNU extension". > > These cases are not easily changed, because t

Re: [PATCH v2] selftests/user_events: silence a clang warning: address of packed member

2024-05-28 Thread Nathan Chancellor
On Tue, May 28, 2024 at 01:28:33PM -0700, Nathan Chancellor wrote: > Hi John, > > On Mon, May 27, 2024 at 02:47:04PM -0700, John Hubbard wrote: > > When building with clang, via: > > > > make LLVM=1 -C tools/testing/selftest > > > > ...clang warns about "taking address of packed member 'writ

Re: [PATCH v2] selftests/user_events: silence a clang warning: address of packed member

2024-05-28 Thread Nathan Chancellor
Hi John, On Mon, May 27, 2024 at 02:47:04PM -0700, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftest > > ...clang warns about "taking address of packed member 'write_index' ". > This is not particularly helpful, because the test code really wants

kselftest/fixes build: 6 builds: 0 failed, 6 passed, 1 warning (v6.10-rc1)

2024-05-28 Thread kernelci.org bot
kselftest/fixes build: 6 builds: 0 failed, 6 passed, 1 warning (v6.10-rc1) Full Build Summary: https://kernelci.org/build/kselftest/branch/fixes/kernel/v6.10-rc1/ Tree: kselftest Branch: fixes Git Describe: v6.10-rc1 Git Commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 Git URL: https://git.kern

Re: [PATCH v1] memfd: `MFD_NOEXEC_SEAL` should not imply `MFD_ALLOW_SEALING`

2024-05-28 Thread Jeff Xu
Hi Aleksa, On Fri, May 24, 2024 at 9:12 AM Aleksa Sarai wrote: > > On 2024-05-23, Jeff Xu wrote: > > Regarding vm.memfd_noexec, on another topic. > > I think in addition to vm.memfd_noexec = 1 and 2, there still could > > be another state: 3 > > > > =0. Do nothing. > > =1. This will add MFD_N

Re: [PATCH net-next v9 11/14] tcp: RX path for devmem TCP

2024-05-28 Thread Mina Almasry
On Wed, May 22, 2024 at 11:02 PM David Wei wrote: > > On 2024-05-10 16:21, Mina Almasry wrote: > > +/* On error, returns the -errno. On success, returns number of bytes sent > > to the > > + * user. May not consume all of @remaining_len. > > + */ > > +static int tcp_recvmsg_dmabuf(struct sock *sk

Re: [PATCH v1] memfd: `MFD_NOEXEC_SEAL` should not imply `MFD_ALLOW_SEALING`

2024-05-28 Thread Jeff Xu
On Fri, May 24, 2024 at 7:29 AM David Rheinsberg wrote: > > Hi > > On Thu, May 23, 2024, at 6:55 PM, Jeff Xu wrote: > > On Thu, May 23, 2024 at 9:20 AM Jeff Xu wrote: > >> On Thu, May 23, 2024 at 1:24 AM David Rheinsberg > >> wrote: > >> > We asked for exactly this fix before, so I very much su

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-28 Thread Reinette Chatre
Hi Ilpo, On 5/28/24 3:19 AM, Ilpo Järvinen wrote: On Fri, 24 May 2024, Ilpo Järvinen wrote: On Fri, 24 May 2024, Reinette Chatre wrote: On 5/24/24 12:57 AM, Ilpo Järvinen wrote: On Thu, 23 May 2024, Reinette Chatre wrote: On 5/20/24 5:30 AM, Ilpo Järvinen wrote: For MBM/MBA tests, measure_

Re: [PATCH net-next 1/2] net: make net.core.{r,w}mem_{default,max} namespaced

2024-05-28 Thread Shakeel Butt
On Tue, May 28, 2024 at 02:11:38PM GMT, Matteo Croce wrote: > The following sysctl are global and can't be read from a netns: > > net.core.rmem_default > net.core.rmem_max > net.core.wmem_default > net.core.wmem_max > > Make the following sysctl parameters available readonly from within a > netwo

Re: [PATCH v2] selftests: livepatch: Test atomic replace against multiple modules

2024-05-28 Thread Petr Mladek
On Sat 2024-05-25 11:34:08, Marcos Paulo de Souza wrote: > Adapt the current test-livepatch.sh script to account the number of > applied livepatches and ensure that an atomic replace livepatch disables > all previously applied livepatches. > > Signed-off-by: Marcos Paulo de Souza I am not comple

[PATCH HID 13/13] HID: bpf: error on warnings when compiling bpf objects

2024-05-28 Thread Benjamin Tissoires
There is no real reasons to paper over warnings for such small programs. Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/progs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/bpf/progs/Makefile b/drivers/hid/bpf/progs/Makefile index 63ed7e02adf1..ec

[PATCH HID 12/13] HID: bpf: Artist24: remove unused variable

2024-05-28 Thread Benjamin Tissoires
warning: unused variable ‘tilt’ [-Wunused-variable] Signed-off-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/progs/XPPen__Artist24.bpf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/bpf/progs/XPPen__Artist24.bpf.c b/drivers/hid/bpf/progs/XPPen__Arti

[PATCH HID 11/13] Documentation: HID: add a small blurb on udev-hid-bpf

2024-05-28 Thread Benjamin Tissoires
This is the current decision we took: we don't provide automatic loading of HID-BPF by the kernel directly, but rely on an external tool for it. This tool is currently udev-hid-bpf, so let's make people aware of it. Signed-off-by: Benjamin Tissoires --- Documentation/hid/hid-bpf.rst | 17 ++

[PATCH HID 10/13] Documentation: HID: amend HID-BPF for struct_ops

2024-05-28 Thread Benjamin Tissoires
Now that we are using struct_ops, the docs need to be changed. Signed-off-by: Benjamin Tissoires --- Documentation/hid/hid-bpf.rst | 145 +++--- include/linux/hid_bpf.h | 8 +-- 2 files changed, 71 insertions(+), 82 deletions(-) diff --git a/Documenta

[PATCH HID 09/13] selftests/hid: add subprog call test

2024-05-28 Thread Benjamin Tissoires
I got a weird verifier error with a subprog once, so let's have a test for it. Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/hid_bpf.c | 41 + tools/testing/selftests/hid/progs/hid.c | 24 +++ 2 files changed, 65 insertions(+)

[PATCH HID 08/13] HID: bpf: remove tracing HID-BPF capability

2024-05-28 Thread Benjamin Tissoires
We can now rely on struct_ops as we cleared the users in-tree. Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/Makefile| 2 +- drivers/hid/bpf/entrypoints/Makefile| 93 drivers/hid/bpf/entrypoints/README | 4 - drivers/hid/bpf/entr

[PATCH HID 07/13] HID: bpf: convert in-tree fixes into struct_ops

2024-05-28 Thread Benjamin Tissoires
Very mechanical: - Change HID_BPF_DEVICE_EVENT and HID_BPF_RDESC_FIXUP #defines - add a matching SEC(".struct_ops.link") - in ArtistPro16Gen2 make the 2 functions static and have a new one calling them Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c |

[PATCH HID 06/13] HID: bpf: add defines for HID-BPF SEC in in-tree bpf fixes

2024-05-28 Thread Benjamin Tissoires
We are going to switch over struct_ops, so instead of having to manually replace all fields one by one, let's have a common place to change it. Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c | 4 ++-- drivers/hid/bpf/progs/HP__Elite-Presenter.bpf.c

[PATCH HID 05/13] HID: samples: convert the 2 HID-BPF samples into struct_ops

2024-05-28 Thread Benjamin Tissoires
hid_mouse is currently failing with bpf_printk() not available in struct_ops program type. Signed-off-by: Benjamin Tissoires --- samples/hid/Makefile | 5 ++-- samples/hid/hid_bpf_attach.bpf.c | 18 - samples/hid/hid_bpf_attach.h | 14 -- samples/hid/hi

[PATCH HID 04/13] selftests/hid: convert the hid_bpf selftests with struct_ops

2024-05-28 Thread Benjamin Tissoires
We drop the need for the attach() bpf syscall, but we need to set up the hid_id field before calling __load(). The .bpf.c part is mechanical: we create one struct_ops per HID-BPF program, as all the tests are for one program at a time. Signed-off-by: Benjamin Tissoires --- tools/testing/selftes

[PATCH HID 03/13] HID: bpf: implement HID-BPF through bpf_struct_ops

2024-05-28 Thread Benjamin Tissoires
We do this implementation in several steps to not have the CI failing: - first (this patch), we add struct_ops while keeping the existing infra available - then we change the selftests, the examples and the existing in-tree HID-BPF programs - then we remove the existing trace points making old

[PATCH HID 02/13] HID: bpf: add hid_get/put_device() helpers

2024-05-28 Thread Benjamin Tissoires
no code change, but this way we reduce code duplication and we can export it later. Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/hid_bpf_dispatch.c | 47 ++ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/hid/bpf/hid_bpf_dispat

[PATCH HID 01/13] HID: rename struct hid_bpf_ops into hid_ops

2024-05-28 Thread Benjamin Tissoires
Those operations are the ones from HID, not HID-BPF, and I'd like to reuse hid_bpf_ops as the user facing struct_ops API. Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/hid_bpf_dispatch.c | 22 +++--- drivers/hid/hid-core.c | 6 +++--- include/linux/hid_bpf.h

[PATCH HID 00/13] HID: convert HID-BPF into using bpf_struct_ops

2024-05-28 Thread Benjamin Tissoires
The purpose of this series is to rethink how HID-BPF is invoked. Currently it implies a jmp table, a prog fd bpf_map, a preloaded tracing bpf program and a lot of manual work for handling the bpf program lifetime and addition/removal. OTOH, bpf_struct_ops take care of most of the bpf handling leav

[PATCH net-next 2/2] selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns

2024-05-28 Thread Matteo Croce
Add a selftest which checks that the sysctl is present in a netns, that the value is read from the init one, and that it's readonly. Signed-off-by: Matteo Croce --- tools/testing/selftests/net/Makefile| 1 + tools/testing/selftests/net/netns-sysctl.sh | 15 +++ 2 files chang

[PATCH net-next 1/2] net: make net.core.{r,w}mem_{default,max} namespaced

2024-05-28 Thread Matteo Croce
The following sysctl are global and can't be read from a netns: net.core.rmem_default net.core.rmem_max net.core.wmem_default net.core.wmem_max Make the following sysctl parameters available readonly from within a network namespace, allowing a container to read them. Signed-off-by: Matteo Croce

[PATCH net-next 0/2] net: visibility of memory limits in netns

2024-05-28 Thread Matteo Croce
Some programs need to know the size of the network buffers to operate correctly, export the following sysctls read-only in network namespaces: - net.core.rmem_default - net.core.rmem_max - net.core.wmem_default - net.core.wmem_max Matteo Croce (2): net: make net.core.{r,w}mem_{default,max} name

Re: [PATCH v3 0/5] Add support for the Idle HLT intercept feature

2024-05-28 Thread Paolo Bonzini
On Tue, May 28, 2024 at 6:19 AM Manali Shukla wrote: > > The upcoming new Idle HLT Intercept feature allows for the HLT > instruction execution by a vCPU to be intercepted by the hypervisor > only if there are no pending V_INTR and V_NMI events for the vCPU. > When the vCPU is expected to service

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-28 Thread Ilpo Järvinen
On Fri, 24 May 2024, Ilpo Järvinen wrote: > On Fri, 24 May 2024, Reinette Chatre wrote: > > On 5/24/24 12:57 AM, Ilpo Järvinen wrote: > > > On Thu, 23 May 2024, Reinette Chatre wrote: > > > > On 5/20/24 5:30 AM, Ilpo Järvinen wrote: > > > > > For MBM/MBA tests, measure_vals() calls get_mem_bw_imc(

Re: [PATCH v3 5/5] KVM: selftests: KVM: SVM: Add Idle HLT intercept test

2024-05-28 Thread Chao Gao
>+static void guest_code(void) >+{ >+ uint32_t icr_val; >+ int i; >+ >+ xapic_enable(); >+ >+ icr_val = (APIC_DEST_SELF | APIC_INT_ASSERT | VINTR_VECTOR); >+ >+ for (i = 0; i < NUM_ITERATIONS; i++) { >+ cli(); >+ xapic_write_reg(APIC_ICR, icr_val);

Re: [PATCH v3 1/5] x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept

2024-05-28 Thread Borislav Petkov
On Tue, May 28, 2024 at 04:19:22AM +, Manali Shukla wrote: > From: Manali Shukla > > The Idle HLT Intercept feature allows for the HLT instruction execution > by a vCPU to be intercepted by the hypervisor only if there are no > pending events (V_INTR and V_NMI) for the vCPU. When the vCPU is