[PATCH] selftest/mm: Skip if fallocate() is unsupported in gup_longterm

2025-06-13 Thread Mark Brown
skip instead for that case. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/gup_longterm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 8a97ac5176a4..0e99494268ed

Re: [PATCH 2/4] selftests/mm: Convert some cow error reports to ksft_perror()

2025-06-11 Thread Mark Brown
On Wed, Jun 11, 2025 at 02:10:20PM +0200, David Hildenbrand wrote: > On 10.06.25 16:13, Mark Brown wrote: > > This prints the errno and a string decode of it. > > > > Reported-by: David Hildenbrand > > Probably not "Reported-by". Did you mean "Suggest

Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t

2025-06-11 Thread Mark Rutland
arm64/kernel/debug-monitors.c is full of 32bit manipulation of > > this register, and that's only one example of it. So if you are going > > to change this, please do it fully, not as a random change in a random > > file. > > The first patch in this series changes mdscr system register to 64 bit > in the mentioned file (i.e arch/arm64/kernel/debug-monitors.c). You did not Cc Marc on oatch 1 or the cover letter. KVM folk are only Cc'd on patch 2. Marc, for context the series is: https://lore.kernel.org/linux-arm-kernel/20250610053128.4118784-1-anshuman.khand...@arm.com/ ... and I've asked Anshuman to better describe the rationale. Mark.

[PATCH 0/4] selftests/mm: Tweaks to the cow test

2025-06-10 Thread Mark Brown
A collection of non-functional updates from David Hildenbrand's review. Signed-off-by: Mark Brown --- Mark Brown (4): kselftest/mm: Clarify errors for pipe() selftests/mm: Convert some cow error reports to ksft_perror() selftests/mm: Don't compare return values

[PATCH 2/4] selftests/mm: Convert some cow error reports to ksft_perror()

2025-06-10 Thread Mark Brown
This prints the errno and a string decode of it. Reported-by: David Hildenbrand Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index

[PATCH 3/4] selftests/mm: Don't compare return values to in cow

2025-06-10 Thread Mark Brown
Tweak the coding style for checking for non-zero return values. While we're at it also remove a now redundant oring of the madvise() return code. Suggested-by: David Hildenbrand Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 6 +++--- 1 file changed, 3 insertions(

[PATCH 4/4] selftests/mm: Add messages about test errors to the cow tests

2025-06-10 Thread Mark Brown
It is not sufficiently clear what the individual tests in the cow test program are checking so add messages for the failure cases. Suggested-by: David Hildenbrand Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 28 1 file changed, 20 insertions

[PATCH 1/4] kselftest/mm: Clarify errors for pipe()

2025-06-10 Thread Mark Brown
Specify that errors reported from pipe() failures are the result of failures. Suggested-by: David Hildenbrand Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing

[PATCH] selftests/mm: Check for YAMA ptrace_scope configuraiton before modifying it

2025-06-10 Thread Mark Brown
ctory # # -- # # running ./memfd_secret # # -- Check that this file is present before trying to write to it. The indentation here is a bit odd, and it doesn't seem great that we configure but don't restore ptrace_scope. Signed-off-by: Mark Brown --- tools/testi

[PATCH v2 0/4] kselftest/arm64: Add coverage for the interaction of vfork() and GCS

2025-06-10 Thread Mark Brown
I had cause to look at the vfork() support for GCS and realised that we don't have any direct test coverage, this series does so by adding vfork() to nolibc and then using that in basic-gcs to provide some simple vfork() coverage. Signed-off-by: Mark Brown --- Changes in v2: - Add replaceme

[PATCH v2 4/4] selftests/nolibc: Add coverage of vfork()

2025-06-10 Thread Mark Brown
Generalise the existing fork() test to also cover the newly added vfork() implementation. Signed-off-by: Mark Brown --- tools/testing/selftests/nolibc/nolibc-test.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc

[PATCH v2 2/4] tools/nolibc: Provide vfork()

2025-06-10 Thread Mark Brown
: Mark Brown --- tools/include/nolibc/sys.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index aabac97a7fb0..5932ae8828a1 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -22,6 +22,7

[PATCH v2 1/4] tools/nolibc: Replace ifdef with if defined() in sys.h

