Re: [PATCH v8 0/3] x86/boot/KASLR: Parse ACPI table and limit kaslr in immovable memory

From: Masayoshi Mizuma
Date: Tue Nov 06 2018 - 14:36:51 EST


On Tue, Nov 06, 2018 at 07:45:19PM +0100, Borislav Petkov wrote:
> Ok, having swapped the whole thing back into my brain, forget what I
> said earlier today.
>
> Didn't we talk about passing info with setup_data to the later kernel
> stage? You even had a patch:
>
> https://lkml.kernel.org/r/20181022154204.kagmdb55jtoez4ca@gabell
>
> So what is that "idea" again about adding SRAT parsing code to
> arch/x86/mm/kaslr.c?!?!
>
> The intent of passing info with setup_data is to *avoid* parsing SRAT
> yet another time and duplicating that code one more time.
>
> IOW:
>
> * The first place that needs SRAT parsing, does the parsing - i.e., the
> compressed stage.
>
> * Later stages get information passed to them with setup_data. No second
> parsing.
>
> Ok?

Yes, I think I can see what you are saying. However, I'm not sure how
I use the setup_data in legacy BIOS environment. So, I said the another
idea which adding the SRAT parsing code to arch/x86/mm/kaslr.c as well.
Yes, as you said, that is not so good...

I would appreciate if you could help to use setup_data or something to
pass the information to later kernel stage in BIOS environment.

Thanks,
Masa