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

2024-08-06 Thread Muhammad Usama Anjum
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 >> unsupported >> >>> architecture such as arm. Fix it by ignoring the error

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

2024-08-06 Thread Muhammad Usama Anjum
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 > unsupported > >> architecture such as arm. Fix it by ignoring the error from mkdir. >> >> mkdir: missing operand >> Try 'mkdir

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

2024-08-06 Thread Kees Cook
On Tue, Aug 06, 2024 at 04:10:02PM +0100, Mark Brown wrote: > On Mon, Aug 05, 2024 at 08:54:54PM -0700, Kees Cook wrote: > > This actually segfaults the parent: > > > # Running test 'Shadow stack with no token' > > # [5496] Trying clone3() with flags 0x100 (size 0) > > # I am the parent (549

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

2024-08-06 Thread Geliang Tang
On Tue, 2024-08-06 at 09:34 +0200, Nicolas Dichtel wrote: > Le 06/08/2024 à 06:20, Geliang Tang a écrit : > > From: Geliang Tang > > > > So many "Address not found" messages occur at the end of forwarding > > tests > > when using "ip address del" command for an invalid address: > > > > TEST: FDB

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

2024-08-06 Thread Geliang Tang
Hi Ido, Thanks for the review. 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 "Address not found" messages occur at the end of forwarding > > tests > > when using "ip address del" comm

Re: [RFC PATCH v1 0/4] Add support for the Bus Lock Threshold

2024-08-06 Thread Manali Shukla
On 7/30/2024 10:22 AM, Manali Shukla wrote: > On 7/9/2024 11:21 PM, Manali Shukla wrote: >> Malicious guests can cause bus locks to degrade the performance of a >> system. Non-WB (write-back) and misaligned locked RMW >> (read-modify-write) instructions are referred to as "bus locks" and >> require

Re: [PATCH net-next v2 6/7] selftests/net: Synchronize client/server before counters checks

2024-08-06 Thread Dmitry Safonov
On Sun, 4 Aug 2024 at 10:47, Simon Horman wrote: > > On Fri, Aug 02, 2024 at 10:23:30AM +0100, Dmitry Safonov via B4 Relay wrote: > > From: Dmitry Safonov <0x7f454...@gmail.com> > > > > On tests that are expecting failure the timeout value is > > TEST_RETRANSMIT_SEC == 1 second. Which is big enoug

[PATCH v9 13/13] selftests: riscv: Support xtheadvector in vector tests

2024-08-06 Thread Charlie Jenkins
Extend existing vector tests to be compatible with the xtheadvector instructions. Signed-off-by: Charlie Jenkins --- .../selftests/riscv/vector/v_exec_initval_nolibc.c | 23 -- tools/testing/selftests/riscv/vector/v_helpers.c | 17 - tools/testing/selftests/riscv/vector/v_helpers.h |

[PATCH v9 12/13] selftests: riscv: Fix vector tests

2024-08-06 Thread Charlie Jenkins
Overhaul the riscv vector tests to use kselftest_harness to help the test cases correctly report the results and decouple the individual test cases from each other. With this refactoring, only run the test cases if vector is reported and properly report the test case as skipped otherwise. The v_ini

[PATCH v9 11/13] riscv: hwprobe: Document thead vendor extensions and xtheadvector extension

2024-08-06 Thread Charlie Jenkins
Document support for thead vendor extensions using the key RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 and xtheadvector extension using the key RISCV_HWPROBE_VENDOR_EXT_XTHEADVECTOR. Signed-off-by: Charlie Jenkins Reviewed-by: Evan Green --- Documentation/arch/riscv/hwprobe.rst | 10 ++ 1 file

[PATCH v9 10/13] riscv: hwprobe: Add thead vendor extension probing

2024-08-06 Thread Charlie Jenkins
Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR vendor extension. This new key will allow userspace code to probe for which thead vendor extensions are supported. This API is modeled to be consistent with RI

[PATCH v9 09/13] riscv: vector: Support xtheadvector save/restore

