Re: [PATCH v3 0/3] Enable USB audio offloading on Fairphone 4 smartphone

2025-07-23 Thread Mark Brown
On Wed, 23 Jul 2025 16:03:37 +0200, Luca Weiss wrote: > Updated description for v3: > Add the missing bits for the sound subsystem to enable USB audio > offloading on the Fairphone 4. This is mostly sndcard enablement now. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/brooni

Re: (subset) [PATCH v2 0/5] Enable USB audio offloading on Fairphone 4 smartphone

2025-07-23 Thread Mark Brown
On Thu, 01 May 2025 08:48:46 +0200, Luca Weiss wrote: > Since the series for the USB sound offloading driver was finally merged, > we can add the sm6350 dts and enable it on Fairphone 4. > > A few devicetree binding bits have also been missing in that series, so > there's some extra patches for th

Re: [PATCH v2 0/5] Enable USB audio offloading on Fairphone 4 smartphone

2025-07-23 Thread Mark Brown
On Wed, Jul 23, 2025 at 01:09:35PM +0200, Luca Weiss wrote: > On Wed Jul 23, 2025 at 12:57 PM CEST, Mark Brown wrote: > > As previously discussed they won't apply until after the merge window. > Sorry about that, I thought the conflict was for the 6.16 merge window, > n

Re: [PATCH v2 0/5] Enable USB audio offloading on Fairphone 4 smartphone

2025-07-23 Thread Mark Brown
On Mon, Jul 21, 2025 at 08:22:06AM +0200, Luca Weiss wrote: > On Wed Jul 16, 2025 at 9:19 AM CEST, Luca Weiss wrote: > > All dependencies for the patches have been applied already, so this > > series can land as well! > Is it still possible to pick up the sound patches (1-3) for 6.17? Dts > has b

[PATCH 3/3] kselftest/arm64: Handle attempts to disable SM on SME only systems

2025-07-18 Thread Mark Brown
this operation is not currently supported. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fp-ptrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/arm64/fp/fp-ptrace.c b/tools/testing/selftests/arm64/fp/fp-ptrace.c index 9fc9dc4adaf9..21bc4eac092e 1

[PATCH 2/3] kselftest/arm64: Fix SVE write data generation for SME only systems

2025-07-18 Thread Mark Brown
data for cases where we do not expect to have an active vector length. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fp-ptrace.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/arm64/fp/fp-ptrace.c b/tools/testing/selftests/arm64/fp/fp-ptrace.c

[PATCH 1/3] kselftest/arm64: Test SME on SME only systems in fp-ptrace

2025-07-18 Thread Mark Brown
When checking that the vector extensions are supported fp-ptrace currently only checks for SVE being supported which means that we get into a confused half configured state for SME only systems. Check for SME as well. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/fp/fp-ptrace.c

[PATCH 0/3] kselftest/arm64: Fixes for fp-ptrace on SME only systems

2025-07-18 Thread Mark Brown
mechanism for disabling streaming mode via ptrace, this series brings the program to a point where it tests the currently implemented ABI. A further series allowing the disabling of streaming mode via ptrace will follow. Signed-off-by: Mark Brown --- Mark Brown (3): kselftest/arm64: Test SME on

[PATCH] kselftest/arm64: Test FPSIMD format data writes via NT_ARM_SVE in fp-ptrace

2025-07-18 Thread Mark Brown
handled as for any NT_ARM_SVE write. This has not previously been tested by fp-ptrace, add coverage of it. We do not support writes in FPSIMD format for NT_ARM_SSVE so we skip the test for anything that would leave us in streaming mode. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64

[PATCH] kselftest/arm64: Allow sve-ptrace to run on SME only systems

2025-07-18 Thread Mark Brown
-by: Mark Brown --- tools/testing/selftests/arm64/fp/sve-ptrace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c index 7f9b6a61d369..b22303778fb0 100644 --- a/tools/testing/selftests/arm64/fp/sve

