From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 561F133067C for ; Thu, 14 May 2026 11:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778759891; cv=none; b=nUT6epgr5qNFApaii+EKobAScbnu1xAeyjFFMnetoFpoT4tWqI63q1yI8aIZxvybXJdArb9KbPX6K1DyNurUCmlscdFTiVhZeoTr25Gt+weQpGD8ZwTbTVKz/8eXPRwUJWRCXeDWsUiaXDguKC+5im7gRe8KSYrc+k6h7FJcnKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778759891; c=relaxed/simple; bh=OMaRlViGiY/wIHLW7iWgYKrqbOQL0bPXYvU/Qptyx2A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bgHRJpjk4Z+RyxTaZB6M4flf5T3Mv6a+8k7k/K5PHmY+gOuYbvuoRlnsNz2qlGOJo0mcJWSOpyvZLd10xbpXY0DRyKJSo+D5x2x4W7LCRvRvOoke8Byl+iukcddDxtaMR9/9lrEuYi9FG7wXBm6RF3Hfs4H8K2h/j/cDAfZcylA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=WbrXckxH; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="WbrXckxH" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-44e1ebb3122so4207758f8f.2 for ; Thu, 14 May 2026 04:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778759889; x=1779364689; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=K/z0fnGFWQpUQb9WS7sCCAXj/OWxblbNslqHrVMFUHc=; b=WbrXckxH+wxmh+hwa0EgTiOAXF3rgqXsM/mQ/bBrXvPW7mSe+vCAt/seB6kPCtMT+h dxZGKnZuvvymc+ZttqvKJvzh+WTW85onzW+03sJWsMsx3MPmHgdclT5/dMcurmlgpPoS UYioKqXfru4FRb7yauWHS5O2W40ofZ//P1eI1mwQLhOq7+nyN0Smf0IsGX23CBPxLhAt QwFe0dpklAcEKMBzLlJe/CXxiDhRi5iByk8FZtYk4RwHJJ3iZ3iyhFtrdhzldgYAYv1a QivLPXJHglHr5lodBKnJqkhrLCth2xZKpQ/ZRmRGK6ISoJ2FHykFwQLPy44fKuYsjZ0e 0jkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778759889; x=1779364689; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K/z0fnGFWQpUQb9WS7sCCAXj/OWxblbNslqHrVMFUHc=; b=M8z+CM9FXGPljG5HtTXNntpPkQCuJ8gIceWaljEayZc41eJstS0t2bYC/ehhd3YcKb IVuEUvd+UoYK89g6r1dUxqVv+rjN/yjmcMg0dkBXZieq73CeFPHv7ydnkFCC8HayXCCH +T24nNnAKncnA+j0AVHDtXrT1VHHgkWMo//bbK2aIM0P+Y4dU88Lr+wcotVzlmTCE3UW RVDI/ckH3OMB3vbhiFs4gkVYMT533vD9WQmrHNjSb+zitscqbx3ZcLp9rl11EuaRuUsR 4uboJGReYc7Nf1vetm0q0tugWPIisEOeREjRdiexPqoC6+cco8dxOcvTG6M+08f26eW9 /RyA== X-Forwarded-Encrypted: i=1; AFNElJ+hllTBTsWiys8UbcJX2G8ko4DpjIC09ZAwdmcgZzuXV/Jay1YQyS6uFJ71D9ljrtgGO+K7w2gJsinlSp8=@vger.kernel.org X-Gm-Message-State: AOJu0YyU8eFB03LW7xAo6EI0MTJdkTx0VsOuaLr2oQ1iQ8JCc3p3bvOb 9d51eRVLXGf4smVLOC+w7XfL4vWFm0R51mDVqsq75FF4w+duMgqzgej/FSdHrU8aOsJXIF4xpIg qfIVQ X-Gm-Gg: Acq92OFyQrfpG/NJxNu0hh0RjUuD4pBI/lu5hje7xE+qR/Pufbdq3lnS4koGpWHdSdX jBv4wbpmCR1sVCXPVJHIz2LjBvski0kjt0RFWnx/CViYm4oeUQfoe+eK2JtzWA0Qlg6SvmzRSky oCqfCWyhkBvBRQC+pyAweAwoFUOW/+VIjErpsP8XqkJW9Ccd6otGzcDy6teS5Ms/d0Ifc/0zk3w tIRmR3mM5ejnRa2N67pYooOGjPsagPua0HuP3FUTTenK4xMujaokL8hMi5Rkl1eJp06mh0kJ5FP 3sdCiAloaKPx8wjCb/4/cYF4XCdXHVTPDx4+vSIEzvvVvVODiwPOlvv8RuLD9tCuQD8qWwFn9Vq +Sg4eOe0XzwTi+yypMd64SVbi6DQNcoQ1bLr9UjHwklHb8CeCmxZ1/ZHXUOubdWr5R/FYQNh/YS e3izXnpCeLUaIfn20rmgsP7lkWBw== X-Received: by 2002:a05:6000:18a5:b0:43c:d665:3830 with SMTP id ffacd0b85a97d-45c5a78259dmr12242629f8f.32.1778759888756; Thu, 14 May 2026 04:58:08 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ed30110sm6649691f8f.13.2026.05.14.04.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 04:58:08 -0700 (PDT) Date: Thu, 14 May 2026 13:58:06 +0200 From: Petr Mladek To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Andy Shevchenko , Andrew Morton , Steven Rostedt , Rasmus Villemoes , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module Message-ID: References: <20260504-restricted-pointers-kunit-test-v2-0-19e8b1c0fbeb@linutronix.de> <20260504-restricted-pointers-kunit-test-v2-1-19e8b1c0fbeb@linutronix.de> <20260504135014-f477a0fe-1af6-4a85-9259-3056a13c0d1f@linutronix.de> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260504135014-f477a0fe-1af6-4a85-9259-3056a13c0d1f@linutronix.de> On Mon 2026-05-04 13:53:47, Thomas Weißschuh wrote: > On Mon, May 04, 2026 at 01:57:31PM +0300, Andy Shevchenko wrote: > > On Mon, May 04, 2026 at 12:43:40PM +0200, Thomas Weißschuh wrote: > > > Aside from the printf test module, no module should ever use this symbol. > > > > ... > > > > > -EXPORT_SYMBOL_GPL(no_hash_pointers); > > > > > +#if IS_MODULE(CONFIG_PRINTF_KUNIT_TEST) > > > +EXPORT_SYMBOL_FOR_MODULES(no_hash_pointers, "printf_kunit"); > > > +#endif > > > > But do we need that ugly ifdeffery? the infrastructure should handle that. > > Where does the generic infrastructure take the kconfig option into account? My understanding is that it does not harm when the symbol is exported even when the related module is built-in or not built at all. The important thing is that it is exported only for this particular module (name). BTW: I have just tried to remove the ifdeffery and use a built-in printf_kunit and it works fine. > > (Also, if I build a module separately after the kernel, it won't work.) > > Only if it was not enabled when the kernel was built. > > But if people are unhappy with the ifdeffery, I'm fine with dropping it. > It is not a hard requirement at all. Yeah, I would prefer to remove the ifdeffery. It does not look worth it. Without the ifdeffery: Reviewed-by: Petr Mladek Tested-by: Petr Mladek Best Regards, Petr PS: No need to send v3, I could remove the ifdeffery when pushing the patch.