[PATCH v5 3/3] rseq/selftests: Add test for mm_cid compaction

2025-02-09 Thread Gabriele Monaco
A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, runs in short bursts for some time. During thi

Re: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-09 Thread Geert Uytterhoeven
Hi Yuri, On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > > On 7/27/24 12:35 AM, Shuah Khan wrote: > > > Please make sure you aren't taking away the ability to run these tests > > > during > > > boot. > > > > > > It doesn't make

Re: [PATCH 2/3] bitmap: convert self-test to KUnit

2025-02-09 Thread Geert Uytterhoeven
On Fri, 7 Feb 2025 at 21:14, Tamir Duberstein wrote: > Convert the bitmap() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. > > Signed-off-by: Tamir Duberstein >

Re: [RFC PATCH v2 4/4] KVM: arm64: Make guests see only counters they can access

2025-02-09 Thread Oliver Upton
On Sat, Feb 08, 2025 at 02:01:11AM +, Colton Lewis wrote: > The ARM architecture specifies that when MDCR_EL2.HPMN is set, EL1 and > EL0, which includes KVM guests, should read that value for PMCR.N. > > Signed-off-by: Colton Lewis > --- > arch/arm64/kvm/debug.c

Re: [RFC PATCH v2 2/4] perf: arm_pmuv3: Introduce module param to partition the PMU

2025-02-09 Thread Oliver Upton
Hi Colton, On Sat, Feb 08, 2025 at 02:01:09AM +, Colton Lewis wrote: > For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters > into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if > allowed, EL0 while counters HPMN..N are only accessible by EL2. > > Introduce a

[PATCH v3 bpf 2/2] selftests: bpf: test batch lookup on array of maps with holes

2025-02-09 Thread Yan Zhai
Iterating through array of maps may encounter non existing keys. The batch operation should not fail on when this happens. Signed-off-by: Yan Zhai Acked-by: Hou Tao --- .../bpf/map_tests/map_in_map_batch_ops.c | 62 +-- 1 file changed, 44 insertions(+), 18 deletions(-) dif