Re: [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers

2025-07-16 Thread Mark Brown
ly to -next for some reason so I had to manually apply but it seems to do the trick, thanks! Tested-by: Mark Brown with this against -next: diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c index 97aa9059a5c97..487e3458e536e 100644 --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/get

Re: [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers

2025-07-16 Thread Mark Brown
On Wed, Jul 16, 2025 at 02:34:52PM +0200, Thomas Weißschuh wrote: > On Wed, Jul 16, 2025 at 01:25:06PM +0100, Mark Brown wrote: > > This issue has been present in -next for a week and is causing a bunch > > of disruption to tests that end up relying on the vDSO - do we have

Re: [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers

2025-07-16 Thread Mark Brown
On Wed, Jul 09, 2025 at 10:04:21AM +0200, Marek Szyprowski wrote: > On 09.07.2025 09:34, Thomas Weißschuh wrote: > > On Tue, Jul 08, 2025 at 05:49:18PM +0200, Marek Szyprowski wrote: > > This fix looks correct to me. > > tglx: > > Are you going to fold the fix into the commit or do you want a pr

Re: [PATCH] kselftest/arm4: Provide local defines for AT_HWCAP3

2025-07-16 Thread Mark Brown
On Wed, Jul 16, 2025 at 08:04:54AM +0530, Anshuman Khandual wrote: > On 16/07/25 2:41 AM, Mark Brown wrote: > > #define TESTS_PER_HWCAP 3 > > +#ifndef AT_HWCAP3 > > +#define AT_HWCAP3 29 > Just wondering - would it be better to add a comment that this is a > te

[PATCH] kselftest/arm4: Provide local defines for AT_HWCAP3

2025-07-15 Thread Mark Brown
some toolchains it needs some persuasion to get picked up. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 4 tools/testing/selftests/arm64/mte/check_prctl.c | 4 2 files changed, 8 insertions(+) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b

Re: [PATCH v5] selftests/mm: add process_madvise() tests

2025-07-15 Thread Mark Brown
On Tue, Jul 15, 2025 at 06:58:05PM +0800, wang lian wrote: > > On Mon, Jul 14, 2025 at 08:25:33PM +0800, wang lian wrote: > > > + /* Cleanup */ > > > + kill(self->child_pid, SIGKILL); > > > + waitpid(self->child_pid, NULL, 0); > > > + if (pidfd >= 0) > > > + close(pidfd); > > The cleanup

[PATCH 2/2] selftests/fchmodat2: Use ksft_finished()

2025-07-14 Thread Mark Brown
The fchmodat2 test program open codes a version of ksft_finished(), use the standard version. Signed-off-by: Mark Brown --- tools/testing/selftests/fchmodat2/fchmodat2_test.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/testing/selftests/fchmodat2

[PATCH 1/2] selftests/fchmodat2: Clean up temporary files and directories

2025-07-14 Thread Mark Brown
might otherwise be due to the extensive use of ksft_exit_fail_msg() in the program. As a side effect this also ensures that we report a consistent test name for the tests and always try both tests even if they are skipped. Signed-off-by: Mark Brown --- tools/testing/selftests/fchmodat2

[PATCH 0/2] selftests/fchmodat2: Error handling and general cleanups

2025-07-14 Thread Mark Brown
I looked at the fchmodat2() tests since I've been experiencing some random intermittent segfaults with them in my test systems, while doing so I noticed these two issues. Unfortunately I didn't figure out the original yet, unless I managed to fix it unwittingly. Signed-off-by:

Re: [PATCH] selftests/mm: refactor common code and improve test skipping in guard_region

2025-07-14 Thread Mark Brown
On Mon, Jul 14, 2025 at 09:00:09PM +0800, wang lian wrote: > Move the generic `FORCE_READ` macro from `guard-regions.c` to the shared > `vm_util.h` header to promote code reuse. > > In `guard-regions.c`, replace `ksft_exit_skip()` with the `SKIP()` macro > to ensure only the current test is skipp

Re: [PATCH v5] selftests/mm: add process_madvise() tests

2025-07-14 Thread Mark Brown
On Mon, Jul 14, 2025 at 08:25:33PM +0800, wang lian wrote: > +TEST_F(process_madvise, remote_collapse) > +{ > + self->child_pid = fork(); > + ASSERT_NE(self->child_pid, -1); > + ret = read(pipe_info[0], &info, sizeof(info)); > + if (ret <= 0) { > + waitpid(self->child

Re: [PATCH v2 0/4] Add RPMh regulator support for PM7550 & PMR735B

2025-07-14 Thread Mark Brown
On Fri, 11 Jul 2025 09:28:38 +0200, Luca Weiss wrote: > Document and add support for the regulators on PM7550 and PMR735B, which > can be paired with the Milos SoC. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [1/4] regulator: dt-bi

Re: [PATCH v4] selftests/mm: add process_madvise() tests

2025-07-11 Thread Mark Brown
On Fri, Jul 11, 2025 at 09:53:10AM +0100, Lorenzo Stoakes wrote: > On Fri, Jul 11, 2025 at 09:11:47AM +0100, Mark Brown wrote: > > One thing to watch out for with peering into the private header files of > > other selftests is that it's a routine source of build and sometimes

Re: [PATCH v3] selftests/mm: add process_madvise() tests

2025-07-11 Thread Mark Brown
On Thu, Jul 10, 2025 at 12:28:13PM -0400, Zi Yan wrote: > On 10 Jul 2025, at 4:42, Mark Brown wrote: > > On Wed, Jul 09, 2025 at 10:46:07AM -0400, Zi Yan wrote: > >> Right. My /usr/include/sys does not have pidfd.h. IMHO selftests > >> should not rely on userspace h

Re: [PATCH 09/10] mm/mremap: permit mremap() move of multiple VMAs

2025-07-11 Thread Mark Brown
On Fri, Jul 11, 2025 at 09:17:27AM +0100, Mark Brown wrote: > On Mon, Jul 07, 2025 at 06:27:52AM +0100, Lorenzo Stoakes wrote: > > Historically we've made it a uAPI requirement that mremap() may only > > operate on a single VMA at a time. > > > > For instances whe

Re: [PATCH v4] selftests/mm: add process_madvise() tests

2025-07-11 Thread Mark Brown
On Thu, Jul 10, 2025 at 05:57:23PM +0100, Lorenzo Stoakes wrote: > On Thu, Jul 10, 2025 at 07:22:49PM +0800, wang lian wrote: > > +#include > However, the pidfd tests already have a stub in so you can alternatively > use: > #include "../pidfd/pidfd.h" > As is done in guard-regions.c. One thin

Re: [PATCH 09/10] mm/mremap: permit mremap() move of multiple VMAs

2025-07-11 Thread Mark Brown
On Mon, Jul 07, 2025 at 06:27:52AM +0100, Lorenzo Stoakes wrote: > Historically we've made it a uAPI requirement that mremap() may only > operate on a single VMA at a time. > > For instances where VMAs need to be resized, this makes sense, as it > becomes very difficult to determine what a user ac

Re: [PATCH v4] selftests/mm: add process_madvise() tests

2025-07-11 Thread Mark Brown
On Thu, Jul 10, 2025 at 12:21:36PM -0400, Zi Yan wrote: > On 10 Jul 2025, at 9:42, Mark Brown wrote: > > On Thu, Jul 10, 2025 at 07:22:49PM +0800, wang lian wrote: > >> +#include > >> +#include > > Does this work without 'make headers_install' for t

Re: [PATCH v4] selftests/mm: add process_madvise() tests

2025-07-10 Thread Mark Brown
On Thu, Jul 10, 2025 at 07:22:49PM +0800, wang lian wrote: > Add tests for process_madvise(), focusing on verifying behavior under > various conditions including valid usage and error cases. > --- a/tools/testing/selftests/mm/guard-regions.c > +++ b/tools/testing/selftests/mm/guard-regions.c > -

[PATCH] KVM: selftests: Add CONFIG_EVENTFD for irqfd selftest

2025-07-10 Thread Mark Brown
ist of required options for the KVM selftests. Signed-off-by: Mark Brown --- tools/testing/selftests/kvm/config | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config index 8835fed09e9f..96d874b239eb 100644 --- a/tools/testin

Re: [PATCH v3] selftests/mm: add process_madvise() tests

2025-07-10 Thread Mark Brown
On Wed, Jul 09, 2025 at 10:46:07AM -0400, Zi Yan wrote: > On 9 Jul 2025, at 8:32, wang lian wrote: > > Thanks for testing the patch and reporting this build failure. > > I don't have an arm64 environment readily available for testing, so I > > appreciate you catching this. I suspect this is caused

Re: [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers

2025-07-09 Thread Mark Brown
On Tue, Jul 01, 2025 at 10:58:00AM +0200, Thomas Weißschuh wrote: > The internal helpers are effectively using boolean results, > while pretending to use error numbers. > > Switch the return type to bool for more clarity. Marek already reported and analysed a hwclock issue with this but I'm also

Re: [PATCH v2 2/3] ASoC: codecs: Add Awinic AW8898 amplifier driver

2025-07-07 Thread Mark Brown
On Mon, Jul 07, 2025 at 05:52:08PM +0200, Luca Weiss wrote: > On 07-07-2025 2:02 p.m., Mark Brown wrote: > > On Sat, Jul 05, 2025 at 02:03:06PM +0200, Luca Weiss wrote: > > > + aw8898_cfg_write(aw8898, aw8898_cfg); > > The "firmware" here is just a list of

Re: [PATCH v2 2/3] ASoC: codecs: Add Awinic AW8898 amplifier driver

2025-07-07 Thread Mark Brown
On Sat, Jul 05, 2025 at 02:03:06PM +0200, Luca Weiss wrote: > +static void aw8898_update_dev_mode(struct aw8898 *aw8898) > +{ > + unsigned int mode = AW8898_SYSCTRL_SPK_MODE; > + > + if (aw8898->dev_mode == AW8898_RECEIVER) > + mode = AW8898_SYSCTRL_RCV_MODE; > + > + regmap

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

2025-07-04 Thread Mark Brown
On Fri, Jul 04, 2025 at 01:27:28PM +0200, Thomas Weißschuh wrote: > FYI nolibc now has a proper prctl() implementation you might want to use. That's open coded because we absolutely cannot tolerate the prctl() to enable GCS being anything other than inlined, returning from an actual function call

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

2025-07-03 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. Reviewed-by: Catalin Marinas Signed-off-by: Mark Brown --- tools/te

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

2025-07-03 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 v3 4/4] selftests/nolibc: Add coverage of vfork()

2025-07-03 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 v3 0/4] kselftest/arm64: Add coverage for the interaction of vfork() and GCS

2025-07-03 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 v3: - Stylistic ni

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

2025-07-03 Thread Mark Brown
() SPARC returns the parent PID rather than 0 in the child for vfork() so needs custom handling. Signed-off-by: Mark Brown --- tools/include/nolibc/arch-sparc.h | 16 tools/include/nolibc/sys.h| 29 + 2 files changed, 45 insertions(+) diff --git a

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

2025-07-03 Thread Mark Brown
On Thu, Jul 03, 2025 at 11:39:14AM +0100, Catalin Marinas wrote: > On Tue, Jun 10, 2025 at 01:29:46PM +0100, Mark Brown wrote: > > + exit(ret); > Should this be _exit() instead? IIRC exit() does some clean-ups which > are not safe in the vfork'ed child. This test

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

2025-07-02 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 v18 4/8] fork: Add shadow stack support to clone3()

2025-07-02 Thread Mark Brown
stack is specified. Since we are now using more fields from the kernel_clone_args we pass that into the shadow stack code rather than individual fields. Portions of the x86 architecture code were written by Rick Edgecombe. Acked-by: Yury Khrustalev Signed-off-by: Mark Brown --- arch/arm64/mm/gcs.c

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

2025-07-02 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 v18 5/8] selftests/clone3: Remove redundant flushes of output streams

2025-07-02 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 v18 6/8] selftests/clone3: Factor more of main loop into test_clone3()

2025-07-02 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 v18 2/8] Documentation: userspace-api: Add shadow stack API documentation

2025-07-02 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 v18 3/8] selftests: Provide helper header for shadow stack testing

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

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

2025-07-02 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 v18 0/8] fork: Support shadow stacks in clone3()

2025-07-02 Thread Mark Brown
to v1: https://lore.kernel.org/r/20231023-clone3-shadow-stack-v1-0-d867d0b5d...@kernel.org --- Mark Brown (8): arm64/gcs: Return a success value from gcs_alloc_thread_stack() Documentation: userspace-api: Add shadow stack API documentation selftests: Provide helper header for sh

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

2025-06-27 Thread Mark Brown
On Fri, Jun 27, 2025 at 06:19:33PM +0100, Catalin Marinas wrote: > On Mon, Jun 09, 2025 at 01:54:05PM +0100, Mark Brown wrote: > > + /* Ensure that a token written as a result of a pivot is visible */ > > + gcsb_dsync(); > > + gcspr_el0 = args->shadow

Re: [PATCH] selftests/arm64: Prevent build warnings from -Wmaybe-uninitialized

2025-06-27 Thread Mark Brown
On Fri, Jun 27, 2025 at 04:15:09PM +0530, Anshuman Khandual wrote: > On 25/06/25 3:54 PM, Mark Brown wrote: > >> - int status; > >> + int status = 0; > > This will shut the warnings up, but it's a bit of a heavy hammer that > > means that the warni

Re: [PATCH] selftests/arm64: Prevent build warnings from -Wmaybe-uninitialized

