]> git.baikalelectronics.ru Git - kernel.git/commit
x86, kaslr: Add a circular multiply for better bit diffusion
authorH. Peter Anvin <hpa@zytor.com>
Tue, 12 Nov 2013 06:45:20 +0000 (22:45 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 12 Nov 2013 07:05:49 +0000 (23:05 -0800)
commitf645413dd1f4ba9d4621739be1cd459d35b2039f
treebf3b408a92ba327ce264a47ee1bb30417feaf5d5
parent23bbbf603e5074830a17868a3b5927ca847e92be
x86, kaslr: Add a circular multiply for better bit diffusion

If we don't have RDRAND (in which case nothing else *should* matter),
most sources have a highly biased entropy distribution.  Use a
circular multiply to diffuse the entropic bits.  A circular multiply
is a good operation for this: it is cheap on standard hardware and
because it is symmetric (unlike an ordinary multiply) it doesn't
introduce its own bias.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/20131111222839.GA28616@www.outflux.net
arch/x86/boot/compressed/aslr.c