From: Thomas Weißschuh Date: Mon, 4 May 2026 10:43:40 +0000 (+0200) Subject: vsprintf: Only export no_hash_pointers to test module X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d1c9b60b6d7bb6ac973e9fb3f430618ab237ea9b;p=thirdparty%2Fkernel%2Flinux.git vsprintf: Only export no_hash_pointers to test module 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 --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 9f359b31c8d1c..cbcc47bf85109 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