2024-08-06 Thread Charlie Jenkins
Use alternatives to add support for xtheadvector vector save/restore routines. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley --- arch/riscv/include/asm/csr.h | 6 + arch/riscv/include/asm/switch_to.h | 2 +- arch/riscv/include/asm/vector.h| 225 +

[PATCH v9 07/13] riscv: csr: Add CSR encodings for CSR_VXRM/CSR_VXSAT

2024-08-06 Thread Charlie Jenkins
The VXRM vector csr for xtheadvector has an encoding of 0xa and VXSAT has an encoding of 0x9. Co-developed-by: Heiko Stuebner Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/csr.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --

[PATCH v9 06/13] RISC-V: define the elements of the VCSR vector CSR

2024-08-06 Thread Charlie Jenkins
From: Heiko Stuebner The VCSR CSR contains two elements VXRM[2:1] and VXSAT[0]. Define constants for those to access the elements in a readable way. Acked-by: Guo Ren Reviewed-by: Conor Dooley Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/csr.h | 4

[PATCH v9 05/13] riscv: vector: Use vlenb from DT for thead

2024-08-06 Thread Charlie Jenkins
If thead,vlenb is provided in the device tree, prefer that over reading the vlenb csr. Signed-off-by: Charlie Jenkins Acked-by: Conor Dooley --- arch/riscv/Kconfig.vendor | 13 ++ arch/riscv/include/asm/cpufeature.h | 2 ++ arch/riscv/kernel/cpufeature.c | 48 +++

[PATCH v9 04/13] riscv: Add thead and xtheadvector as a vendor extension

2024-08-06 Thread Charlie Jenkins
Add support to the kernel for THead vendor extensions with the target of the new extension xtheadvector. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley --- arch/riscv/Kconfig.vendor| 13 + arch/riscv/include/asm/vendor_extensions/thead.h | 16 ++

[PATCH v9 03/13] riscv: dts: allwinner: Add xtheadvector to the D1/D1s devicetree

2024-08-06 Thread Charlie Jenkins
The D1/D1s SoCs support xtheadvector so it can be included in the devicetree. Also include vlenb for the cpu. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley --- arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/ris

[PATCH v9 02/13] dt-bindings: cpus: add a thead vlen register length property

2024-08-06 Thread Charlie Jenkins
Add a property analogous to the vlenb CSR so that software can detect the vector length of each CPU prior to it being brought online. Currently software has to assume that the vector length read from the boot CPU applies to all possible CPUs. On T-Head CPUs implementing pre-ratification vector, rea

[PATCH v9 01/13] dt-bindings: riscv: Add xtheadvector ISA extension description

2024-08-06 Thread Charlie Jenkins
The xtheadvector ISA extension is described on the T-Head extension spec Github page [1] at commit 95358cb2cca9. Link: https://github.com/T-head-Semi/thead-extension-spec/blob/95358cb2cca9489361c61d335e03d3134b14133f/xtheadvector.adoc [1] Signed-off-by: Charlie Jenkins Reviewed-by: Conor Doole

[PATCH v9 00/13] riscv: Add support for xtheadvector

2024-08-06 Thread Charlie Jenkins
xtheadvector is a custom extension that is based upon riscv vector version 0.7.1 [1]. All of the vector routines have been modified to support this alternative vector version based upon whether xtheadvector was determined to be supported at boot. vlenb is not supported on the existing xtheadvector

[PATCH net-next v2] selftests: net: py: support verbose printing, display executed commands

2024-08-06 Thread Mohsin Bashir
Add verbosity support to show the commands executed while running tests. Enable verbosity if either an environment variable 'VERBOSE' is set to a non-zero number or it is defined in a config file under driver tests as discussed here: https://github.com/linux-netdev/nipa/wiki/Running-driver-tests.

Re: [PATCH v7 2/2] mm, memcg: cg2 memory{.swap,}.peak write tests

2024-08-06 Thread Roman Gushchin
On Tue, Jul 30, 2024 at 07:13:04PM -0400, David Finkel wrote: > Extend two existing tests to cover extracting memory usage through the > newly mutable memory.peak and memory.swap.peak handlers. > > In particular, make sure to exercise adding and removing watchers with > overlapping lifetimes so th

