|| ||Linus Torvalds <torvalds-AT-linux-foundation.org> |
|| ||Matt Mackall <mpm-AT-selenic.com> |
|| ||Re: [Security] [PATCH] proc: avoid information leaks to non-privileged
|| ||Thu, 7 May 2009 10:53:49 -0700 (PDT)|
|| ||Florian Weimer <fweimer-AT-bfk.de>, security-AT-kernel.org,
Roland McGrath <roland-AT-redhat.com>,
Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org>,
Eric Paris <eparis-AT-redhat.com>, Jake Edge <jake-AT-lwn.net>,
"Eric W. Biederman" <ebiederm-AT-xmission.com>,
Dave Jones <davej-AT-redhat.com>,
James Morris <jmorris-AT-namei.org>,
Andrew Morton <akpm-AT-linux-foundation.org>,
Alan Cox <alan-AT-lxorguk.ukuu.org.uk>,
Arjan van de Ven <arjan-AT-infradead.org>|
|| ||Article, Thread
On Thu, 7 May 2009, Matt Mackall wrote:
> We have a better hash function handy, and it's only takes twice as long.
Matt, I really don't like your notion of "only twice as long".
I mean, really. In the kernel, we tend to never even talk about how many
_times_ slower something is. We talk about cycles or small percentages.
The fact is, the current "get_random_int()" is a joke, and will return the
same value over and over again for long stretches of time. I mean, really.
Even people who don't care a lot would expect more than _that_ out of a
And quite frankly, a lot of the users of get_random_int() probably use it
not as some crypto function, but as a replacement for not having to write
their own copy of some standard PRNG linear congruential generator.
I mean, really. The virtual address randomization was never meant to be
"cryptographically secure" in that sense. Dammit, look at the code: it
only takes something like 8 bits of the results _anyway_.
In other words, YOUR WHOLE ARGUMENT IS TOTALLY INSANE. You talk about
"cryptographically secure hashes" for some 8-bit value. Listen to
yourself. At that point, any cryptographer will just ridicule you. There's
no point in trying to break the randomness, because you'll be much better
off just trying a lot of different values.
So Matt, get with the program already. Don't ignore the performance
argument by saying "it's only twice as slow". Admit it - that's just
If somebody _really_ wants true randomness, teach them to use
"get_random_bytes()" by all means.
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
to post comments)