tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kaslr: better rng



Le 14/11/2017 à 19:33, Thor Lancelot Simon a écrit :
On Tue, Nov 14, 2017 at 02:25:00PM +0100, Maxime Villard wrote:
Le 11/11/2017 ?? 22:23, Taylor R Campbell a ??crit :
Can you just use the SHA1 in libkern (and the SHA3 that will with any
luck soon be in libkern), or are there constraints on the size of the
prekern that prevent you from doing so?

No, there are no constraints. I just didn't know we could use libkern. So you
can forget about my prng.c, I'll use libkern's SHA512 until we have SHA3.


Le 12/11/2017 ?? 03:13, Thor Lancelot Simon a ??crit :
cpu_rng already has the code needed to do this -- best to use it, perhaps?

This would mean moving cpu_rng into libkern?

Maybe so.  I guess there is MD stuff in libkern already.  Only thing is,
looking at the code to remind myself what I did, it relies on our cpu_features
mechanism.  But if you look at the code, it's very, very simple, just a
few lines really to do the work -- in this very particular case perhaps you
would be justified to duplicate it.

I'll duplicate it. By the way I don't need a PRNG in the bootloader anymore,
so I'll just add one in the prekern.

Maxime


Home | Main Index | Thread Index | Old Index