Re: [PATCH v3] x86, kaslr: mix entropy sources together as needed

2013-11-12 Thread Andy Lutomirski
On 11/11/2013 02:10 PM, H. Peter Anvin wrote: > You probably want to rotate by an odd number of bits... the point is to > spread out any pattern in the bytes. Would it make more sense to just use a real cryptographic hash function? I don't think that any of the real kernel code is available this

Re: [PATCH v3] x86, kaslr: mix entropy sources together as needed

2013-11-11 Thread H. Peter Anvin
You probably want to rotate by an odd number of bits... the point is to spread out any pattern in the bytes. Kees Cook wrote: >Depending on availability, mix the RDRAND and RDTSC entropy together >with >XOR. Only when neither is available should the i8254 be used. Update >the Kconfig documentati

[PATCH v3] x86, kaslr: mix entropy sources together as needed

2013-11-11 Thread Kees Cook
Depending on availability, mix the RDRAND and RDTSC entropy together with XOR. Only when neither is available should the i8254 be used. Update the Kconfig documentation to reflect this. Additionally, since bits used for entropy is masked elsewhere, drop the needless masking in the get_random_long()