lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210203173808.03737e03@gandalf.local.home>
Date:   Wed, 3 Feb 2021 17:38:08 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Timur Tabi <timur@...nel.org>
Cc:     Kees Cook <keescook@...omium.org>, Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-kernel@...r.kernel.org, vbabka@...e.cz, linux-mm@...ck.org,
        willy@...radead.org, akpm@...ux-foundation.org,
        torvalds@...ux-foundation.org, roman.fietze@...na.com,
        john.ogness@...utronix.de,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        akinobu.mita@...il.com
Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks
 all addresses as unhashed

On Wed, 3 Feb 2021 15:56:20 -0600
Timur Tabi <timur@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