[PATCH v3 bpf 1/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-09 Thread Yan Zhai
The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a k

[PATCH v3 bpf 0/2] bpf: skip non exist keys in generic_map_lookup_batch

2025-02-09 Thread Yan Zhai
The generic_map_lookup_batch currently returns EINTR if it fails with ENOENT and retries several times on bpf_map_copy_value. The next batch would start from the same location, presuming it's a transient issue. This is incorrect if a map can actually have "holes", i.e. "get_next_key" can return a k

Re: [PATCH v2 0/2] tools/nolibc: add support for [v]sscanf()

2025-02-09 Thread Willy Tarreau
On Sun, Feb 09, 2025 at 09:27:11PM +0100, Thomas Weißschuh wrote: > The implementation is limited and only supports numeric arguments. > > Signed-off-by: Thomas Weißschuh > --- > Changes in v2: > - Return __LINE__ from different testcases to directly point to the > failed testcase > - Add some

Re: [PATCH 3/3] bitmap: break kunit into test cases

2025-02-09 Thread Muhammad Usama Anjum
On 2/8/25 1:14 AM, Tamir Duberstein wrote: > Move some tests into `bitmap_test_cases` and parameterize > `test_bitmap_print_buf`. This gives us nicer output in the event of a > failure. > > Signed-off-by: Tamir Duberstein Reviewed-by: Muhammad Usama Anjum > --- > lib/bitmap_kunit.c | 182 > ++

Re: [PATCH 2/3] bitmap: convert self-test to KUnit

2025-02-09 Thread Muhammad Usama Anjum
On 2/8/25 1:14 AM, Tamir Duberstein wrote: > Convert the bitmap() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > refactor the tests into proper parameterized tests - it's all one big > test case. > > Signed-off-by: Tamir Duberstein Thanks for

Re: [PATCH 1/3] bitmap: remove _check_eq_u32_array

2025-02-09 Thread Muhammad Usama Anjum
On 2/8/25 1:14 AM, Tamir Duberstein wrote: > This has been unused since commit 3aa56885e516 ("bitmap: replace > bitmap_{from,to}_u32array") in 2018. Remove it to avoid the need to port > it to KUnit in this series. > > Signed-off-by: Tamir Duberstein Reviewed-by: Muhammad Usama Anjum > --- > l

[PATCH] selftests: proofreading bpf module

2025-02-09 Thread Armin
Fixed multiple spelling issues in the kselftests bpf modules. Signed-off-by: Armin --- tools/testing/selftests/bpf/Makefile| 2 +- tools/testing/selftests/bpf/bench.c | 2 +- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +- tools

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-09 Thread Yafang Shao
On Sat, Feb 8, 2025 at 10:49 AM Yafang Shao wrote: > > On Fri, Feb 7, 2025 at 7:01 PM Petr Mladek wrote: > > > > On Wed 2025-02-05 14:16:42, Yafang Shao wrote: > > > On Tue, Feb 4, 2025 at 9:05 PM Petr Mladek wrote: > > > > > > > > On Mon 2025-02-03 17:44:52, Yafang Shao wrote: > > > > > On Fri,

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-02-09 Thread Yafang Shao
On Sun, Feb 9, 2025 at 11:57 AM Alexei Starovoitov wrote: > > On Sat, Feb 8, 2025 at 11:32 AM Josh Poimboeuf wrote: > > > > On Sat, Feb 08, 2025 at 07:47:12AM -0800, Alexei Starovoitov wrote: > > > On Fri, Feb 7, 2025 at 10:42 PM Yafang Shao wrote: > > > > > > > > On Fri, Feb 7, 2025 at 2:01 AM

Re: [PATCH 0/6] KUnit test moves / renames

2025-02-09 Thread Stephen Rothwell
Hi all, On Mon, 10 Feb 2025 04:43:28 +0530 Shuah Khan wrote: > > On Sun, Feb 9, 2025, 2:44 AM Kees Cook wrote: > > > On Fri, Oct 11, 2024 at 07:53:43AM -0600, Shuah Khan wrote: > > > On 10/11/24 01:25, David Gow wrote: > > > > As discussed in [1], the KUnit test naming scheme has changed to

[PATCH v3 1/2] dt-bindings: media: i2c: Add DW9719 and DW9761 VCM

2025-02-09 Thread André Apitzsch via B4 Relay
From: André Apitzsch Document Dongwoon DW9719 and DW9761 VCM devicetree bindings. Signed-off-by: André Apitzsch --- .../bindings/media/i2c/dongwoon,dw9719.yaml| 45 ++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoo

[PATCH v3 2/2] media: i2c: dw9719: Add of_match table

2025-02-09 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761" compatible string. This fixes automatic driver loading when using a device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch --- drivers/media/i2c/dw9719.c | 8

[PATCH v3 0/2] media: i2c: dw9719: Add device tree bindings for the VCM

2025-02-09 Thread André Apitzsch via B4 Relay
Document the Dongwoon DW9719 and DW9761 dt-bindings and add the related of_match table. Signed-off-by: André Apitzsch --- Changes in v3: - Add patch to document devicetree bindings - Add "i2c:" to the subject of the 'Add of_match table' commit message - Link to v2: https://lore.kernel.org/r/2025

Re: [PATCH v2] media: dw9719: Add of_match table

2025-02-09 Thread André Apitzsch
Hi, Am Sonntag, dem 09.02.2025 um 14:20 + schrieb Sakari Ailus: > Hi André, > > On Sat, Feb 08, 2025 at 12:13:49PM +0100, André Apitzsch via B4 Relay > wrote: > > From: André Apitzsch > > > > Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761" > > compatible string. This fixes au

[PATCH v2 1/2] tools/nolibc: add support for [v]sscanf()

2025-02-09 Thread Thomas Weißschuh
These functions are used often, also in selftests. sscanf() itself is also used by kselftest.h itself. The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdio.h | 98 tools/tes

[PATCH v2 0/2] tools/nolibc: add support for [v]sscanf()

2025-02-09 Thread Thomas Weißschuh
The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Return __LINE__ from different testcases to directly point to the failed testcase - Add some comments - Expand commit message - Link to v1: https://lore.kernel.org/r/20240731

[PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC"

2025-02-09 Thread Thomas Weißschuh
This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40. Nolibc gained support for uname(2) and sscanf(3) which are the dependencies of ksft_min_kernel_version(). So re-enable support for ksft_min_kernel_version() under nolibc. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/k

Re: [PATCH v1 08/13] iommufd/device: Move sw_msi_start from igroup to idev

2025-02-09 Thread Jason Gunthorpe
On Sat, Feb 08, 2025 at 01:02:41AM -0800, Nicolin Chen wrote: > @@ -433,8 +433,8 @@ static int iommufd_group_setup_msi(struct iommufd_group > *igroup, > list_for_each_entry(cur, &ictx->sw_msi_list, sw_msi_item) { > int rc; > > - if (cur->sw_msi_start != igroup->sw

Re: [PATCH RFCv2 09/13] iommufd: Add IOMMU_OPTION_SW_MSI_START/SIZE ioctls

2025-02-09 Thread Jason Gunthorpe
On Fri, Feb 07, 2025 at 10:59:48AM -0800, Nicolin Chen wrote: > On Fri, Feb 07, 2025 at 11:28:01AM -0400, Jason Gunthorpe wrote: > > On Fri, Feb 07, 2025 at 10:30:20AM -0400, Jason Gunthorpe wrote: > > > On Thu, Feb 06, 2025 at 08:26:05PM -0800, Nicolin Chen wrote: > > > > Yea, I found iopt_reserve

Re: [PATCH v2 0/2] tools/nolibc: add support for directory access

2025-02-09 Thread Willy Tarreau
On Sun, Feb 09, 2025 at 02:25:44PM +0100, Thomas Weißschuh wrote: > Add support opendir(), readdir_r(), closedir() and friends. > > Signed-off-by: Thomas Weißschuh > --- > Changes in v2: > - Move definitions to dirent.h > - Reserve space for the trailing NULL byte of d_name > - Implement readdir_

Re: [PATCH v5 6/8] iio: light: stk3310: use dev_err_probe where possible

2025-02-09 Thread Andy Shevchenko
On Sat, Feb 08, 2025 at 04:13:24PM -0500, Aren Moynihan wrote: > Using dev_err_probe instead of dev_err and return makes the errors Use dev_err_probe() dev_err() > easier to understand by including the error name, and saves a little > code. I believe this patch will make more sense before switch

Re: [PATCH v2] media: dw9719: Add of_match table

2025-02-09 Thread Sakari Ailus
Hi André, On Sat, Feb 08, 2025 at 12:13:49PM +0100, André Apitzsch via B4 Relay wrote: > From: André Apitzsch > > Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761" > compatible string. This fixes automatic driver loading when using a > device-tree, and if built as a module like majo

[PATCH v2 0/2] tools/nolibc: add support for directory access

2025-02-09 Thread Thomas Weißschuh
Add support opendir(), readdir_r(), closedir() and friends. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Move definitions to dirent.h - Reserve space for the trailing NULL byte of d_name - Implement readdir_r() instead of readdir() - Expand commit message - Link to v1: https://lore.kerne

[PATCH v2 2/2] tools/nolibc: add support for directory access

2025-02-09 Thread Thomas Weißschuh
From: Thomas Weißschuh Add an implementation for directory access operations. To keep nolibc itself allocation-free, a "DIR *" does not point to any data, but directly encodes a filedescriptor number, equivalent to "FILE *". Without any per-directory storage it is not possible to implement readdi

[PATCH v2 1/2] tools/nolibc: add support for sys_llseek()

2025-02-09 Thread Thomas Weißschuh
From: Thomas Weißschuh Not all architectures have the old sys_lseek(), notably riscv32. Implement lseek() in terms of sys_llseek() in that case. Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/sys.h | 29 - 1 file changed, 2