[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW3em-KplLVofU5z@smile.fi.intel.com>
Date: Mon, 19 Jan 2026 09:34:51 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vsprintf: Add test for restricted kernel pointers
On Fri, Jan 16, 2026 at 06:06:59PM +0100, Petr Mladek wrote:
> On Wed 2026-01-14 08:27:34, Thomas Weißschuh wrote:
...
> > Fill out the tests for restricted kernel pointers, using the %pK format.
> > This test can only be executed when built into the kernel, as modules
> > do not have access to the kptr_restrict knob.
>
> I think that we could export "kptr_restrict" like we did
> with no_hash_pointers. AFAIK, it has been exported just because
> of the test module as well.
>
> > Please note that changes to the kptr_restrict sysctl from the kernel
> > commandline are only applied *after* the boot-time KUnit tests run.
>
> This is another motivation to export the symbol. Otherwise, it is
> really hard to test the non-default variants.
>
> BTW: I have recently heard about EXPORT_SYMBOL_NS(). It would allow
> to export the symbol only for some specific modules.
>
> I am not sure how exactly it works. I wonder if there already
> exists a namespace for KUnit tests.
>
> It would be nice to use it, even for "no_hash_pointers"...
This is a variant for really strict use:
EXPORT_SYNBOL_FOR_MODULES().
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists