[PATCH v2 0/2] vsprintf: Add test for restricted kernel pointers
From: Thomas Weißschuh
Date: Mon May 04 2026 - 06:43:59 EST
Fill out the tests for restricted kernel pointers, using the %pK format.
---
Changes in v2:
- Restrict the visibility of no_hash_pointers.
- Handle printf_kunit being a module.
- Add note about KUnit capabilities for kptr_restrict==1.
- Link to v1: https://lore.kernel.org/r/20260114-restricted-pointers-kunit-test-v1-1-a9d8a49c6b6f@xxxxxxxxxxxxx
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
To: Petr Mladek <pmladek@xxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
To: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
To: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
Thomas Weißschuh (2):
vsprintf: Only export no_hash_pointers to test module
vsprintf: Add test for restricted kernel pointers
lib/tests/printf_kunit.c | 22 +++++++++++++++++++++-
lib/vsprintf.c | 7 ++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260109-restricted-pointers-kunit-test-ff4ec887bcd8
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>