linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Timur Tabi <timur@kernel.org>
Cc: Kees Cook <keescook@chromium.org>, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	linux-kernel@vger.kernel.org, vbabka@suse.cz, linux-mm@kvack.org,
	willy@infradead.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, roman.fietze@magna.com,
	john.ogness@linutronix.de,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	akinobu.mita@gmail.com
Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed
Date: Wed, 3 Feb 2021 17:38:08 -0500	[thread overview]
Message-ID: <20210203173808.03737e03@gandalf.local.home> (raw)
In-Reply-To: <a6556624-71d5-e689-5273-693c69c77c9e@kernel.org>

On Wed, 3 Feb 2021 15:56:20 -0600
Timur Tabi <timur@kernel.org> wrote:

> On 2/3/21 2:47 PM, Steven Rostedt wrote:
> >   static void __init
> >   plain(void)
> >   {
> >   	int err;
> >   
> > +	if (debug_never_hash_pointers)
> > +		return;  
> 
> So, I have a stupid question.  What's the best way for test_printf.c to 
> read the command line parameter?  Should I just do this in vsprintf.c:
> 
> /* Disable pointer hashing if requested */
> static bool debug_never_hash_pointers __ro_after_init;

It wont be static.

> EXPORT_SYMBOL_GPL(debug_never_hash_pointers);
> 
> I'm not crazy about exporting this variable to other drivers.  It could 
> be used to disable hashing by any driver.

But it is set as "__ro_after_init". That is, every module will see it as
read only. IOW, they wont be able to modify it.

> 
> AFAIK, the only command-line parameter code that works in drivers is 
> module_parm, and that expects the module prefix on the command-line.

This is just a constant variable for others to see. The command line itself
is visible (see saved_command_line, it's even exported to modules in sparc).


-- Steve


  reply	other threads:[~2021-02-03 22:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 21:36 [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed Timur Tabi
2021-02-03  3:24 ` Sergey Senozhatsky
2021-02-03  3:30   ` Randy Dunlap
2021-02-03  9:54 ` Petr Mladek
2021-02-03 13:31   ` Petr Mladek
2021-02-03 18:58     ` Timur Tabi
2021-02-03 19:30       ` Andy Shevchenko
2021-02-03 20:02       ` Kees Cook
2021-02-03 20:25         ` Steven Rostedt
2021-02-03 20:35           ` Kees Cook
2021-02-03 20:47             ` Steven Rostedt
2021-02-03 21:56               ` Timur Tabi
2021-02-03 22:38                 ` Steven Rostedt [this message]
2021-02-04  9:36               ` Petr Mladek
2021-02-05 10:59 ` Vlastimil Babka
2021-02-05 18:25   ` Timur Tabi
2021-02-10  0:24     ` Kees Cook
2021-02-09 21:59 ` Marco Elver
2021-02-09 22:15   ` Timur Tabi

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=20210203173808.03737e03@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=john.ogness@linutronix.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    --cc=roman.fietze@magna.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=timur@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).