Re: [PATCH bpf-next v2 2/2] selftests/bpf: Add pairs_redir_to_connected helper

2023-10-05 Thread Martin KaFai Lau
On 10/5/23 12:21 AM, Geliang Tang wrote: --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c @@ -1336,32 +1336,22 @@ static void test_redir(struct test_sockmap_listen *skel, struct bpf_map *map, } } -static void

Re: [PATCH bpf-next v2 0/2] cleanups for sockmap_listen

2023-10-05 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Thu, 5 Oct 2023 15:21:50 +0800 you wrote: > v2: > - rename c0/c1 to cli0/cli1, p0/p1 to peer0/perr1 as Daniel suggested. > > Two cleanups for sockmap_listen selftests: enable a kconfig and add a > new helper.

Re: [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-05 Thread Rik van Riel
On Thu, 2023-10-05 at 09:39 -0700, Breno Leitao wrote: > Create a selftest that exercises the race between page faults and > madvise(MADV_DONTNEED) in the same huge page. Do it by running two > threads that touches the huge page and madvise(MADV_DONTNEED) at the > same > time. > >   -

Re: [PATCH v2 1/2] selftests/mm: export get_free_hugepages()

2023-10-05 Thread Rik van Riel
On Thu, 2023-10-05 at 09:39 -0700, Breno Leitao wrote: > get_free_hugepages() is helpful for other hugepage tests. Export it > to > the common file (vm_util.c) to be reused. > > Signed-off-by: Breno Leitao > Reviewed-by: Rik van Riel -- All Rights Reversed.

[PATCH v3] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Beau Belgrave
The abi_test currently uses a long sized test value for enablement checks. On LE this works fine, however, on BE this results in inaccurate assert checks due to a bit being used and assuming it's value is the same on both LE and BE. Use int type for 32-bit values and long type for 64-bit values to

[PATCH v2] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Beau Belgrave
The abi_test currently uses a long sized test value for enablement checks. On LE this works fine, however, on BE this results in inaccurate assert checks due to a bit being used and assuming it's value is the same on both LE and BE. Use int type for 32-bit values and long type for 64-bit values to

Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines

2023-10-05 Thread Ingo Molnar
* Muhammad Usama Anjum wrote: > On 10/3/23 1:46 PM, Ingo Molnar wrote: > > > > * Muhammad Usama Anjum wrote: > > > >> Kselftests are kernel tests and must be build with kernel headers from > >> same source version. These duplicate defines should automatically > >> picked up from kernel heade

[linux-next:master] BUILD REGRESSION 7d730f1bf6f39ece2d9f3ae682f12e5b593d534d

2023-10-05 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 7d730f1bf6f39ece2d9f3ae682f12e5b593d534d Add linux-next specific files for 20231005 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202309122047.cri9yjrq-...@intel.com https

Re: [PATCH v3 0/3] selftests/hid: assorted fixes

2023-10-05 Thread Eduard Zingerman
On Thu, 2023-10-05 at 17:55 +0200, Benjamin Tissoires wrote: > > And this is the last(?) revision of this series which should now compile > > with or without CONFIG_HID_BPF set. > > > > I had to do changes because [1] was failing > > > > Nick, I kept your Tested-by, even if I made small changes i

Re: [PATCH v3 0/3] selftests/hid: assorted fixes

2023-10-05 Thread Justin Stitt
On Thu, Oct 5, 2023 at 8:55 AM Benjamin Tissoires wrote: > > And this is the last(?) revision of this series which should now compile > with or without CONFIG_HID_BPF set. > > I had to do changes because [1] was failing > > Nick, I kept your Tested-by, even if I made small changes in 1/3. Feel > f

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Steven Rostedt
On Thu, 5 Oct 2023 09:52:30 -0700 Beau Belgrave wrote: > It was based on tracing/for-next. > > I'll get a v2 out rebased upon linux-kselftest, does that work? Hmm, then it should have applied to my tree. I didn't look too deep. Can you see if it applies to: git://git.kernel.org/pub/scm/lin

Re: [PATCH v4 03/36] arm64/gcs: Document the ABI for Guarded Control Stacks

2023-10-05 Thread Catalin Marinas
On Tue, Oct 03, 2023 at 03:26:51PM +0100, Mark Brown wrote: > On Tue, Oct 03, 2023 at 09:45:56AM +0100, Szabolcs Nagy wrote: > > clone3 seems to have features that are only available in clone3 and > > not exposed (reasonably) in libc apis so ppl will use clone3 directly > > and those will be hard t

[PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-05 Thread Breno Leitao
Create a selftest that exercises the race between page faults and madvise(MADV_DONTNEED) in the same huge page. Do it by running two threads that touches the huge page and madvise(MADV_DONTNEED) at the same time. In case of a SIGBUS coming at pagefault, the test should fail, since we hit the bug.

[PATCH RFC] tools/nolibc: add support for constructors and destructors

2023-10-05 Thread Thomas Weißschuh
* must be last */ /* note: do not set any defaults so as to permit holes above */ --- base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8 change-id: 20231005-nolibc-constructors-b2aebffe9b65 Best regards, -- Thomas Weißschuh

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Beau Belgrave
On Thu, Oct 05, 2023 at 11:08:15AM -0400, Steven Rostedt wrote: > On Thu, 5 Oct 2023 08:48:14 -0600 > Shuah Khan wrote: > > > Hmm. Which tree is this patch based on? This doesn't apply to > > linux-kselftest fixes - I thought this was based on top of fixes > > since I sent in a fix for Linux 6.6-

[PATCH v2 1/2] selftests/mm: export get_free_hugepages()

2023-10-05 Thread Breno Leitao
get_free_hugepages() is helpful for other hugepage tests. Export it to the common file (vm_util.c) to be reused. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/hugetlb-madvise.c | 19 --- tools/testing/selftests/mm/vm_util.c | 19 +++ tools/tes

[PATCH bpf-next v2 0/2] cleanups for sockmap_listen

2023-10-05 Thread Geliang Tang
v2: - rename c0/c1 to cli0/cli1, p0/p1 to peer0/perr1 as Daniel suggested. Two cleanups for sockmap_listen selftests: enable a kconfig and add a new helper. Geliang Tang (2): selftests/bpf: Enable CONFIG_VSOCKETS in config selftests/bpf: Add pairs_redir_to_connected helper tools/testing/se

[PATCH v2 1/7] KVM: selftests: x86: sync_regs_test: Use vcpu_run() where appropriate

2023-10-05 Thread Thomas Huth
In the spots where we are expecting a successful run, we should use vcpu_run() instead of _vcpu_run() to make sure that the run did not fail. Suggested-by: Sean Christopherson Signed-off-by: Thomas Huth --- tools/testing/selftests/kvm/x86_64/sync_regs_test.c | 10 +- 1 file changed, 5 i

[PATCH v2 6/7] KVM: selftests: x86: Use TAP interface in the vmx_pmu_caps test

2023-10-05 Thread Thomas Huth
Use the kvm_test_harness.h interface in this test to get TAP output, so that it is easier for the user to see what the test is doing. Signed-off-by: Thomas Huth --- .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 50 --- 1 file changed, 11 insertions(+), 39 deletions(-) diff --g

Re: [PATCH v1 15/20] arm64: add POE signal support

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:18PM +0100, Joey Gouly wrote: > Add PKEY support to signals, by saving and restoring POR_EL0 from the > stackframe. It'd be nice to have at least a basic test that validates that we generate a POE signal frame when expected, though that should be a very minor thing w

RE: [PATCH v2 1/6] selftests/resctrl: Extend signal handler coverage to unmount on receiving signal

2023-10-05 Thread Shaopeng Tan (Fujitsu)
Hello Reinette, > On 9/28/2023 1:10 AM, Shaopeng Tan (Fujitsu) wrote: > >> On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: > > ... > > >>> +static void run_mbm_test(const char * const *benchmark_cmd, int > >>> +cpu_no) { > >>> + int res; > >>> + > >>> + ksft_print_msg("Starting MBM BW change ...\n");

[PATCH v3 1/3] selftests/hid: ensure we can compile the tests on kernels pre-6.3

2023-10-05 Thread Benjamin Tissoires
For the hid-bpf tests to compile, we need to have the definition of struct hid_bpf_ctx. This definition is an internal one from the kernel and it is supposed to be defined in the generated vmlinux.h. This vmlinux.h header is generated based on the currently running kernel or if the kernel was alre

[PATCH v3 3/3] selftests/hid: force using our compiled libbpf headers

2023-10-05 Thread Benjamin Tissoires
Turns out that we were relying on the globally installed headers, not the ones we freshly compiled. Add a manual include in CFLAGS to sort this out. Tested-by: Nick Desaulniers # Build Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/Makefile | 2 ++ 1 file changed, 2 insertion

[PATCH v3 2/3] selftests/hid: do not manually call headers_install

2023-10-05 Thread Benjamin Tissoires
"make headers" is a requirement before calling make on the selftests dir, so we should not have to manually install those headers Acked-by: Shuah Khan Tested-by: Nick Desaulniers # Build Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/Makefile | 8 ++-- 1 file changed, 2

[PATCH v3 0/3] selftests/hid: assorted fixes

2023-10-05 Thread Benjamin Tissoires
And this is the last(?) revision of this series which should now compile with or without CONFIG_HID_BPF set. I had to do changes because [1] was failing Nick, I kept your Tested-by, even if I made small changes in 1/3. Feel free to shout if you don't want me to keep it. Eduard, You helped us a l

[PATCH bpf-next v2 1/2] selftests/bpf: Enable CONFIG_VSOCKETS in config

2023-10-05 Thread Geliang Tang
CONFIG_VSOCKETS is required by BPF selftests, otherwise we get errors like this: ./test_progs:socket_loopback_reuseport:386: socket: Address family not supported by protocol socket_loopback_reuseport:FAIL:386 ./test_progs:vsock_unix_redir_connectible:1496:

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Steven Rostedt
On Thu, 5 Oct 2023 08:48:14 -0600 Shuah Khan wrote: > Hmm. Which tree is this patch based on? This doesn't apply to > linux-kselftest fixes - I thought this was based on top of fixes > since I sent in a fix for Linux 6.6-rc4 for user_events > > Beau, Please rebase to the correct tree/branch and

[PATCH v2 7/7] KVM: selftests: x86: Use TAP interface in the userspace_msr_exit test

2023-10-05 Thread Thomas Huth
Use the kselftest_harness.h interface in this test to get TAP output, so that it is easier for the user to see what the test is doing. Note: We're not using the KVM_ONE_VCPU_TEST() macro here (but the generic TEST() macro from kselftest_harness.h) since each of the tests needs a different guest co

[PATCH v2 0/7] Use TAP in some more x86 KVM selftests

2023-10-05 Thread Thomas Huth
Here's a follow-up from my RFC series last year: https://lore.kernel.org/lkml/20221004093131.40392-1-th...@redhat.com/T/ and from v1 earlier this year: https://lore.kernel.org/kvm/20230712075910.22480-1-th...@redhat.com/ Basic idea of this series is now to use the kselftest_harness.h framewor

[PATCH v2 5/7] KVM: selftests: x86: Use TAP interface in the fix_hypercall test

2023-10-05 Thread Thomas Huth
Use the kvm_test_harness.h interface in this test to get TAP output, so that it is easier for the user to see what the test is doing. Signed-off-by: Thomas Huth --- .../selftests/kvm/x86_64/fix_hypercall_test.c | 27 --- 1 file changed, 18 insertions(+), 9 deletions(-) diff --gi

[PATCH v2 4/7] KVM: selftests: x86: Use TAP interface in the sync_regs test

2023-10-05 Thread Thomas Huth
The sync_regs test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user whether a certain new sub-test has been included in the binary or not. Let's make this a little bit more user-friendly and include some TAP output via the kselftest_

[PATCH v2 2/7] KVM: selftests: x86: sync_regs_test: Get regs structure before modifying it

2023-10-05 Thread Thomas Huth
The regs structure just accidentially contains the right values from the previous test in the spot where we want to change rbx. It's cleaner if we properly initialize the structure here before using it. Suggested-by: Sean Christopherson Signed-off-by: Thomas Huth --- tools/testing/selftests/kvm

[PATCH v2 3/7] KVM: selftests: Add a macro to define a test with one vcpu

2023-10-05 Thread Thomas Huth
Most tests are currently not giving any proper output for the user to see how much sub-tests have already been run, or whether new sub-tests are part of a binary or not. So it would be good to support TAP output in the KVM selftests. There is already a nice framework for this in the kselftest_harne

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-05 Thread Shuah Khan
On 10/4/23 10:38, Shuah Khan wrote: On 10/4/23 09:14, Steven Rostedt wrote: On Wed, 4 Oct 2023 09:10:52 -0600 Shuah Khan wrote: On 10/3/23 18:59, Steven Rostedt wrote: Note, this doesn't seem to apply to my tree so I only added the first patch. I think this needs to go through Shuah's tree.

Re: [PATCH v1 07/20] arm64: enable the Permission Overlay Extension for EL0

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:10PM +0100, Joey Gouly wrote: > Expose a HWCAP and ID_AA64MMFR3_EL1_S1POE to userspace, so they can be used to > check if the CPU supports the feature. Please also add the new hwcap to the hwcaps self test. signature.asc Description: PGP signature

Re: [PATCH v1 02/20] arm64/sysreg: update CPACR_EL1 register

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:05PM +0100, Joey Gouly wrote: > Add E0POE bit that traps accesses to POR_EL0 from EL0. > Updated according to DDI0601 2023-03. Reviewed-by: Mark Brown It's also up to date with DDI 0601 2023-09 it seems. signature.asc Description: PGP signature

Re: [PATCH v1 01/20] arm64/sysreg: add system register POR_EL{0,1}

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:04PM +0100, Joey Gouly wrote: > Add POR_EL{0,1} according to DDI0601 2023-03. Reviewed-by: Mark Brown signature.asc Description: PGP signature

Re: [PATCH v1 07/20] arm64: enable the Permission Overlay Extension for EL0

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:10PM +0100, Joey Gouly wrote: > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -400,6 +400,7 @@ static const struct arm64_ftr_bits ftr_id_aa64mmfr2[] = { > }; > > static const struct arm64_ftr_bits ftr_id_aa64mmfr3[] = { > + A

Re: [PATCH v1 05/20] arm64: context switch POR_EL0 register

2023-10-05 Thread Mark Brown
On Wed, Sep 27, 2023 at 03:01:08PM +0100, Joey Gouly wrote: > +/* Initial value for Permission Overlay Extension for EL0 */ > +#define POR_EL0_INIT UL(0x7) Might be useful to explain why this is the default (and possibly also define in terms of the constants for POR values)? > +static void permi

Re: [PATCH v3 0/6] KVM RISC-V Conditional Operations

2023-10-05 Thread Anup Patel
On Tue, Oct 3, 2023 at 9:22 AM Anup Patel wrote: > > This series extends KVM RISC-V to allow Guest/VM discover and use > conditional operations related ISA extensions (namely XVentanaCondOps > and Zicond). > > To try these patches, use KVMTOOL from riscv_zbx_zicntr_smstateen_condops_v1 > branch at

Re: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines

2023-10-05 Thread Muhammad Usama Anjum
On 10/3/23 1:46 PM, Ingo Molnar wrote: > > * Muhammad Usama Anjum wrote: > >> Kselftests are kernel tests and must be build with kernel headers from >> same source version. These duplicate defines should automatically >> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header >> fi

[bug report] kunit: test: Fix the possible memory leak in executor_test

2023-10-05 Thread Dan Carpenter
Hello Jinjie Ruan, The patch 8040345fdae4: "kunit: test: Fix the possible memory leak in executor_test" from Sep 27, 2023 (linux-next), leads to the following Smatch static checker warning: lib/kunit/executor_test.c:276 free_suite_set_at_end() error: potential null dereference 'fr

Re: [PATCH 1/7] RISC-V: Detect XVentanaCondOps from ISA string

2023-10-05 Thread Christoph Hellwig
On Mon, Oct 02, 2023 at 09:06:08PM +0530, Anup Patel wrote: > > extensions? > > > > We already have few T-Head specific extensions so Linux RISC-V > does allow vendor extensions. Only for kernel internal operation and to actually boot the chip. IMHO still the wrong tradeoff, but very different f

Re: [PATCH 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-05 Thread Breno Leitao
On Wed, Oct 04, 2023 at 08:22:08PM -0400, Rik van Riel wrote: > On Wed, 2023-10-04 at 10:11 -0700, Breno Leitao wrote: > > > > +char *huge_ptr; > > + > > +/* Touch the memory while it is being madvised() */ > > +void *touch(void *unused) > > +{ > > +   char *ptr = (char *)huge_ptr; > > + > > +

Re: [PATCH v3 2/6] RISC-V: Detect Zicond from ISA string

2023-10-05 Thread Anup Patel
On Wed, Oct 4, 2023 at 7:37 PM Palmer Dabbelt wrote: > > On Mon, 02 Oct 2023 20:52:22 PDT (-0700), apa...@ventanamicro.com wrote: > > The RISC-V integer conditional (Zicond) operation extension defines > > standard conditional arithmetic and conditional-select/move operations > > which are inspire

[PATCH bpf-next v2 2/2] selftests/bpf: Add pairs_redir_to_connected helper

2023-10-05 Thread Geliang Tang
Extract duplicate code from these four functions unix_redir_to_connected() udp_redir_to_connected() inet_unix_redir_to_connected() unix_inet_redir_to_connected() to create a new helper pairs_redir_to_connected(). Create the different socketpairs in these four functions, then pass the socketpa