Re: [PATCH] selftest/powerpc/benchmark: remove requirement libc-dev

2024-08-08 Thread Madhavan Srinivasan
On 8/9/24 10:24 AM, Christophe Leroy wrote: Le 09/08/2024 à 06:25, Madhavan Srinivasan a écrit : On 8/6/24 12:24 PM, Christophe Leroy wrote: Le 05/08/2024 à 10:30, Madhavan Srinivasan a écrit : Currently exec-target.c file is linked as static and this post a requirement to install libc

Re: [PATCH] selftest/powerpc/benchmark: remove requirement libc-dev

2024-08-08 Thread Christophe Leroy
Le 09/08/2024 à 06:25, Madhavan Srinivasan a écrit : On 8/6/24 12:24 PM, Christophe Leroy wrote: Le 05/08/2024 à 10:30, Madhavan Srinivasan a écrit : Currently exec-target.c file is linked as static and this post a requirement to install libc dev package to build. Without it, build-breaks

Re: [PATCH] selftest/powerpc/benchmark: remove requirement libc-dev

2024-08-08 Thread Madhavan Srinivasan
On 8/6/24 12:24 PM, Christophe Leroy wrote: Le 05/08/2024 à 10:30, Madhavan Srinivasan a écrit : Currently exec-target.c file is linked as static and this post a requirement to install libc dev package to build. Without it, build-breaks when compiling selftest/powerpc/benchmark.    CC  

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2024 16:36:24 -0400 Mina Almasry wrote: > > How do you know that the driver: > > - supports net_iov at all (let's not make implicit assumptions based > >on presence of queue API); > > - supports net_iov in current configuration (eg header-data split is > >enabled) > > - sup

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-08 Thread Eugene Syromiatnikov
On Thu, Aug 08, 2024 at 02:20:21PM -0600, Shuah Khan wrote: > Wouldn't make sense to fix fix this in selftests main Makefile > instead of changing the all the test makefiles As of now, the usage of rpath is localised, so it is relatively easy to evaluate the effect/prudence of such a change; I am

[PATCH] selftests/bpf/Makefile: fix relative rpath usage

2024-08-08 Thread Eugene Syromiatnikov
The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executable is run from elsewhere. Changing it to $ORIGIN makes it resolve relative to the directo

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-08 Thread Nicolin Chen
On Thu, Aug 08, 2024 at 01:38:44PM +0100, Robin Murphy wrote: > On 06/08/2024 9:25 am, Tian, Kevin wrote: > > > From: Nicolin Chen > > > Sent: Saturday, August 3, 2024 8:32 AM > > > > > > From: Robin Murphy > > > > > > Currently, iommu-dma is the only place outside of IOMMUFD and drivers > > >

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-08 Thread Mina Almasry
On Tue, Aug 6, 2024 at 4:59 PM Jakub Kicinski wrote: > ... > On Mon, 5 Aug 2024 21:25:20 + Mina Almasry wrote: > > + if (pool->p.queue) { > > + /* We rely on rtnl_lock()ing to make sure netdev_rx_queue > > + * configuration doesn't change while we're initializing

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 08:57, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to

Re: [PATCH] selftests/sched/Makefile: remove relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 09:16, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. However, the s

Re: [PATCH] selftests/rseq/Makefile: fix relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 09:13, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to

[PATCH] selftests: riscv: Allow mmap test to compile on 32-bit

2024-08-08 Thread Charlie Jenkins
Macros needed for 32-bit compilations were hidden behind 64-bit riscv ifdefs. Fix the 32-bit compilations by moving macros to allow the memory_layout test to run on 32-bit. Signed-off-by: Charlie Jenkins Fixes: 73d05262a2ca ("selftests: riscv: Generalize mm selftests") --- tools/testing/selftest

Re: [PATCH RFT v8 0/9] fork: Support shadow stacks in clone3()

2024-08-08 Thread Kees Cook
On Thu, Aug 08, 2024 at 09:15:21AM +0100, Mark Brown wrote: > The kernel has recently added support for shadow stacks, currently > x86 only using their CET feature but both arm64 and RISC-V have > equivalent features (GCS and Zicfiss respectively), I am actively > working on GCS[1]. With shadow st

Re: [PATCH] KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list

2024-08-08 Thread Oliver Upton
On Wed, 31 Jul 2024 17:21:13 +0100, Mark Brown wrote: > The ID register for S1PIE is ID_AA64MMFR3_EL1.S1PIE which is bits 11:8 but > get-reg-list uses a shift of 4, checking SCTLRX instead. Use a shift of 8 > instead. > > Applied to kvmarm/fixes, thanks! [1/1] KVM: selftests: arm64: Correct fea

Re: [PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2024 12:24:51 + Abhinav Jain wrote: > Check if the netdev list is empty and create veth pair to be used for > feature on/off testing. > Remove the veth pair after testing is complete. A number of checks now return SKIP because veth doesn't support all ethtool APIs. In netdev se

[PATCH] selftests/sched/Makefile: remove relative rpath usage

2024-08-08 Thread Eugene Syromiatnikov
The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. However, the sole sched test (cs_prctl_test) does not require

[PATCH] selftests/rseq/Makefile: fix relative rpath usage

2024-08-08 Thread Eugene Syromiatnikov
The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to $ORIGIN makes it resolve relative to the direc

[PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-08 Thread Eugene Syromiatnikov
The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to $ORIGIN makes it resolve relative to the direc

Re: [PATCH net-next] selftests: forwarding: lib.sh: ignore "Address not found"

2024-08-08 Thread Ido Schimmel
On Thu, Aug 08, 2024 at 04:53:51PM +0800, Geliang Tang wrote: > Yes indeed, the addresses are deleted by NetworkManager. Does this mean > that this test will be affected by the network environment in which it > is running? Is it necessary to run this test in a new network > namespace? No. See tool

Re: [PATCH v4 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2024 12:28:47 + Abhinav Jain wrote: > On Wed, 7 Aug 2024 18:28:34 -0700 Jakub Kicinski wrote: > > That's not the right syntax.. > > Thanks for the feedback Jakub. I have rectified this and while at it, > I tested using vng on a network based kernel and found another issue in >

[PATCH net-next v13 05/14] mm: page_frag: avoid caller accessing 'page_frag_cache' directly

2024-08-08 Thread Yunsheng Lin
Use appropriate frag_page API instead of caller accessing 'page_frag_cache' directly. CC: Alexander Duyck Signed-off-by: Yunsheng Lin Reviewed-by: Alexander Duyck Acked-by: Chuck Lever --- drivers/vhost/net.c | 2 +- include/linux/page_frag_cache.h

[PATCH net-next v13 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-08 Thread Yunsheng Lin
Currently the page_frag API is returning 'virtual address' or 'va' when allocing and expecting 'virtual address' or 'va' as input when freeing. As we are about to support new use cases that the caller need to deal with 'struct page' or need to deal with both 'va' and 'struct page'. In order to dif

[PATCH net-next v13 02/14] mm: move the page fragment allocator from page_alloc into its own file

2024-08-08 Thread Yunsheng Lin
Inspired by [1], move the page fragment allocator from page_alloc into its own c file and header file, as we are about to make more change for it to replace another page_frag implementation in sock.c As this patchset is going to replace 'struct page_frag' with 'struct page_frag_cache' in sched.h,

[PATCH net-next v13 01/14] mm: page_frag: add a test module for page_frag

2024-08-08 Thread Yunsheng Lin
The testing is done by ensuring that the fragment allocated from a frag_frag_cache instance is pushed into a ptr_ring instance in a kthread binded to a specified cpu, and a kthread binded to a specified cpu will pop the fragment from the ptr_ring and free the fragment. CC: Alexander Duyck Signed-

Re: [PATCH v2 2/3] iommu/dma: Support MSIs through nested domains

2024-08-08 Thread Robin Murphy
On 06/08/2024 9:25 am, Tian, Kevin wrote: From: Nicolin Chen Sent: Saturday, August 3, 2024 8:32 AM From: Robin Murphy Currently, iommu-dma is the only place outside of IOMMUFD and drivers which might need to be aware of the stage 2 domain encapsulated within a nested domain. This would be in

Re: [PATCH v4 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Abhinav Jain
On Wed, 7 Aug 2024 18:28:34 -0700 Jakub Kicinski wrote: > That's not the right syntax.. Thanks for the feedback Jakub. I have rectified this and while at it, I tested using vng on a network based kernel and found another issue in veth removal logic. I have fixed that as well. Please kindly check

[PATCH v5 2/2] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-08 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Save the initial state so that it can be restored after on/off checks. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 37 +++- 1 file changed, 36 insertions(+), 1 deletion(-) diff

[PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Abhinav Jain
Check if the netdev list is empty and create veth pair to be used for feature on/off testing. Remove the veth pair after testing is complete. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 16 1 file changed, 16 insertions(+) diff --git a/tools/testi

[PATCH v5 0/2] Enhance network interface feature testing

2024-08-08 Thread Abhinav Jain
This small series includes fixes for creation of veth pairs for networkless kernels & adds tests for turning the different network interface features on and off in selftests/net/netdevice.sh script. Changes in v5: Rectify the syntax for ip add link. Fix the veth_created condition check. Changes i

Re: [PATCH] selftests: kvm: fix mkdir error when building for non-supported arch

2024-08-08 Thread Muhammad Usama Anjum
Adding Sean On 8/7/24 11:33 AM, Muhammad Usama Anjum wrote: > On 8/7/24 11:08 AM, Muhammad Usama Anjum wrote: >> On 8/6/24 9:00 PM, Shuah Khan wrote: >>> On 8/6/24 06:10, Muhammad Usama Anjum wrote: The mkdir generates an error when kvm suite is build for non-supported >>> >>> built >>> unsup

Re: [RFC PATCH 1/1] kselftests: Add test to detect boot event slowdowns

2024-08-08 Thread Laura Nao
On 7/31/24 11:25, Laura Nao wrote: > > It looks like sleepgraph.py is more focused on analyzing suspend/resume > timings, while bootgraph.py measures boot time using the kernel log and > ftrace. The latter might indeed come in handy. > As far as I can see, the script doesn't support automatic dete

Re: [PATCH v3 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-08-08 Thread kernel test robot
Hi Ivan, kernel test robot noticed the following build errors: [auto build test ERROR on tiwai-sound/for-next] [also build test ERROR on tiwai-sound/for-linus linus/master v6.11-rc2 next-20240808] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH bpf-next] selftests/bpf: Avoid subtraction after htons() in ipip tests

2024-08-08 Thread Toke Høiland-Jørgensen
Asbjørn Sloth Tønnesen writes: > On little-endian systems, doing subtraction after htons() > leads to interesting results: > > Given: > MAGIC_BYTES = 123 = 0x007B aka. in big endian: 0x7B00 = 31488 > sizeof(struct iphdr) = 20 > > Before this patch: > __bpf_constant_htons(MAGIC_BYTES) - sizeof

Re: [PATCH net-next] selftests: forwarding: lib.sh: ignore "Address not found"

2024-08-08 Thread Geliang Tang
On Wed, 2024-08-07 at 09:59 +0300, Ido Schimmel wrote: > On Wed, Aug 07, 2024 at 12:08:15PM +0800, Geliang Tang wrote: > > On Tue, 2024-08-06 at 10:40 +0300, Ido Schimmel wrote: > > > On Tue, Aug 06, 2024 at 12:20:38PM +0800, Geliang Tang wrote: > > > > From: Geliang Tang > > > > > > > > So many

Re: [PATCH v10 38/40] kselftest/arm64: Add a GCS stress test

2024-08-08 Thread Mark Brown
On Thu, Aug 08, 2024 at 03:23:50AM -0300, Thiago Jung Bauermann wrote: > Thank you for the pointer. It turned out that I accidentally ran the > selftests binaries from the v9 version instead of the v10 version, and > the gcs-stress-thread binary failed because it was using the old value > for PR_S

[PATCH RFT v8 9/9] selftests/clone3: Test shadow stack support

2024-08-08 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. We check that a user specified shadow stack can be provided, and that invalid combinations of parameters are rejected. In order to facilita

[PATCH RFT v8 8/9] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code

2024-08-08 Thread Mark Brown
The clone_args structure is extensible, with the syscall passing in the length of the structure. Inside the kernel we use copy_struct_from_user() to read the struct but this has the unfortunate side effect of silently accepting some overrun in the structure size providing the extra data is all zero

[PATCH RFT v8 7/9] selftests/clone3: Explicitly handle child exits due to signals

2024-08-08 Thread Mark Brown
In order to improve diagnostics and allow tests to explicitly look for signals check to see if the child exited due to a signal and if it did print the code and return it as a positive value, distinct from the negative errnos currently returned. Signed-off-by: Mark Brown --- tools/testing/selfte

[PATCH RFT v8 6/9] selftests/clone3: Factor more of main loop into test_clone3()

2024-08-08 Thread Mark Brown
In order to make it easier to add more configuration for the tests and more support for runtime detection of when tests can be run pass the structure describing the tests into test_clone3() rather than picking the arguments out of it and have that function do all the per-test work. No functional c

[PATCH RFT v8 5/9] selftests/clone3: Remove redundant flushes of output streams

2024-08-08 Thread Mark Brown
Since there were widespread issues with output not being flushed the kselftest framework was modified to explicitly set the output streams unbuffered in commit 58e2847ad2e6 ("selftests: line buffer test program's stdout") so there is no need to explicitly flush in the clone3 tests. Signed-off-by:

[PATCH RFT v8 4/9] fork: Add shadow stack support to clone3()

2024-08-08 Thread Mark Brown
Unlike with the normal stack there is no API for configuring the the shadow stack for a new thread, instead the kernel will dynamically allocate a new shadow stack with the same size as the normal stack. This appears to be due to the shadow stack series having been in development since before the m

[PATCH RFT v8 3/9] mm: Introduce ARCH_HAS_USER_SHADOW_STACK

2024-08-08 Thread Mark Brown
Since multiple architectures have support for shadow stacks and we need to select support for this feature in several places in the generic code provide a generic config option that the architectures can select. Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Deepak Gupt

[PATCH RFT v8 2/9] selftests: Provide helper header for shadow stack testing

2024-08-08 Thread Mark Brown
While almost all users of shadow stacks should be relying on the dynamic linker and libc to enable the feature there are several low level test programs where it is useful to enable without any libc support, allowing testing without full system enablement. This low level testing is helpful during b

[PATCH RFT v8 1/9] Documentation: userspace-api: Add shadow stack API documentation

2024-08-08 Thread Mark Brown
There are a number of architectures with shadow stack features which we are presenting to userspace with as consistent an API as we can (though there are some architecture specifics). Especially given that there are some important considerations for userspace code interacting directly with the feat

[PATCH RFT v8 0/9] fork: Support shadow stacks in clone3()

2024-08-08 Thread Mark Brown
The kernel has recently added support for shadow stacks, currently x86 only using their CET feature but both arm64 and RISC-V have equivalent features (GCS and Zicfiss respectively), I am actively working on GCS[1]. With shadow stacks the hardware maintains an additional stack containing only the

[PATCH bpf-next] selftests/bpf: Avoid subtraction after htons() in ipip tests

2024-08-08 Thread Asbjørn Sloth Tønnesen
On little-endian systems, doing subtraction after htons() leads to interesting results: Given: MAGIC_BYTES = 123 = 0x007B aka. in big endian: 0x7B00 = 31488 sizeof(struct iphdr) = 20 Before this patch: __bpf_constant_htons(MAGIC_BYTES) - sizeof(struct iphdr) = 0x7AEC 0x7AEC = htons(0xEC7A) =