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: <CA+rthh89rYOyUd58vJO_0Nu_j+zrAMwUYSitRbT=MVoz9pO5Lw@mail.gmail.com>
Date:	Tue, 24 Jun 2014 22:41:32 +0200
From:	Mathias Krause <minipli@...glemail.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Rasmus Villemoes <linux@...musvillemoes.dk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [RFC PATCH 0/3] Mark literal strings in __init / __exit code

On 24 June 2014 22:30, Joe Perches <joe@...ches.com> wrote:
> On Tue, 2014-06-24 at 22:10 +0200, Mathias Krause wrote:
>> I would like to handle the easy ones, too. E.g. strings used in
>> parameter parsing, i.e. strcmp()s.
>
> Sure, but that change is separable from printk conversions.

Yes. Those need to be marked manually, based on auditing the code for
reuses of those strings in non-init code.

>
> Any idea how much would be changed treewide and whether
> or not those strings are not already in rodata?

No, sorry. I haven't looked for those specifically yet. There is even
more to look for: calls to panic() in __init code, or the name of
kmem_cache_create() -- it get's copied. So there is more to optimize
if one is patient enough ;)
And all of those strings should be in the .rodata section, now. But
why you're asking?

>
> Looking at it, I see generic strings like "on", "off",
> "device", "high", "low".  All these are likely to be
> duplications of strings in rodata.

Yes. My vanilla vmlinux build has quite a lot of copies of "off" in
it. But I doubt any linker would merge those. Does LTO do so?

Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