Re: [PATCH RFC 1/7] x86/head/64: Mark startup_gdt and startup_gdt_descr as __initdata

From: Josh Poimboeuf
Date: Thu Nov 09 2023 - 19:08:39 EST


On Wed, Oct 18, 2023 at 01:45:40PM +0200, Ingo Molnar wrote:
>
> * H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
> > If the goal is better KASLR, then what we really should spend time on was
> > Kristen Accardi's fgKASLR patches, which not only exponentially(!)
> > increases the randomization entrophy but also *actually* avoids the "one
> > leak and it's over" problem.
>
> Agreed. Going by this version of function-granularity KASLR from 3 years
> ago:
>
> https://lwn.net/Articles/824307/
> https://lwn.net/ml/linux-kernel/20200623172327.5701-1-kristen@xxxxxxxxxxxxxxx/
>
> The fgKASLR feature looks entirely viable to me. Back then I presumed it
> would get iterated beyond v3, and then it fell off my radar. :-/
>
> If Kristen or someone else would like to dust this off & submit a fresh
> version it would be much appreciated!

That actually got up to v10:

https://lkml.kernel.org/lkml/20220209185752.1226407-1-alexandr.lobakin@xxxxxxxxx

Anyway, I'm also very interested in this. If nobody else is working on
it then I could give it a try.

BTW I've wondered if translation-unit granularity would be more
preferable than function granularity due to improved i-cache locality
and (possibly) easier livepatch compatibility.

--
Josh