mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Petr Mladek <pmladek@suse.com>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
	"Sergey Senozhatsky" <senozhatsky@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vsprintf: Add test for restricted kernel pointers
Date: Mon, 19 Jan 2026 09:34:51 +0200	[thread overview]
Message-ID: <aW3em-KplLVofU5z@smile.fi.intel.com> (raw)
In-Reply-To: <aWpwMyFEfpCNN297@pathway.suse.cz>

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



  reply	other threads:[~2026-01-19  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14  7:27 Thomas Weißschuh
2026-01-16 17:06 ` Petr Mladek
2026-01-19  7:34   ` Andy Shevchenko [this message]
2026-01-19  7:43   ` Thomas Weißschuh

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=aW3em-KplLVofU5z@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    --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®