2025-06-25 Thread Mark Brown
On Wed, Jun 25, 2025 at 03:01:38AM +0100, Anshuman Khandual wrote: > @@ -96,7 +96,7 @@ static int write_sleep_read(void) > static int write_fork_read(void) > { > pid_t newpid, waiting, oldpid; > - int status; > + int status = 0; > > set_tpidr2(getpid()); > This will shut

Re: [PATCH] ASoC: qcom: sm8250: Fix possibly undefined reference

2025-06-23 Thread Mark Brown
On Tue, 17 Jun 2025 14:20:12 +0200, Luca Weiss wrote: > With CONFIG_SND_SOC_SM8250=y and CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS=m > selected in kconfig, the build will fail due to trying to link against a > symbol only found in the module. > > aarch64-linux-gnu-ld: sound/soc/qcom/sm8250.o: in functio

[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

[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
On Wed, 07 May 2025 10:01:36 +0200, Luca Weiss wrote: > Add the necessary sound card bits and some dts additions to enable sound > over DisplayPort-over-USB-C, e.g. to a connected TV or monitor. > > The UCM files can be found here: > https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/mas

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

2025-06-09 Thread Mark Brown
On Fri, 25 Apr 2025 10:07:24 +0200, Luca Weiss wrote: > Add the necessary sound card bits and some dts additions to enable sound > over DisplayPort-over-USB-C, e.g. to a connected TV or monitor. > > The UCM files can be found here: > https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/mas

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
other preexisting issue I noticed while looking at this. Signed-off-by: Mark Brown --- Changes in v2: - Rebase onto v6.16-rc1. - Update fixes tag for patch 1. - Link to v1: https://lore.kernel.org/r/20250523-kselftest-arm64-ssve-fixups-v1-0-65069a263...@kernel.org --- Mark Brown (3): kselftest/arm64

[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 patch through testing at the minute.

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

  1   2   3   4   5   6   7   8   9   10   >