2025-06-10 Thread Mark Brown
Thomas has requested that if defined() be used in place of ifdef but currently ifdef is used consistently in sys.h. Update all the instances of ifdef to if defined(). Suggested-by: Thomas Weißschuh Signed-off-by: Mark Brown --- tools/include/nolibc/sys.h | 30 +++--- 1

[PATCH v2 3/4] kselftest/arm64: Add a test for vfork() with GCS

2025-06-10 Thread Mark Brown
Ensure that we've got at least some coverage of the special cases around vfork() by adding a test case in basic-gcs doing the same thing as the plain fork() one - vfork(), do a few checks and then return to the parent. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/gcs/basic-

Re: (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone

2025-06-09 Thread Mark Brown
rrent git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark

Re: (subset) [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone

2025-06-09 Thread Mark Brown
rrent git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark

Re: [PATCH 1/2] tools/nolibc: Provide vfork()

2025-06-09 Thread Mark Brown
On Mon, Jun 09, 2025 at 05:51:19PM +0200, Thomas Weißschuh wrote: > On 2025-06-09 16:43:55+0100, Mark Brown wrote: > > On Mon, Jun 09, 2025 at 05:34:33PM +0200, Thomas Weißschuh wrote: > > > For consistency: > > > #if defined(__NR_vfork) > > Are you sure?

Re: [PATCH 1/2] tools/nolibc: Provide vfork()

2025-06-09 Thread Mark Brown
On Mon, Jun 09, 2025 at 05:34:33PM +0200, Thomas Weißschuh wrote: > On 2025-06-09 16:08:56+0100, Mark Brown wrote: > > +#ifndef sys_vfork > This ifndef is not necessary here. > No architecture has a special version. Ah, I was adding it defensively in case it was needed in futur

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

2025-06-09 Thread Mark Brown
Khrustalev Signed-off-by: Mark Brown --- arch/arm64/mm/gcs.c | 53 +- arch/x86/include/asm/shstk.h | 11 +++-- arch/x86/kernel/process.c| 2 +- arch/x86/kernel/shstk.c | 57 +--- include/asm-generic/cacheflush.h | 11

[PATCH v2 3/3] kselftest/arm64: Specify SVE data when testing VL set in sve-ptrace

2025-06-09 Thread Mark Brown
ously fail. Set the flag to avoid the issue, we still support not supplying register data. Acked-by: Mark Rutland Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-p

[PATCH v2 2/3] kselftest/arm64: Fix test for streaming FPSIMD write in sve-ptrace

2025-06-09 Thread Mark Brown
he test to expect a failure when writing FPSIMD data to the streaming mode register set. Acked-by: Mark Rutland Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sv

[PATCH v2 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace

2025-06-09 Thread Mark Brown
quot;) Acked-by: Mark Rutland Acked-by: Dev Jain Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c ind

[PATCH v2 0/3] kselftest/arm64: Update sve-ptrace for ABI changes

2025-06-09 Thread Mark Brown
Mark Rutland's recent SME fixes updated the SME ABI to reject any attempt to write FPSIMD register data via the streaming mode SVE register set but did not update the sve-ptrace test to take account of this, resulting in spurious failures. Update the test for this, and also fix an

[PATCH 2/2] kselftest/arm64: Add a test for vfork() with GCS

2025-06-09 Thread Mark Brown
Ensure that we've got at least some coverage of the special cases around vfork() by adding a test case in basic-gcs doing the same thing as the plain fork() one - vfork(), do a few checks and then return to the parent. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/gcs/basic-

[PATCH 0/2] kselftest/arm64: Add coverage for the interaction of vfork() and GCS

2025-06-09 Thread Mark Brown
I had cause to look at the vfork() support for GCS and realised that we don't have any direct test coverage, this series does so by adding vfork() to nolibc and then using that in basic-gcs to provide some simple vfork() coverage. Signed-off-by: Mark Brown --- Mark Brown (2): tools/n

[PATCH 1/2] tools/nolibc: Provide vfork()

2025-06-09 Thread Mark Brown
: Mark Brown --- tools/include/nolibc/sys.h | 29 + 1 file changed, 29 insertions(+) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 9556c69a6ae1..e056da010f64 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -22,6

[PATCH] kselftest/arm64: Convert tpidr2 test to use kselftest.h

2025-06-09 Thread Mark Brown
Recent work by Thomas Weißschuh means that it is now possible to use kselftest.h with nolibc. Convert the tpidr2 test which is nolibc specific to use kselftest.h, making it look more standard and ensuring it gets the benefit of any work done on kselftest.h. Signed-off-by: Mark Brown --- tools

[PATCH RFT v17 2/8] Documentation: userspace-api: Add shadow stack API documentation

2025-06-09 Thread Mark Brown
feature let's provide some documentation covering the common aspects. Reviewed-by: Catalin Marinas Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Shuah Khan Acked-by: Yury Khrustalev Reviewed-by: Deepak Gupta Signed-off-by: Mark Brown --- Documentation/userspace-api/inde

[PATCH RFT v17 0/8] fork: Support shadow stacks in clone3()

2025-06-09 Thread Mark Brown
ilable to me. [1] https://lore.kernel.org/linux-arm-kernel/20241001-arm64-gcs-v13-0-222b78d87...@kernel.org/T/#mc58f97f27461749ccf400ebabf6f9f937116a86b [2] https://lore.kernel.org/r/acs65ccrqtjbn...@arm.com Signed-off-by: Mark Brown --- Changes in v17: - Rebase onto v6.16-rc1. - Link to v16:

[PATCH RFT v17 8/8] selftests/clone3: Test shadow stack support

2025-06-09 Thread Mark Brown
., this should be overly cautious. Acked-by: Shuah Khan Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3.c | 143 +- tools/testing/selftests/clone3/clone3_selftests.h | 63 ++ 2 files changed, 205 insertions(+), 1 deletion(-) diff --git a

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

2025-06-09 Thread Mark Brown
iewed-by: Catalin Marinas Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index e066b201fa64..5b8b7d640e70 100644 --- a/tools/te

[PATCH RFT v17 5/8] selftests/clone3: Remove redundant flushes of output streams

2025-06-09 Thread Mark Brown
s. Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Shuah Khan Reviewed-by: Catalin Marinas Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3_selftests.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/clone3/clone3_selftests.h b/tools/te

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

2025-06-09 Thread Mark Brown
change. Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Shuah Khan Reviewed-by: Catalin Marinas Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3.c | 77 - 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/tools/testing

[PATCH RFT v17 3/8] selftests: Provide helper header for shadow stack testing

2025-06-09 Thread Mark Brown
interfaces. Reviewed-by: Rick Edgecombe Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Shuah Khan Signed-off-by: Mark Brown --- tools/testing/selftests/ksft_shstk.h | 98 1 file changed, 98 insertions(+) diff --git a/tools/testing/selftests/ksft_shstk.h b

[PATCH RFT v17 1/8] arm64/gcs: Return a success value from gcs_alloc_thread_stack()

2025-06-09 Thread Mark Brown
error code on failure. Acked-by: Deepak Gupta Reviewed-by: Catalin Marinas Signed-off-by: Mark Brown --- arch/arm64/include/asm/gcs.h | 8 arch/arm64/kernel/process.c | 8 arch/arm64/mm/gcs.c | 8 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a

[PATCH] selftests/mm: Skip failed memfd setups in gup_longterm

2025-06-05 Thread Mark Brown
Unlike the other cases gup_longterm's memfd tests previously skipped the test when failing to set up the file descriptor to test, restore this behaviour. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/gup_longterm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 07:34:28PM +0200, David Hildenbrand wrote: > On 05.06.25 19:19, Mark Brown wrote: > > TBH this has been a lot better than the more common failure mode with > > working on selftests where people just completely ignore or are openly > > dismissive abou

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 06:47:28PM +0100, Lorenzo Stoakes wrote: > Mark, I'm not finding this productive. > Bottom line is you've broken the tests, please fix them or if you're not > willing to I'll send a fix. Sure, like I said further up I'm just running my p

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 06:09:09PM +0100, Lorenzo Stoakes wrote: > On Thu, Jun 05, 2025 at 05:42:55PM +0100, Mark Brown wrote: > > > Better to do all of these formating fixes and maintain the _same > > > behaviour_ then > > > separately tackle whether or not we

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 06:55:53PM +0200, David Hildenbrand wrote: > On 05.06.25 18:42, Mark Brown wrote: > > I can't remember off hand, sorry. > I assume in ... my review to patch #4? Oh, yeah - it's there. I did look there but the "not a fan" bit made me t

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 05:26:05PM +0100, Lorenzo Stoakes wrote: > On Thu, Jun 05, 2025 at 05:15:51PM +0100, Mark Brown wrote: > > That's the thing with memfd being special and skipping on setup failure > > that David mentioned, I've got a patch as part of the formatting

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-05 Thread Mark Brown
On Thu, Jun 05, 2025 at 05:00:49PM +0100, Lorenzo Stoakes wrote: > This seems to be causing tests to fail rather than be skipped if hugetlb > isn't configured. I bisected the problem to this patch so it's definitely > changed how things are handled (though of course it might just be > _revealing_

Re: [PATCH v2 2/4] selftests/mm: Add helper for logging test start and results

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:37:41PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > +static char test_name[1024]; > > + > > +static inline void log_test_start(const char *name, ...) > > +{ > > + va_list args; > > + va_sta

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 06:48:19PM +0100, Mark Brown wrote: > On Tue, Jun 03, 2025 at 06:57:38PM +0200, David Hildenbrand wrote: > > I agree that printing something in case KSFT_PASS does not make sense > > indeed. > > > > But if something goes wrong (KSFT_FAIL/KSFT_SK

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 06:57:38PM +0200, David Hildenbrand wrote: > On 03.06.25 17:22, Mark Brown wrote: > > Like I've been saying this is just the final test result, in this case I > > would expect that for the actual thing we're trying to test any > > confusion

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 05:06:17PM +0200, David Hildenbrand wrote: > On 03.06.25 16:58, Mark Brown wrote: > > Like I said I suspect the test name is just unclear here... > I would hope we find some mechanical replacement. > E.g., > ksft_test_result_pass("No leak f

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 04:15:42PM +0200, David Hildenbrand wrote: > On 03.06.25 15:21, Mark Brown wrote: > > > > } else { > > > > - ksft_test_result_fail("Leak from parent into child\n"); > > > Same here and in other cases

Re: [PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:51:45PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > ret = mprotect(mem, size, PROT_READ); > > - ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); > > if (ret) { > Not sure

Re: [PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-06-03 Thread Mark Brown
On Tue, Jun 03, 2025 at 02:36:07PM +0200, David Hildenbrand wrote: > On 27.05.25 18:04, Mark Brown wrote: > > + int result = KSFT_PASS; > > int ret; > > + if (fd < 0) { > > + result = KSFT_FAIL; > > + goto report; > > +

[PATCH v2] selftests/filesystems: Fix build of anon_inode_test

2025-05-30 Thread Mark Brown
its are fine. Fixes: 3e406741b1989 ("Merge tag 'vfs-6.16-rc1.selftests' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs") Signed-off-by: Mark Brown --- Changes in v2: - Rebase onto mainline and adjust fixes commit now the two branches got merged there. - Link to

Re: [PATCH] selftests/filesystems: Fix build of anon_inode_test

2025-05-30 Thread Mark Brown
On Sun, May 18, 2025 at 03:01:34PM +0100, Mark Brown wrote: > The anon_inode_test test fails to build due to attempting to include > a nonexisting overlayfs/wrapper.h: > > anon_inode_test.c:10:10: fatal error: overlayfs/wrappers.h: No such file or > directory >10 | #

[PATCH v2 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-05-27 Thread Mark Brown
lp to tooling. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/gup_longterm.c | 150 +++--- 1 file changed, 94 insertions(+), 56 deletions(-) diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index e60e628

[PATCH v2 3/4] selftests/mm: Report unique test names for each cow test

2025-05-27 Thread Mark Brown
d and is a great help to tooling. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 333 +-- 1 file changed, 217 insertions(+), 116 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index e70cd3d

[PATCH v2 1/4] selftests/mm: Use standard ksft_finished() in cow and gup_longterm

2025-05-27 Thread Mark Brown
The cow and gup_longterm test programs open code something that looks a lot like the standard ksft_finished() helper to summarise the test results and provide an exit code, convert to use ksft_finished(). Acked-by: David Hildenbrand Signed-off-by: Mark Brown --- tools/testing/selftests/mm

[PATCH v2 0/4] selftests/mm: cow and gup_longterm cleanups

2025-05-27 Thread Mark Brown
of the main gup_longterm cleanup was previously sent separately, this version factors out the helpers for logging the start of the test since the cow test looks very similar. Signed-off-by: Mark Brown --- Changes in v2: - Typo fixes. - Link to v1: https://lore.kernel.org/r/20250522-selftests-mm

[PATCH v2 2/4] selftests/mm: Add helper for logging test start and results

2025-05-27 Thread Mark Brown
name doesn't fit well with the header only implementation of kselftest.h and partly because it's not really an intended pattern. Ideally at some point the mm tests that use it will be updated to not need it. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/vm_u

Re: [PATCH 3/4] selftests/mm: Report unique test names for each cow test

2025-05-27 Thread Mark Brown
On Tue, May 27, 2025 at 12:53:30PM +0100, Lorenzo Stoakes wrote: > On Tue, May 27, 2025 at 12:49:57PM +0100, Mark Brown wrote: > > On Tue, May 27, 2025 at 11:08:05AM +0100, Lorenzo Stoakes wrote: > > > On Thu, May 22, 2025 at 06:38:52PM +0100, Mark Brown wrote: >

Re: [PATCH 3/4] selftests/mm: Report unique test names for each cow test

2025-05-27 Thread Mark Brown
On Tue, May 27, 2025 at 12:53:30PM +0100, Lorenzo Stoakes wrote: > On Tue, May 27, 2025 at 12:49:57PM +0100, Mark Brown wrote: > > Ugh, this was masked because it's part of a series and among the > > problems with the kselftest build system is the fact that it eats > >

Re: [PATCH 3/4] selftests/mm: Report unique test names for each cow test

2025-05-27 Thread Mark Brown
On Tue, May 27, 2025 at 11:08:05AM +0100, Lorenzo Stoakes wrote: > On Thu, May 22, 2025 at 06:38:52PM +0100, Mark Brown wrote: > > ret = setup_comm_pipes(&comm_pipes); > > if (ret) { > > - ksft_test_result_fail("pipe() failed\n"); > &

Re: [PATCH 3/3] kselftest/arm64: Specify SVE data when testing VL set in sve-ptrace

2025-05-26 Thread Mark Rutland
On Fri, May 23, 2025 at 04:27:14PM +0100, Mark Brown wrote: > Since f916dd32a943 ("arm64/fpsimd: ptrace: Mandate SVE payload for > streaming-mode state") we reject attempts to write to the streaming mode > regset even if there is no register data supplied, causing the tests f

Re: [PATCH 2/3] kselftest/arm64: Fix test for streaming FPSIMD write in sve-ptrace

2025-05-26 Thread Mark Rutland
On Fri, May 23, 2025 at 04:27:13PM +0100, Mark Brown wrote: > Since f916dd32a943 ("arm64/fpsimd: ptrace: Mandate SVE payload for > streaming-mode state") we do not support writing FPSIMD payload data when > writing NT_ARM_SSVE but the sve-ptrace test has an explicit test for >

Re: [PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace

2025-05-26 Thread Mark Rutland
On Fri, May 23, 2025 at 04:27:12PM +0100, Mark Brown wrote: > The check that the new vector length we set was the expected one was typoed > to an assignment statement which for some reason the compilers didn't spot, > most likely due to the macros involved. > > Fixes: 0dca

Re: [PATCH 0/3] kselftest/arm64: Update sve-ptrace for ABI changes

2025-05-26 Thread Mark Rutland
On Fri, May 23, 2025 at 04:27:11PM +0100, Mark Brown wrote: > Mark Rutland's recent SME fixes updated the SME ABI to reject any > attempt to write FPSIMD register data via the streaming mode SVE > register set but did not update the sve-ptrace test to take account of > this, resu

[PATCH 2/3] kselftest/arm64: Fix test for streaming FPSIMD write in sve-ptrace

2025-05-23 Thread Mark Brown
he test to expect a failure when writing FPSIMD data to the streaming mode register set. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/too

[PATCH 3/3] kselftest/arm64: Specify SVE data when testing VL set in sve-ptrace

2025-05-23 Thread Mark Brown
ously fail. Set the flag to avoid the issue, we still support not supplying register data. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing

[PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace

2025-05-23 Thread Mark Brown
The check that the new vector length we set was the expected one was typoed to an assignment statement which for some reason the compilers didn't spot, most likely due to the macros involved. Fixes: 0dca276ac4d2 ("selftests: arm64: Add test for the SVE ptrace interface") Signed-off

[PATCH 0/3] kselftest/arm64: Update sve-ptrace for ABI changes

2025-05-23 Thread Mark Brown
Mark Rutland's recent SME fixes updated the SME ABI to reject any attempt to write FPSIMD register data via the streaming mode SVE register set but did not update the sve-ptrace test to take account of this, resulting in spurious failures. Update the test for this, and also fix an

Re: [PATCH] selftests/filesystems: Fix build of anon_inode_test

2025-05-23 Thread Mark Brown
On Sun, May 18, 2025 at 03:01:34PM +0100, Mark Brown wrote: > The anon_inode_test test fails to build due to attempting to include > a nonexisting overlayfs/wrapper.h: > > anon_inode_test.c:10:10: fatal error: overlayfs/wrappers.h: No such file or > directory >10 | #

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-23 Thread Mark Brown
On Fri, May 23, 2025 at 10:33:13AM +0200, Thomas Weißschuh wrote: > On 2025-05-21 19:49:39+0100, Mark Brown wrote: > > That seems to build with 869c788909b93a78ead1ca28c42b95eeb0779215 which > > is the current HEAD of: > > git://git.kernel.org/pub/scm/linux/kernel/git/no

[PATCH 1/4] selftests/mm: Use standard ksft_finished() in cow and gup_longterm

2025-05-22 Thread Mark Brown
The cow and gup_longterm test programs open code something that looks a lot like the standard ksft_finished() helper to summarise the test results and provide an exit code, convert to use ksft_finished(). Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 7 +-- tools

[PATCH 4/4] selftests/mm: Fix test result reporting in gup_longterm

2025-05-22 Thread Mark Brown
lp to tooling. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/gup_longterm.c | 150 +++--- 1 file changed, 94 insertions(+), 56 deletions(-) diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index e60e628

[PATCH 2/4] selftest/mm: Add helper for logging test start and results

2025-05-22 Thread Mark Brown
name doesn't fit well with the header only implementation of kselftest.h and partly because it's not really an intended pattern. Ideally at some point the mm tests that use it will be updated to not need it. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/vm_u

[PATCH 3/4] selftests/mm: Report unique test names for each cow test

2025-05-22 Thread Mark Brown
d and is a great help to tooling. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/cow.c | 333 +-- 1 file changed, 217 insertions(+), 116 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index e70cd3d

[PATCH 0/4] selftests/mm: cow and gup_longterm cleanups

2025-05-22 Thread Mark Brown
of the main gup_longterm cleanup was previously sent separately, this version factors out the helpers for logging the start of the test since the cow test looks very similar. Signed-off-by: Mark Brown --- Mark Brown (4): selftests/mm: Use standard ksft_finished() in cow and gup_longterm

[PATCH] selftests/mm: Deduplicate test names in madv_populate

2025-05-22 Thread Mark Brown
within the same run. Fix this by tweaking the messages with duplication to be more specific about the contexts they're in. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/madv_populate.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/te

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-22 Thread Mark Brown
On Thu, May 22, 2025 at 10:42:50AM +0200, David Hildenbrand wrote: > Probably, one might be able to revert the logic: instead of running each > test for each size, run each size for each test: then, the tests are fixed > and would be covering all available sizes in a single logical test. Yeah, th

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-21 Thread Mark Brown
On Wed, May 21, 2025 at 03:45:42PM +0200, Thomas Weißschuh wrote: > Or you could run your testsuite with the new nolibc for-next branch > which should be fixed now. That seems to build with 869c788909b93a78ead1ca28c42b95eeb0779215 which is the current HEAD of: git://git.kernel.org/pub/scm/linu

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-21 Thread Mark Brown
On Mon, May 19, 2025 at 03:28:47PM +0200, David Hildenbrand wrote: > On 16.05.25 20:07, Mark Brown wrote: > > On Fri, May 16, 2025 at 04:12:08PM +0200, David Hildenbrand wrote: > > [Converting to kselftet_harness] > > > > That'd certainly work, though doing

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-21 Thread Mark Brown
On Wed, May 21, 2025 at 03:45:42PM +0200, Thomas Weißschuh wrote: > On 2025-05-21 14:22:30+0100, Mark Brown wrote: > > Ah, you expect what's currently there to work - good. I noticed that > > the vDSO tests had a -I for the nolibc directory which made me think it > &g

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-21 Thread Mark Brown
On Wed, May 21, 2025 at 03:08:05PM +0200, Thomas Weißschuh wrote: > On 2025-05-21 14:03:37+0100, Mark Brown wrote: > > > +/* make sure to include all global symbols */ > > > +#include "nolibc.h" > > assumes that the nolibc include directory is in the include

Re: [PATCH 1/9] tools/nolibc: move ioctl() to sys/ioctl.h

2025-05-21 Thread Mark Brown
On Thu, May 15, 2025 at 09:57:47PM +0200, Thomas Weißschuh wrote: > This is the location regular userspace expects this definition. > > Signed-off-by: Thomas Weißschuh This is in -next as b8c436bbef0f2a and breaks the build of all the arm64 selftests using nolibc: clang --target=aarch64-linux-

Re: [PATCH v3 1/2] arm64: Implement arch_stack_walk_reliable

2025-05-20 Thread Mark Rutland
On Tue, May 20, 2025 at 03:28:45PM +0100, Will Deacon wrote: > On Mon, May 19, 2025 at 02:41:06PM +0100, Mark Rutland wrote: > > I've pushed a arm64/stacktrace-updates branch [1] with fixups for those > > as two separate commits atop this one. If that looks good to you I >

Re: [PATCH v3 0/2] arm64: livepatch: Enable livepatch without sframe

2025-05-19 Thread Mark Rutland
n take patch 2 until Will's comments on [1] have been addressed, but I think that we could take patch 1 (with fixups) as per my other reply. Mark.

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-19 Thread Mark Brown
On Mon, May 19, 2025 at 03:28:47PM +0200, David Hildenbrand wrote: > On 16.05.25 20:07, Mark Brown wrote: > > On Fri, May 16, 2025 at 04:12:08PM +0200, David Hildenbrand wrote: > > [Converting to kselftet_harness] > > > > That'd certainly work, though doing

Re: [PATCH v3 1/2] arm64: Implement arch_stack_walk_reliable

2025-05-19 Thread Mark Rutland
eturn -EINVAL when that is NULL, but that should never happen in normal operation. I've pushed a arm64/stacktrace-updates branch [1] with fixups for those as two separate commits atop this one. If that looks good to you I suggest we post that as a series and ask Will and Catalin to take that as-is. I'll look at the actual patching bits now. Mark. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/ arm64/stacktrace-updates

Re: [PATCH v3 0/2] arm64: livepatch: Enable livepatch without sframe

2025-05-19 Thread Mark Rutland
t; > > Changes v2 => v3: > > > 1. Remove a redundant check for -ENOENT. (Josh Poimboeuf) > > > 2. Add Tested-by and Acked-by on v1. (I forgot to add them in v2.) > > > > The approach and both patches look reasonable: > > > > Reviewed-by: Petr Mladek &

[PATCH] selftests/filesystems: Fix build of anon_inode_test

2025-05-18 Thread Mark Brown
its are fine. Fixes: feaa00dbff45a ("Merge branch 'vfs-6.16.selftests' into vfs.all") Signed-off-by: Mark Brown --- tools/testing/selftests/filesystems/anon_inode_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/filesystems/anon

[PATCH] selftests/mm: Deduplicate second mmap() of 5*PAGE_SIZE at base

2025-05-18 Thread Mark Brown
log message for the second one to deduplicate. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/map_fixed_noreplace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/map_fixed_noreplace.c b/tools/testing/selftests/mm/map_fixed_noreplace.c

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-16 Thread Mark Brown
On Fri, May 16, 2025 at 04:12:08PM +0200, David Hildenbrand wrote: > On 16.05.25 15:09, Mark Brown wrote: > > > I'm afraid we have other such tests that report duplicate conditions. > > > cow.c > > > is likely another candidate (written by me ;) ). > >

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-16 Thread Mark Brown
On Fri, May 16, 2025 at 02:55:24PM +0200, David Hildenbrand wrote: > On 16.05.25 14:29, Mark Brown wrote: > > On Fri, May 16, 2025 at 10:02:16AM +0200, David Hildenbrand wrote: > > > reason), what exactly is the problem with that? > > > We run tests. If all pass, we

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-16 Thread Mark Brown
On Fri, May 16, 2025 at 10:02:16AM +0200, David Hildenbrand wrote: > On 15.05.25 10:57, Mark Brown wrote: > > The kselftest framework uses the string logged when a test result is > > reported as the unique identifier for a test, using it to track test > > results between r

Re: [PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-15 Thread Mark Brown
On Thu, May 15, 2025 at 03:05:07PM +0530, Dev Jain wrote: > On 15/05/25 2:27 pm, Mark Brown wrote: > > @@ -189,7 +214,10 @@ static void do_test(int fd, size_t size, enum > > test_type type, bool shared) > > * some previously unsupported filesyst

[PATCH] selftests/mm: Deduplicate default page size test results in thuge-gen

2025-05-15 Thread Mark Brown
logged to deduplicate. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/thuge-gen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/thuge-gen.c b/tools/testing/selftests/mm/thuge-gen.c index cd5174d735be..a41bc1234b37 100644 --- a/tools

[PATCH] selftests/mm: Deduplicate test logging in test_mlock_lock()

2025-05-15 Thread Mark Brown
confuses test automation since the test string is used to deduplicate tests, change the post unlock test to report "Unlocked" instead like the other tests to fix this. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/mlock2-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] selftests/mm: Fix test result reporting in gup_longterm

2025-05-15 Thread Mark Brown
ntial cleanup. Signed-off-by: Mark Brown --- tools/testing/selftests/mm/gup_longterm.c | 163 -- 1 file changed, 107 insertions(+), 56 deletions(-) diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index 21595b2

Re: [PATCH v4 14/14] HACK: selftests/nolibc: demonstrate usage of the kselftest harness

2025-05-06 Thread Mark Brown
On Mon, May 05, 2025 at 05:15:32PM +0200, Thomas Weißschuh wrote: > Show how to use the kselftest harness together with nolibc. > This just runs the existing harness selftest by crudely replacing the > regular nolibc-test.c with the harness-selftest.c to get that wired up easily. > To use it: >

Re: [PATCH v3 12/32] selftests: harness: Stop using setjmp()/longjmp()

2025-05-05 Thread Mark Brown
On Fri, Apr 11, 2025 at 11:00:36AM +0200, Thomas Weißschuh wrote: > Usage of longjmp() was added to ensure that teardown is always run in > commit 63e6b2a42342 ("selftests/harness: Run TEARDOWN for ASSERT failures") > However instead of calling longjmp() to the teardown handler it is easier to > ju

Re: [PATCH] KVM: selftests: add test for SVE host corruption

2025-04-29 Thread Mark Brown
On Tue, Apr 29, 2025 at 04:27:27PM +0100, Mark Rutland wrote: > On Thu, Apr 17, 2025 at 12:32:49AM +0100, Mark Brown wrote: > > Signed-off-by: Mark Brown > Looks like my Signed-off-by got dropped by accident; it should be above > yours here. > Aside from that, and the in

Re: [PATCH] KVM: selftests: add test for SVE host corruption

2025-04-29 Thread Mark Rutland
On Thu, Apr 17, 2025 at 12:32:49AM +0100, Mark Brown wrote: > This test program, originally written by Mark Rutland and lightly modified > by me for upstream, For context, I had originally pushed this as a WIP to: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h

[PATCH] kunit: configs: Enable coverage of the bitfield packing library

2025-04-25 Thread Mark Brown
There are KUnit tests for the bitfield packing library but these depend on CONFIG_PACKING which is not enabled by anything in either the existing KUnit all_tests.config or the base UML config it runs on as standard. Enable that in all_tests.config to improve coverage. Signed-off-by: Mark Brown

  1   2   3   4   5   6   7   8   9   10   >