From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96E7C21CC4F for ; Mon, 4 May 2026 10:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777891429; cv=none; b=CQRQFtsJVAPU+6rjFZyYVC7zsP1KZvSt/ut0xUjDB5h/Mwr3e263MBj9BiWhuBfwozErODVfJo6Oa1I7hwy7xXTzqzxc+PeZtymMuXCNQ92mV3z/NbI6vbgY0FbKe4z6SWJLP/TseNhAU0a40RCHWycNS57d0q9VUmZW22w84/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777891429; c=relaxed/simple; bh=G/NwhjonqqSmR/FirRofYlGNb0Txdq6OZWjiRo75Ikw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rsPx9PGFIBf0SK77WwQ4Gbmj7USpYOICf8wsHWBRrqzeIEm3LBh55ZSfZiomeefL2kSHq1aaJnTG65aZE5G8uEUn8XBsYYmfQl4QY3M9KiYdVWZtbcsRbRxAQzLEF9Uq+bUv/2mG7vJ9l9DcVQdZb2ub+9/moWomrLfFf15RfM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MqI3WyZ0; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=b/OhIxPD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MqI3WyZ0"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="b/OhIxPD" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777891427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=889+Bze4fxhZZCKhr16iohDBKenwN0EM/ivLny0IVjs=; b=MqI3WyZ0M5nKmzlhdIu7zDu2D/ggmZ+ZY+J9A75yWXhwFiiDUjJ1GRGxHGKEJztFD5Sk+o 56ZDsnVPcOQt0wtpg9liHcbK5vGTFtiA5q8hmyMWMplFj/zfJg50Na581zS32Q/Ef2BKtM J43+Mdq9KOJA2P0xZPN341KAr7jFc3xCi8X+oa8lUkLUeWuE47eSs032vbgFCNu4vFbOI+ 1IyDRQWP0wf5zrCHBiM0BjvyDkn6JYD8764C3jgIpRsV6PVgnTfroeaoAwR/frF0u/U6WX 8SnTukr8Vi+i32xxLxuRDu8V/24ijN+AtxePWc/cpW4+Qf1hl/OxZCCGEyb8GQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777891427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=889+Bze4fxhZZCKhr16iohDBKenwN0EM/ivLny0IVjs=; b=b/OhIxPDxz9iO6Fg+sh8Crc5MsI3LyNaIz0gXOM44YSY1mzPrMnBWoIahESQHSJC6Ou7Fq LURchqKEYf5ltdAQ== Date: Mon, 04 May 2026 12:43:40 +0200 Subject: [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260504-restricted-pointers-kunit-test-v2-1-19e8b1c0fbeb@linutronix.de> References: <20260504-restricted-pointers-kunit-test-v2-0-19e8b1c0fbeb@linutronix.de> In-Reply-To: <20260504-restricted-pointers-kunit-test-v2-0-19e8b1c0fbeb@linutronix.de> To: Andrew Morton , Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1777891425; l=967; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=G/NwhjonqqSmR/FirRofYlGNb0Txdq6OZWjiRo75Ikw=; b=zHO+cXAPIdfsGADmgPu3+97KDqKighxH3RxsThRmSzqvwFEqYH6zfm3mQ/nP2N27wbt+dZnlL V1CzmBoMoLeBO1S4gJiiiHUCSObAFdhvv+7vYoUDj4C1vg9p6L8qb5r X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= 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 --- lib/vsprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 9f359b31c8d1..f70d240a394c 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -59,7 +59,9 @@ /* Disable pointer hashing if requested */ bool no_hash_pointers __ro_after_init; -EXPORT_SYMBOL_GPL(no_hash_pointers); +#if IS_MODULE(CONFIG_PRINTF_KUNIT_TEST) +EXPORT_SYMBOL_FOR_MODULES(no_hash_pointers, "printf_kunit"); +#endif /* * Hashed pointers policy selected by "hash_pointers=..." boot param -- 2.53.0