From d1c9b60b6d7bb6ac973e9fb3f430618ab237ea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 4 May 2026 12:43:40 +0200 Subject: [PATCH] vsprintf: Only export no_hash_pointers to test module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aside from the printf test module, no module should ever use this symbol. Suggested-by: Petr Mladek Link: https://lore.kernel.org/all/aWpwMyFEfpCNN297@pathway.suse.cz/ Suggested-by: Andy Shevchenko Link: https://lore.kernel.org/all/aW3em-KplLVofU5z@smile.fi.intel.com/ Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Mladek Tested-by: Petr Mladek Link: https://patch.msgid.link/20260504-restricted-pointers-kunit-test-v2-1-19e8b1c0fbeb@linutronix.de [pmladek@suse.com: Removed questionable ifdeffery.] Signed-off-by: Petr Mladek --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 9f359b31c8d1..cbcc47bf8510 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -59,7 +59,7 @@ /* Disable pointer hashing if requested */ bool no_hash_pointers __ro_after_init; -EXPORT_SYMBOL_GPL(no_hash_pointers); +EXPORT_SYMBOL_FOR_MODULES(no_hash_pointers, "printf_kunit"); /* * Hashed pointers policy selected by "hash_pointers=..." boot param