From: Petr Mladek <pmladek@suse.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module
Date: Thu, 14 May 2026 13:58:06 +0200 [thread overview]
Message-ID: <agW4zp-d9lKJ7hL0@pathway.suse.cz> (raw)
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 <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
PS: No need to send v3, I could remove the ifdeffery when pushing the patch.
next prev parent reply other threads:[~2026-05-14 11:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 10:43 [PATCH v2 0/2] vsprintf: Add test for restricted kernel pointers Thomas Weißschuh
2026-05-04 10:43 ` [PATCH v2 1/2] vsprintf: Only export no_hash_pointers to test module Thomas Weißschuh
2026-05-04 10:57 ` Andy Shevchenko
2026-05-04 11:53 ` Thomas Weißschuh
2026-05-04 14:11 ` Andy Shevchenko
2026-05-14 11:58 ` Petr Mladek [this message]
2026-05-18 10:10 ` Thomas Weißschuh
2026-05-04 10:43 ` [PATCH v2 2/2] vsprintf: Add test for restricted kernel pointers Thomas Weißschuh
2026-05-04 10:58 ` Andy Shevchenko
2026-05-14 13:06 ` Petr Mladek
2026-05-21 14:18 ` [PATCH v2 0/2] " Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agW4zp-d9lKJ7hL0@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=thomas.weissschuh@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®