Re: [PATCH v7 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread Roman Gushchin
On Tue, Jul 30, 2024 at 07:13:03PM -0400, David Finkel wrote: > Other mechanisms for querying the peak memory usage of either a process > or v1 memory cgroup allow for resetting the high watermark. Restore > parity with those mechanisms, but with a less racy API. > > For example: > - Any write to

Re: [PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread David Finkel
On Tue, Aug 6, 2024 at 6:36 PM Andrew Morton wrote: > > On Tue, 6 Aug 2024 10:18:47 -1000 Tejun Heo wrote: > > > On Tue, Aug 06, 2024 at 04:16:30PM -0400, David Finkel wrote: > > > On Tue, Jul 30, 2024 at 7:13 PM David Finkel wrote: > > > > > > > > This revision only updates the tests from the p

Re: [PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread Andrew Morton
On Tue, 6 Aug 2024 10:18:47 -1000 Tejun Heo wrote: > On Tue, Aug 06, 2024 at 04:16:30PM -0400, David Finkel wrote: > > On Tue, Jul 30, 2024 at 7:13 PM David Finkel wrote: > > > > > > This revision only updates the tests from the previous revision[1], and > > > integrates an Acked-by[2] and a Rev

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

2024-08-06 Thread Mark Brown
On Tue, Aug 06, 2024 at 10:57:39PM +0100, Mark Brown wrote: > On Tue, Aug 06, 2024 at 02:43:22PM -0700, Kees Cook wrote: > > "Shadow stack with no token" still crashes the parent. It seems to > > crash in waitpid(). Under gdb it hangs instead, showing it's in glibc's > > __GI___wait4(). Ah, it's c

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

2024-08-06 Thread Mark Brown
On Tue, Aug 06, 2024 at 02:43:22PM -0700, Kees Cook wrote: > On Tue, Aug 06, 2024 at 09:10:28PM +0100, Mark Brown wrote: > > Does this help: > > diff --git a/arch/x86/kernel/shstk.c b/arch/x86/kernel/shstk.c > > index 1755fa21e6fb..27acbdf44c5f 100644 > > --- a/arch/x86/kernel/shstk.c > > +++ b/a

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

2024-08-06 Thread Kees Cook
On Tue, Aug 06, 2024 at 09:10:28PM +0100, Mark Brown wrote: > On Mon, Aug 05, 2024 at 08:54:54PM -0700, Kees Cook wrote: > > > # Running test 'Shadow stack on system with shadow stack' > > # [5496] Trying clone3() with flags 0 (size 0) > > # I am the parent (5496). My child's pid is 5505 > >

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

2024-08-06 Thread Jakub Kicinski
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 the > + * page_pool. > + */ > +

Re: [PATCH net-next v18 04/14] netdev: netdevice devmem allocator

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:17 + Mina Almasry wrote: > +struct net_iov * > +net_devmem_alloc_dmabuf(struct net_devmem_dmabuf_binding *binding) > +{ > + struct dmabuf_genpool_chunk_owner *owner; > + unsigned long dma_addr; > + struct net_iov *niov; > + ssize_t offset; > + ssize

Re: [PATCH net-next v18 05/14] page_pool: move dmaddr helpers to .c file

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:18 + Mina Almasry wrote: > +dma_addr_t page_pool_get_dma_addr_netmem(netmem_ref netmem) > +{ > + struct page *page = netmem_to_page(netmem); > + > + dma_addr_t ret = page->dma_addr; > + > + if (PAGE_POOL_32BIT_ARCH_WITH_64BIT_DMA) > + ret <<= PA

Re: [PATCH net-next v18 03/14] netdev: support binding dma-buf to netdevice

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:16 + Mina Almasry wrote: > +/* Protected by rtnl_lock() */ > +static DEFINE_XARRAY_FLAGS(net_devmem_dmabuf_bindings, XA_FLAGS_ALLOC1); nit: global variable declarations before any code > +void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding) > +{ >

Re: [PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread David Finkel
On Tue, Aug 6, 2024 at 4:18 PM Tejun Heo wrote: > > On Tue, Aug 06, 2024 at 04:16:30PM -0400, David Finkel wrote: > > On Tue, Jul 30, 2024 at 7:13 PM David Finkel wrote: > > > > > > This revision only updates the tests from the previous revision[1], and > > > integrates an Acked-by[2] and a Revie

Re: [PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread Tejun Heo
On Tue, Aug 06, 2024 at 04:16:30PM -0400, David Finkel wrote: > On Tue, Jul 30, 2024 at 7:13 PM David Finkel wrote: > > > > This revision only updates the tests from the previous revision[1], and > > integrates an Acked-by[2] and a Reviewed-By[3] into the first commit > > message. > > > > > > Docu

Re: [PATCH v7] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-08-06 Thread David Finkel
On Tue, Jul 30, 2024 at 7:13 PM David Finkel wrote: > > This revision only updates the tests from the previous revision[1], and > integrates an Acked-by[2] and a Reviewed-By[3] into the first commit > message. > > > Documentation/admin-guide/cgroup-v2.rst | 22 ++- > include/linux/cgroup-

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

2024-08-06 Thread Mark Brown
On Mon, Aug 05, 2024 at 08:54:54PM -0700, Kees Cook wrote: > # Running test 'Shadow stack on system with shadow stack' > # [5496] Trying clone3() with flags 0 (size 0) > # I am the parent (5496). My child's pid is 5505 > # Child exited with signal 11 > # [5496] clone3() with flags says:

Re: [PATCH v2 0/2] selftests: harness: refactor __constructor_order

2024-08-06 Thread Shuah Khan
On 8/5/24 22:27, Kees Cook wrote: On Sat, Jul 27, 2024 at 11:37:35PM +0900, Masahiro Yamada wrote: This series refactors __constructor_order because __constructor_order_last() is unneeded. No code change since v1. I reworded "reverse-order" to "backward-order" in commit description. Masahiro

Re: [PATCH v3] lib: Convert test_user_copy to KUnit test

2024-08-06 Thread Kees Cook
On Tue, Aug 06, 2024 at 08:48:43AM -0700, Guenter Roeck wrote: > Hi, > > On Tue, Jul 21, 2020 at 02:46:54PM -0300, Vitor Massaru Iha wrote: > > This adds the conversion of the runtime tests of test_user_copy fuctions, > > from `lib/test_user_copy.c`to KUnit tests. > > > > Signed-off-by: Vitor Mas

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-06 Thread Jakub Sitnicki
On Tue, Aug 06, 2024 at 07:18 PM +02, Michal Luczaj wrote: > On 8/6/24 14:01, Jakub Sitnicki wrote: >> On Wed, Jul 31, 2024 at 12:01 PM +02, Michal Luczaj wrote: >>> Series takes care of few bugs and missing features with the aim to improve >>> the test coverage of sockmap/sockhash. >>> >>> Last pa

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

2024-08-06 Thread Nicolin Chen
On Tue, Aug 06, 2024 at 08:25:33AM +, 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 encapsulat

Re: [PATCH bpf-next 3/4] selftests/bpf: add proper section name to bpf prog and rename it

2024-08-06 Thread Alexis Lothoré
On 8/6/24 14:33, Alan Maguire wrote: > On 01/08/2024 11:00, Alexis Lothoré wrote: >> On 8/1/24 10:35, Alan Maguire wrote: >>> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: test_skb_cgroup_id_kern.c is currently involved in a manual test. In its current form, it can not be u

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-06 Thread Michal Luczaj
On 8/6/24 14:01, Jakub Sitnicki wrote: > On Wed, Jul 31, 2024 at 12:01 PM +02, Michal Luczaj wrote: >> Series takes care of few bugs and missing features with the aim to improve >> the test coverage of sockmap/sockhash. >> >> Last patch is a create_pair() rewrite making use of >> __attribute__((cle

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

2024-08-06 Thread Shuah Khan
On 8/6/24 06:10, Muhammad Usama Anjum wrote: The mkdir generates an error when kvm suite is build for non-supported built unsupported architecture such as arm. Fix it by ignoring the error from mkdir. mkdir: missing operand Try 'mkdir --help' for more information. Simply suppressing the me

Re: [PATCH v3] lib: Convert test_user_copy to KUnit test

2024-08-06 Thread Guenter Roeck
On Tue, Aug 06, 2024 at 08:48:45AM -0700, Guenter Roeck wrote: > Hi, > > On Tue, Jul 21, 2020 at 02:46:54PM -0300, Vitor Massaru Iha wrote: > > This adds the conversion of the runtime tests of test_user_copy fuctions, > > from `lib/test_user_copy.c`to KUnit tests. > > > > Signed-off-by: Vitor Mas

Re: [PATCH v3] lib: Convert test_user_copy to KUnit test

2024-08-06 Thread Guenter Roeck
Hi, On Tue, Jul 21, 2020 at 02:46:54PM -0300, Vitor Massaru Iha wrote: > This adds the conversion of the runtime tests of test_user_copy fuctions, > from `lib/test_user_copy.c`to KUnit tests. > > Signed-off-by: Vitor Massaru Iha These tests are failing (at least) for arm-v7, loongarch, and mips

[PATCH net-next v2 3/3] selftests: rds: add testing infrastructure

2024-08-06 Thread allison . henderson
From: Vegard Nossum This adds some basic self-testing infrastructure for RDS-TCP. Signed-off-by: Vegard Nossum Signed-off-by: Chuck Lever Signed-off-by: Allison Henderson --- Documentation/dev-tools/gcov.rst | 11 + MAINTAINERS| 1 + tools/testing

[PATCH net-next v2 2/3] net: rds: add option for GCOV profiling

2024-08-06 Thread allison . henderson
From: Vegard Nossum To better our unit tests we need code coverage to be part of the kernel. This patch borrows heavily from how CONFIG_GCOV_PROFILE_FTRACE is implemented Reviewed-by: Chuck Lever Signed-off-by: Vegard Nossum Signed-off-by: Allison Henderson --- net/rds/Kconfig | 9 +

[PATCH net-next v2 0/3] selftests: rds selftest

2024-08-06 Thread allison . henderson
From: Allison Henderson Hi All, This series is a new selftest that Vegard, Chuck and myself have been working on to provide some test coverage for rds. I've modified the scripts to include the feedback from the last version, but let me know if there's anything missed. Questions and comments ap

[PATCH net-next v2 1/3] .gitignore: add .gcda files

2024-08-06 Thread allison . henderson
From: Vegard Nossum These files contain the runtime coverage data generated by gcov. Signed-off-by: Vegard Nossum Signed-off-by: Chuck Lever Signed-off-by: Allison Henderson --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7902adf4f7f1..38b7ab9

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

2024-08-06 Thread Mark Brown
On Mon, Aug 05, 2024 at 08:54:54PM -0700, Kees Cook wrote: > On Wed, Jul 31, 2024 at 01:14:15PM +0100, Mark Brown wrote: > > + case CLONE3_ARGS_SHADOW_STACK: > > + /* We need to specify a normal stack too to avoid corruption */ > > + args.shadow_stack = > > get_shadow_stack_

Re: [PATCH v4 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-08-06 Thread Christoph Schlameuss
On Tue, 6 Aug 2024 15:13:34 +0200 Janosch Frank wrote: > On 8/2/24 5:59 PM, Christoph Schlameuss wrote: > > Add a test case verifying basic running and interaction of ucontrol VMs. > > Fill the segment and page tables for allocated memory and map memory on > > first access. > > > > * uc_map_unma

[PATCH v2 3/3] KVM: selftests: arm64: Use generated defines for named system registers

2024-08-06 Thread Mark Brown
Currently the get-reg-list test uses directly specified numeric values to define system registers to validate. Since we already have a macro which allows us to use the generated system register definitions from the main kernel easily let's update all the registers where we have specified the name i

[PATCH v2 2/3] KVM: selftests: arm64: Use symbolic definitions for incorrect encodings

2024-08-06 Thread Mark Brown
Unfortunately incorrect encodings for CNTV_CTL_EL0 and CNTV_CVAL_EL0 made their way into the KVM ABI, the encodings were swapped. The UAPI provides custom KVM sysreg definitions with the incorrect encodings so let's update get-reg-list to use them. Also add a comment explaining the situation to hel

[PATCH v2 1/3] KVM: selftests: arm64: Simplify specification of filtered registers

2024-08-06 Thread Mark Brown
Since we already import the generated sysreg definitions from the main kernel and reference them in processor.h for use in other KVM tests we can also make use of them for get-reg-list as well instead of having hard coded magic numbers in the program. Do this for the table defining which registers

[PATCH v2 0/3] KVM: selftests: arm64: Make use of sysreg defintions in get-reg-list

2024-08-06 Thread Mark Brown
The system register definitions in the arm64 get-reg-list are all done with directly specified magic numbers rather than using the definitions we import from the main kernel. This is error prone, and requires us to audit the additions to get-reg-list separately to what we do when specifying the re

Re: [PATCH v3 4/4] selftests: ALSA: Cover userspace-driven timers with test

2024-08-06 Thread Ivan Orlov
On 8/6/24 14:04, Mark Brown wrote: On Tue, Aug 06, 2024 at 01:52:43PM +0100, Ivan Orlov wrote: -TEST_GEN_PROGS := mixer-test pcm-test test-pcmtest-driver +TEST_GEN_PROGS := mixer-test pcm-test utimer-test test-pcmtest-driver global-timer This is adding the timer timer tests as standard kself

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

2024-08-06 Thread Ivan Orlov
On 8/6/24 14:11, Jaroslav Kysela wrote: On 06. 08. 24 14:52, Ivan Orlov wrote: Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. ... Hi Jaroslav, +struct snd_utimer_info { +    /* + * To pretend being a normal timer, we need to know the frame rate an

Re: [PATCH v4 08/10] selftests: kvm: s390: Add uc_skey VM test case

2024-08-06 Thread Janosch Frank
On 8/2/24 5:59 PM, Christoph Schlameuss wrote: Add a test case manipulating s390 storage keys from within the ucontrol VM. Signed-off-by: Christoph Schlameuss --- .../selftests/kvm/s390x/ucontrol_test.c | 78 +++ 1 file changed, 78 insertions(+) [...] +TEST_F(uc_kv

Re: [PATCH v4 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-08-06 Thread Janosch Frank
On 8/2/24 5:59 PM, Christoph Schlameuss wrote: Add a test case verifying basic running and interaction of ucontrol VMs. Fill the segment and page tables for allocated memory and map memory on first access. * uc_map_unmap Store and load data to mapped and unmapped memory and use pic segment

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

2024-08-06 Thread Jaroslav Kysela
On 06. 08. 24 14:52, Ivan Orlov wrote: Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. ... +struct snd_utimer_info { + /* +* To pretend being a normal timer, we need to know the frame rate and +* the period size in frames. +*/

Re: [PATCH v3 4/4] selftests: ALSA: Cover userspace-driven timers with test

2024-08-06 Thread Mark Brown
On Tue, Aug 06, 2024 at 01:52:43PM +0100, Ivan Orlov wrote: > -TEST_GEN_PROGS := mixer-test pcm-test test-pcmtest-driver > +TEST_GEN_PROGS := mixer-test pcm-test utimer-test test-pcmtest-driver > global-timer This is adding the timer timer tests as standard kselftests to be run by the wrapper sc

Re: [PATCH v4 06/10] selftests: kvm: s390: Add VM run test case

2024-08-06 Thread Janosch Frank
On 8/2/24 5:59 PM, Christoph Schlameuss wrote: Add test case running code interacting with registers within a ucontrol VM. * Add uc_gprs test case The test uses the same VM setup using the fixture and debug macros introduced in earlier patches in this series. Signed-off-by: Christoph Schlameus

[PATCH v3 4/4] selftests: ALSA: Cover userspace-driven timers with test

2024-08-06 Thread Ivan Orlov
Add a test for the new functionality of userspace-driven timers and the tool which allows us to count timer ticks in a certain time period. The test: 1. Creates a userspace-driven timer with ioctl to /dev/snd/timer 2. Starts the `global-timer` application to count the ticks of the timer from step

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

2024-08-06 Thread Ivan Orlov
Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IOCTL_CREATE, which gets the snd_utimer_info struct as a parameter and returns a file descriptor of a virtual timer. It also updates the `id` field of the snd_utimer_info struct, whic

[PATCH v3 2/4] Docs/sound: Add documentation for userspace-driven ALSA timers

2024-08-06 Thread Ivan Orlov
Add the documentation which describes the new userspace-driven timers API introduced in this patch series. The documentation contains: - Description of userspace-driven ALSA timers, what they are for - Description of the timers API - Example of how the timers can be created and triggered - How the

[PATCH v3 1/4] ALSA: aloop: Allow using global timers

2024-08-06 Thread Ivan Orlov
Allow using global timers as a timer source when card id is equal to -1 in the timer_source parameter. Signed-off-by: Ivan Orlov --- V1 -> V2: - No changes V2 -> V3: - No changes sound/drivers/aloop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/drivers/aloop.c b/sound/drivers/al

[PATCH v3 0/4] Introduce userspace-driven ALSA timers

2024-08-06 Thread Ivan Orlov
There are multiple possible timer sources which could be useful for the sound stream synchronization: hrtimers, hardware clocks (e.g. PTP), timer wheels (jiffies). Currently, using one of them to synchronize the audio stream of snd-aloop module would require writing a kernel-space driver which expo

Re: [PATCH net-next v17 03/14] netdev: support binding dma-buf to netdevice

2024-08-06 Thread Willem de Bruijn
Markus Elfring wrote: > >> … > >>> +++ b/include/net/devmem.h > >>> @@ -0,0 +1,115 @@ > >> … > >>> +#ifndef _NET_DEVMEM_H > >>> +#define _NET_DEVMEM_H > >> … > >> > >> I suggest to omit leading underscores from such identifiers. > >> https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+dec

Re: [PATCH bpf-next 2/4] selftests/bpf: convert test_cgroup_storage to test_progs

2024-08-06 Thread Alan Maguire
On 01/08/2024 10:21, Alexis Lothoré wrote: > On 8/1/24 10:27, Alan Maguire wrote: >> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: >>> test_cgroup_storage is currently a standalone program which is not run >>> when executing test_progs. >>> >>> Convert it to the test_progs framework

Re: [PATCH bpf-next 3/4] selftests/bpf: add proper section name to bpf prog and rename it

2024-08-06 Thread Alan Maguire
On 01/08/2024 11:00, Alexis Lothoré wrote: > On 8/1/24 10:35, Alan Maguire wrote: >> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: >>> test_skb_cgroup_id_kern.c is currently involved in a manual test. In its >>> current form, it can not be used with the auto-generated skeleton APIs,

Re: [PATCH bpf-next 4/4] selftests/bpf: convert test_skb_cgroup_id_user to test_progs

2024-08-06 Thread Alan Maguire
On 01/08/2024 11:12, Alexis Lothoré wrote: > On 8/1/24 10:49, Alan Maguire wrote: >> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: > > [...] > >>> +static int wait_local_ip(void) >>> +{ >>> + char *ping_cmd = ping_command(AF_INET6); >>> + int i, err; >>> + >>> + for (i = 0; i

[PATCH v3] kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3

2024-08-06 Thread Alessandro Zanni
Insert raw strings to prevent Python3 from interpreting string literals as Unicode strings and "\d" as invalid escaped sequence. Fix the warnings: tools/testing/selftests/devices/probe/test_discoverable_devices.py:48: SyntaxWarning: invalid escape sequence '\d' usb_controller_sysfs_dir = "usb[\d]

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

2024-08-06 Thread Muhammad Usama Anjum
The mkdir generates an error when kvm suite is build for non-supported architecture such as arm. Fix it by ignoring the error from mkdir. mkdir: missing operand Try 'mkdir --help' for more information. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file c

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-06 Thread Jakub Sitnicki
On Wed, Jul 31, 2024 at 12:01 PM +02, Michal Luczaj wrote: > Series takes care of few bugs and missing features with the aim to improve > the test coverage of sockmap/sockhash. > > Last patch is a create_pair() rewrite making use of > __attribute__((cleanup)) to handle socket fd lifetime. > > Signe

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

2024-08-06 Thread Tian, Kevin
> 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 the legacy-VFIO-style case

[PATCH] selftest/perf: Add perf-test to perform perf testcase

2024-08-06 Thread Jeremy Szu
The perf test supports testing many functions and includes a way to detect the prerequisites for each test case. Add a script to launch the perf test. Signed-off-by: Jeremy Szu --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/perf/Makefile | 5 tools/testin

Re: [PATCH 2/2] KVM: selftests: arm64: Use generated defines for named system registers

2024-08-06 Thread Andrew Jones
On Fri, Aug 02, 2024 at 10:57:54PM GMT, Mark Brown wrote: > Currently the get-reg-list test uses directly specified numeric values to > define system registers to validate. Since we already have a macro which > allows us to use the generated system register definitions from the main > kernel easily

[PATCH bpf-next v2 4/4] selftests/bpf: convert test_skb_cgroup_id_user to test_progs

2024-08-06 Thread eBPF Foundation
test_skb_cgroup_id_user allows testing skb cgroup id retrieval at different levels, but is not integrated in test_progs, so it is not run automatically in CI. The test overlaps a bit with cgroup_skb_sk_lookup_kern, which is integrated in test_progs and test extensively skb cgroup helpers, but there

[PATCH bpf-next v2 3/4] selftests/bpf: add proper section name to bpf prog and rename it

2024-08-06 Thread eBPF Foundation
test_skb_cgroup_id_kern.c is currently involved in a manual test. In its current form, it can not be used with the auto-generated skeleton APIs, because the section name is not valid to allow libbpf to deduce the program type. Update section name to allow skeleton APIs usage. Also rename the progr

[PATCH bpf-next v2 2/4] selftests/bpf: convert test_cgroup_storage to test_progs

2024-08-06 Thread eBPF Foundation
test_cgroup_storage is currently a standalone program which is not run when executing test_progs. Convert it to the test_progs framework so it can be automatically executed in CI. The conversion led to the following changes: - converted the raw bpf program in the userspace test file into a dedicat

[PATCH bpf-next v2 1/4] selftests/bpf: convert get_current_cgroup_id_user to test_progs

2024-08-06 Thread eBPF Foundation
get_current_cgroup_id_user allows testing for bpf_get_current_cgroup_id() bpf API but is not integrated into test_progs, and so is not tested automatically in CI. Convert it to the test_progs framework to allow running it automatically. The most notable differences with the old test are the follow

[PATCH bpf-next v2 0/4] selftests/bpf: convert three other cgroup tests to test_progs

2024-08-06 Thread eBPF Foundation
Hello, this series brings a new set of test converted to the test_progs framework. Since the tests are quite small, I chose to group three tests conversion in the same series, but feel free to let me know if I should keep one series per test. The series focuses on cgroup testing and converts the fo

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

2024-08-06 Thread Ido Schimmel
On Tue, Aug 06, 2024 at 12:20:38PM +0800, Geliang Tang wrote: > From: Geliang Tang > > So many "Address not found" messages occur at the end of forwarding tests > when using "ip address del" command for an invalid address: Can you give an example of an invalid address that triggers this message?

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

2024-08-06 Thread Nicolas Dichtel
Le 06/08/2024 à 06:20, Geliang Tang a écrit : > From: Geliang Tang > > So many "Address not found" messages occur at the end of forwarding tests > when using "ip address del" command for an invalid address: > > TEST: FDB limits interacting with FDB type local[ OK ] > Error: i

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

2024-08-06 Thread Christophe Leroy
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 exec_target /usr/bin/ld: cannot find -lc: No

Re: [PATCH net-next v17 03/14] netdev: support binding dma-buf to netdevice

2024-08-06 Thread Markus Elfring
>> … >>> +++ b/include/net/devmem.h >>> @@ -0,0 +1,115 @@ >> … >>> +#ifndef _NET_DEVMEM_H >>> +#define _NET_DEVMEM_H >> … >> >> I suggest to omit leading underscores from such identifiers. >> https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier >> >