* [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling
@ 2026-05-25 7:30 Hongfu Li
2026-05-25 7:30 ` [PATCH v2 1/2] selftests/mm: refactor pkey test helpers and unify assertions Hongfu Li
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Hongfu Li @ 2026-05-25 7:30 UTC (permalink / raw)
To: akpm, david, ljs, liam, vbabka, rppt, surenb, mhocko, shuah
Cc: linux-mm, linux-kselftest, linux-kernel, Hongfu Li
This series is version 2 of the previous patch [0]. In v2, the changes are
split into two patches for easier review.
[0] https://lore.kernel.org/all/20260518082120.3890552-1-lihongfu@kylinos.cn/
The main changes in this series are to refactor shared tracing and assertion
helpers into a common file, unify both pkey selftests on pkey_assert() and
per-test tracing for consistent diagnostics, and add missing mmap() return
checks with MAP_FAILED used throughout for readability and consistency.
Hongfu Li (2):
selftests/mm: Refactor pkey test helpers and unify assertions
selftests/mm: add missing mmap() return checks in pkey tests
tools/testing/selftests/mm/pkey-helpers.h | 5 +-
tools/testing/selftests/mm/pkey-powerpc.h | 2 +-
.../selftests/mm/pkey_sighandler_tests.c | 20 ++--
tools/testing/selftests/mm/pkey_util.c | 81 +++++++++++++++
tools/testing/selftests/mm/protection_keys.c | 98 ++-----------------
5 files changed, 109 insertions(+), 97 deletions(-)
---
v2:
- Update commit message
- Move shared tracing and assertion helpers to a common file,
replace assert() with pkey_assert() in sighandler tests
- Drop assert() from main() in protection_keys.c and add a proper error
message instead.
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] selftests/mm: refactor pkey test helpers and unify assertions
2026-05-25 7:30 [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Hongfu Li
@ 2026-05-25 7:30 ` Hongfu Li
2026-05-25 7:30 ` [PATCH v2 2/2] selftests/mm: add missing mmap() return checks in pkey tests Hongfu Li
2026-05-25 20:02 ` [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Andrew Morton
2 siblings, 0 replies; 7+ messages in thread
From: Hongfu Li @ 2026-05-25 7:30 UTC (permalink / raw)
To: akpm, david, ljs, liam, vbabka, rppt, surenb, mhocko, shuah
Cc: linux-mm, linux-kselftest, linux-kernel, Hongfu Li
Move shared tracing and assertion helpers to a common file, then
convert the sighandler test to use pkey_assert() for consistent
diagnostic output, and add per-test tracing around test execution.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
tools/testing/selftests/mm/pkey-helpers.h | 5 +-
.../selftests/mm/pkey_sighandler_tests.c | 18 ++--
tools/testing/selftests/mm/pkey_util.c | 81 ++++++++++++++++++
tools/testing/selftests/mm/protection_keys.c | 82 -------------------
4 files changed, 96 insertions(+), 90 deletions(-)
diff --git a/tools/testing/selftests/mm/pkey-helpers.h b/tools/testing/selftests/mm/pkey-helpers.h
index 7c29f075e40b..de9052386343 100644
--- a/tools/testing/selftests/mm/pkey-helpers.h
+++ b/tools/testing/selftests/mm/pkey-helpers.h
@@ -68,7 +68,10 @@ static inline void sigsafe_printf(const char *format, ...)
#define dprintf3(args...) dprintf_level(3, args)
#define dprintf4(args...) dprintf_level(4, args)
-extern void abort_hooks(void);
+void cat_into_file(char *str, char *file);
+void tracing_on(void);
+void tracing_off(void);
+void abort_hooks(void);
#define pkey_assert(condition) do { \
if (!(condition)) { \
dprintf0("assert() at %s::%d test_nr: %d iteration: %d\n", \
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c
index 302fef54049c..a390d183ebdc 100644
--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c
+++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -19,7 +19,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <signal.h>
-#include <assert.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/types.h>
@@ -36,6 +35,10 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
static siginfo_t siginfo = {0};
+int iteration_nr = 1;
+int test_nr;
+int dprint_in_signal;
+
/*
* We need to use inline assembly instead of glibc's syscall because glibc's
* syscall will attempt to access the PLT in order to call a library function
@@ -302,7 +305,7 @@ static void test_sigsegv_handler_with_different_pkey_for_stack(void)
stack = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- assert(stack != MAP_FAILED);
+ pkey_assert(stack != MAP_FAILED);
/* Allow access to MPK 0 and MPK 1 */
pkey_reg = pkey_reg_restrictive_default();
@@ -470,7 +473,7 @@ static void test_pkru_sigreturn(void)
stack = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- assert(stack != MAP_FAILED);
+ pkey_assert(stack != MAP_FAILED);
/*
* Allow access to MPK 0 and MPK 2. The child thread (to be created
@@ -530,16 +533,17 @@ static void (*pkey_tests[])(void) = {
int main(int argc, char *argv[])
{
- int i;
-
ksft_print_header();
ksft_set_plan(ARRAY_SIZE(pkey_tests));
if (!is_pkeys_supported())
ksft_exit_skip("pkeys not supported\n");
- for (i = 0; i < ARRAY_SIZE(pkey_tests); i++)
- (*pkey_tests[i])();
+ for (test_nr = 0; test_nr < ARRAY_SIZE(pkey_tests); test_nr++) {
+ tracing_on();
+ (*pkey_tests[test_nr])();
+ tracing_off();
+ }
ksft_finished();
return 0;
diff --git a/tools/testing/selftests/mm/pkey_util.c b/tools/testing/selftests/mm/pkey_util.c
index 255b332f7a08..a080d1dcc82d 100644
--- a/tools/testing/selftests/mm/pkey_util.c
+++ b/tools/testing/selftests/mm/pkey_util.c
@@ -2,9 +2,90 @@
#define __SANE_USERSPACE_TYPES__
#include <sys/syscall.h>
#include <unistd.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
#include "pkey-helpers.h"
+void cat_into_file(char *str, char *file)
+{
+ int fd = open(file, O_RDWR);
+ int ret;
+
+ dprintf2("%s(): writing '%s' to '%s'\n", __func__, str, file);
+ if (fd < 0) {
+ fprintf(stderr, "error opening '%s'\n", str);
+ perror("error: ");
+ exit(__LINE__);
+ }
+
+ ret = write(fd, str, strlen(str));
+ if (ret != strlen(str)) {
+ perror("write to file failed");
+ fprintf(stderr, "filename: '%s' str: '%s'\n", file, str);
+ exit(__LINE__);
+ }
+ close(fd);
+}
+
+#if CONTROL_TRACING > 0
+static int warned_tracing;
+static int tracing_root_ok(void)
+{
+ if (geteuid() != 0) {
+ if (!warned_tracing)
+ fprintf(stderr, "WARNING: not run as root, "
+ "can not do tracing control\n");
+ warned_tracing = 1;
+ return 0;
+ }
+ return 1;
+}
+#endif
+
+void tracing_on(void)
+{
+#if CONTROL_TRACING > 0
+#define TRACEDIR "/sys/kernel/tracing"
+ char pidstr[32];
+
+ if (!tracing_root_ok())
+ return;
+
+ sprintf(pidstr, "%d", getpid());
+ cat_into_file("0", TRACEDIR "/tracing_on");
+ cat_into_file("\n", TRACEDIR "/trace");
+ if (1) {
+ cat_into_file("function_graph", TRACEDIR "/current_tracer");
+ cat_into_file("1", TRACEDIR "/options/funcgraph-proc");
+ } else {
+ cat_into_file("nop", TRACEDIR "/current_tracer");
+ }
+ cat_into_file(pidstr, TRACEDIR "/set_ftrace_pid");
+ cat_into_file("1", TRACEDIR "/tracing_on");
+ dprintf1("enabled tracing\n");
+#endif
+}
+
+void tracing_off(void)
+{
+#if CONTROL_TRACING > 0
+ if (!tracing_root_ok())
+ return;
+ cat_into_file("0", "/sys/kernel/tracing/tracing_on");
+#endif
+}
+
+void abort_hooks(void)
+{
+ fprintf(stderr, "running %s()...\n", __func__);
+ tracing_off();
+#ifdef SLEEP_ON_ABORT
+ sleep(SLEEP_ON_ABORT);
+#endif
+}
+
int sys_pkey_alloc(unsigned long flags, unsigned long init_val)
{
int ret = syscall(SYS_pkey_alloc, flags, init_val);
diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c
index 2085982dba69..3c0cbf8f3eaa 100644
--- a/tools/testing/selftests/mm/protection_keys.c
+++ b/tools/testing/selftests/mm/protection_keys.c
@@ -61,88 +61,6 @@ noinline int read_ptr(int *ptr)
return *ptr;
}
-static void cat_into_file(char *str, char *file)
-{
- int fd = open(file, O_RDWR);
- int ret;
-
- dprintf2("%s(): writing '%s' to '%s'\n", __func__, str, file);
- /*
- * these need to be raw because they are called under
- * pkey_assert()
- */
- if (fd < 0) {
- fprintf(stderr, "error opening '%s'\n", str);
- perror("error: ");
- exit(__LINE__);
- }
-
- ret = write(fd, str, strlen(str));
- if (ret != strlen(str)) {
- perror("write to file failed");
- fprintf(stderr, "filename: '%s' str: '%s'\n", file, str);
- exit(__LINE__);
- }
- close(fd);
-}
-
-#if CONTROL_TRACING > 0
-static int warned_tracing;
-static int tracing_root_ok(void)
-{
- if (geteuid() != 0) {
- if (!warned_tracing)
- fprintf(stderr, "WARNING: not run as root, "
- "can not do tracing control\n");
- warned_tracing = 1;
- return 0;
- }
- return 1;
-}
-#endif
-
-static void tracing_on(void)
-{
-#if CONTROL_TRACING > 0
-#define TRACEDIR "/sys/kernel/tracing"
- char pidstr[32];
-
- if (!tracing_root_ok())
- return;
-
- sprintf(pidstr, "%d", getpid());
- cat_into_file("0", TRACEDIR "/tracing_on");
- cat_into_file("\n", TRACEDIR "/trace");
- if (1) {
- cat_into_file("function_graph", TRACEDIR "/current_tracer");
- cat_into_file("1", TRACEDIR "/options/funcgraph-proc");
- } else {
- cat_into_file("nop", TRACEDIR "/current_tracer");
- }
- cat_into_file(pidstr, TRACEDIR "/set_ftrace_pid");
- cat_into_file("1", TRACEDIR "/tracing_on");
- dprintf1("enabled tracing\n");
-#endif
-}
-
-static void tracing_off(void)
-{
-#if CONTROL_TRACING > 0
- if (!tracing_root_ok())
- return;
- cat_into_file("0", "/sys/kernel/tracing/tracing_on");
-#endif
-}
-
-void abort_hooks(void)
-{
- fprintf(stderr, "running %s()...\n", __func__);
- tracing_off();
-#ifdef SLEEP_ON_ABORT
- sleep(SLEEP_ON_ABORT);
-#endif
-}
-
/*
* This attempts to have roughly a page of instructions followed by a few
* instructions that do a write, and another page of instructions. That
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] selftests/mm: add missing mmap() return checks in pkey tests
2026-05-25 7:30 [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Hongfu Li
2026-05-25 7:30 ` [PATCH v2 1/2] selftests/mm: refactor pkey test helpers and unify assertions Hongfu Li
@ 2026-05-25 7:30 ` Hongfu Li
2026-05-25 20:02 ` [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Andrew Morton
2 siblings, 0 replies; 7+ messages in thread
From: Hongfu Li @ 2026-05-25 7:30 UTC (permalink / raw)
To: akpm, david, ljs, liam, vbabka, rppt, surenb, mhocko, shuah
Cc: linux-mm, linux-kselftest, linux-kernel, Hongfu Li
Add missing checks against mmap() return value, replace (void *)-1
with MAP_FAILED for better readability and consistency.
In the unsupported pkeys CPU test path, replace assert() with an
explicit MAP_FAILED check that provides a clearer error message on
failure.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
tools/testing/selftests/mm/pkey-powerpc.h | 2 +-
.../testing/selftests/mm/pkey_sighandler_tests.c | 2 ++
tools/testing/selftests/mm/protection_keys.c | 16 ++++++++++------
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/mm/pkey-powerpc.h b/tools/testing/selftests/mm/pkey-powerpc.h
index 17bf2d1b0192..f482b1abcf55 100644
--- a/tools/testing/selftests/mm/pkey-powerpc.h
+++ b/tools/testing/selftests/mm/pkey-powerpc.h
@@ -126,7 +126,7 @@ static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 p
size, prot, pkey);
pkey_assert(pkey < NR_PKEYS);
ptr = mmap(NULL, size, prot, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
- pkey_assert(ptr != (void *)-1);
+ pkey_assert(ptr != MAP_FAILED);
ret = syscall(__NR_subpage_prot, ptr, size, NULL);
if (ret) {
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c
index a390d183ebdc..eb7893ac6ebf 100644
--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c
+++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -320,6 +320,7 @@ static void test_sigsegv_handler_with_different_pkey_for_stack(void)
/* Set up alternate signal stack that will use the default MPK */
sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ pkey_assert(sigstack.ss_sp != MAP_FAILED);
sigstack.ss_flags = 0;
sigstack.ss_size = STACK_SIZE;
@@ -493,6 +494,7 @@ static void test_pkru_sigreturn(void)
/* Set up alternate signal stack that will use the default MPK */
sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ pkey_assert(sigstack.ss_sp != MAP_FAILED);
sigstack.ss_flags = 0;
sigstack.ss_size = STACK_SIZE;
diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c
index 3c0cbf8f3eaa..ae474e65f3aa 100644
--- a/tools/testing/selftests/mm/protection_keys.c
+++ b/tools/testing/selftests/mm/protection_keys.c
@@ -585,7 +585,7 @@ static void *malloc_pkey_with_mprotect(long size, int prot, u16 pkey)
size, prot, pkey);
pkey_assert(pkey < NR_PKEYS);
ptr = mmap(NULL, size, prot, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
- pkey_assert(ptr != (void *)-1);
+ pkey_assert(ptr != MAP_FAILED);
ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey);
pkey_assert(!ret);
record_pkey_malloc(ptr, size, prot);
@@ -608,7 +608,7 @@ static void *malloc_pkey_anon_huge(long size, int prot, u16 pkey)
*/
size = ALIGN_UP(size, HPAGE_SIZE * 2);
ptr = mmap(NULL, size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
- pkey_assert(ptr != (void *)-1);
+ pkey_assert(ptr != MAP_FAILED);
record_pkey_malloc(ptr, size, prot);
mprotect_pkey(ptr, size, prot, pkey);
@@ -688,7 +688,7 @@ static void *malloc_pkey_hugetlb(long size, int prot, u16 pkey)
size = ALIGN_UP(size, HPAGE_SIZE * 2);
pkey_assert(pkey < NR_PKEYS);
ptr = mmap(NULL, size, PROT_NONE, flags, -1, 0);
- pkey_assert(ptr != (void *)-1);
+ pkey_assert(ptr != MAP_FAILED);
mprotect_pkey(ptr, size, prot, pkey);
record_pkey_malloc(ptr, size, prot);
@@ -717,7 +717,7 @@ static void *malloc_pkey(long size, int prot, u16 pkey)
pkey_assert(malloc_type < nr_malloc_types);
ret = pkey_malloc[malloc_type](size, prot, pkey);
- pkey_assert(ret != (void *)-1);
+ pkey_assert(ret != MAP_FAILED);
malloc_type++;
if (malloc_type >= nr_malloc_types)
@@ -1135,6 +1135,7 @@ static void arch_force_pkey_reg_init(void)
* doing the XSAVE size enumeration dance.
*/
buf = mmap(NULL, 1*MB, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+ pkey_assert(buf != MAP_FAILED);
/* These __builtins require compiling with -mxsave */
@@ -1693,7 +1694,10 @@ int main(void)
printf("running PKEY tests for unsupported CPU/OS\n");
ptr = mmap(NULL, size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
- assert(ptr != (void *)-1);
+ if (ptr == MAP_FAILED) {
+ perror("mmap");
+ return EXIT_FAILURE;
+ }
test_mprotect_pkey_on_unsupported_cpu(ptr, 1);
exit(0);
}
@@ -1706,5 +1710,5 @@ int main(void)
run_tests_once();
printf("done (all tests OK)\n");
- return 0;
+ return EXIT_SUCCESS;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling
2026-05-25 7:30 [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Hongfu Li
2026-05-25 7:30 ` [PATCH v2 1/2] selftests/mm: refactor pkey test helpers and unify assertions Hongfu Li
2026-05-25 7:30 ` [PATCH v2 2/2] selftests/mm: add missing mmap() return checks in pkey tests Hongfu Li
@ 2026-05-25 20:02 ` Andrew Morton
2026-05-26 7:05 ` Hongfu Li
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2026-05-25 20:02 UTC (permalink / raw)
To: Hongfu Li
Cc: david, ljs, liam, vbabka, rppt, surenb, mhocko, shuah, linux-mm,
linux-kselftest, linux-kernel
On Mon, 25 May 2026 15:30:24 +0800 Hongfu Li <lihongfu@kylinos.cn> wrote:
> This series is version 2 of the previous patch [0]. In v2, the changes are
> split into two patches for easier review.
> [0] https://lore.kernel.org/all/20260518082120.3890552-1-lihongfu@kylinos.cn/
>
> The main changes in this series are to refactor shared tracing and assertion
> helpers into a common file, unify both pkey selftests on pkey_assert() and
> per-test tracing for consistent diagnostics, and add missing mmap() return
> checks with MAP_FAILED used throughout for readability and consistency.
Thanks. AI review seems to have found a legitimate problem:
https://sashiko.dev/#/patchset/20260525073026.27594-1-lihongfu@kylinos.cn
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling
2026-05-25 20:02 ` [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Andrew Morton
@ 2026-05-26 7:05 ` Hongfu Li
2026-05-27 16:24 ` Lorenzo Stoakes
0 siblings, 1 reply; 7+ messages in thread
From: Hongfu Li @ 2026-05-26 7:05 UTC (permalink / raw)
To: akpm
Cc: david, liam, lihongfu, linux-kernel, linux-kselftest, linux-mm,
ljs, mhocko, rppt, shuah, surenb, vbabka
> > This series is version 2 of the previous patch [0]. In v2, the changes are
> > split into two patches for easier review.
> > [0] https://lore.kernel.org/all/20260518082120.3890552-1-lihongfu@kylinos.cn/
> >
> > The main changes in this series are to refactor shared tracing and assertion
> > helpers into a common file, unify both pkey selftests on pkey_assert() and
> > per-test tracing for consistent diagnostics, and add missing mmap() return
> > checks with MAP_FAILED used throughout for readability and consistency.
>
> Thanks. AI review seems to have found a legitimate problem:
> https://sashiko.dev/#/patchset/20260525073026.27594-1-lihongfu@kylinos.cn
Thanks. I'll go through the problem reported by the AI review and make
corresponding fixes in v2.
Best regards,
Hongfu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling
2026-05-26 7:05 ` Hongfu Li
@ 2026-05-27 16:24 ` Lorenzo Stoakes
2026-05-28 8:29 ` Hongfu Li
0 siblings, 1 reply; 7+ messages in thread
From: Lorenzo Stoakes @ 2026-05-27 16:24 UTC (permalink / raw)
To: Hongfu Li
Cc: akpm, david, liam, linux-kernel, linux-kselftest, linux-mm,
mhocko, rppt, shuah, surenb, vbabka
On Tue, May 26, 2026 at 03:05:18PM +0800, Hongfu Li wrote:
> > > This series is version 2 of the previous patch [0]. In v2, the changes are
> > > split into two patches for easier review.
> > > [0] https://lore.kernel.org/all/20260518082120.3890552-1-lihongfu@kylinos.cn/
> > >
> > > The main changes in this series are to refactor shared tracing and assertion
> > > helpers into a common file, unify both pkey selftests on pkey_assert() and
> > > per-test tracing for consistent diagnostics, and add missing mmap() return
> > > checks with MAP_FAILED used throughout for readability and consistency.
> >
> > Thanks. AI review seems to have found a legitimate problem:
> > https://sashiko.dev/#/patchset/20260525073026.27594-1-lihongfu@kylinos.cn
>
> Thanks. I'll go through the problem reported by the AI review and make
> corresponding fixes in v2.
You mean v3? :P
>
> Best regards,
> Hongfu
>
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling
2026-05-27 16:24 ` Lorenzo Stoakes
@ 2026-05-28 8:29 ` Hongfu Li
0 siblings, 0 replies; 7+ messages in thread
From: Hongfu Li @ 2026-05-28 8:29 UTC (permalink / raw)
To: ljs
Cc: akpm, david, liam, lihongfu, linux-kernel, linux-kselftest,
linux-mm, mhocko, rppt, shuah, surenb, vbabka
> > > > This series is version 2 of the previous patch [0]. In v2, the changes are
> > > > split into two patches for easier review.
> > > > [0] https://lore.kernel.org/all/20260518082120.3890552-1-lihongfu@kylinos.cn/
> > > >
> > > > The main changes in this series are to refactor shared tracing and assertion
> > > > helpers into a common file, unify both pkey selftests on pkey_assert() and
> > > > per-test tracing for consistent diagnostics, and add missing mmap() return
> > > > checks with MAP_FAILED used throughout for readability and consistency.
> > >
> > > Thanks. AI review seems to have found a legitimate problem:
> > > https://sashiko.dev/#/patchset/20260525073026.27594-1-lihongfu@kylinos.cn
> >
> > Thanks. I'll go through the problem reported by the AI review and make
> > corresponding fixes in v2.
>
> You mean v3? :P
Oh sorry, my mistake. It should be v3, and I've already sent it out.
Here is the link:
https://lore.kernel.org/all/20260527013825.1134225-1-lihongfu@kylinos.cn/
Best regards,
Hongfu
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-05-28 8:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25 7:30 [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Hongfu Li
2026-05-25 7:30 ` [PATCH v2 1/2] selftests/mm: refactor pkey test helpers and unify assertions Hongfu Li
2026-05-25 7:30 ` [PATCH v2 2/2] selftests/mm: add missing mmap() return checks in pkey tests Hongfu Li
2026-05-25 20:02 ` [PATCH v2 0/2] selftests/mm: refactor pkey helpers and fix mmap error handling Andrew Morton
2026-05-26 7:05 ` Hongfu Li
2026-05-27 16:24 ` Lorenzo Stoakes
2026-05-28 8:29 ` Hongfu Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.