Re: [PATCH tip v8] x86/setup: Use rng seeds from setup_data

From: Jason A. Donenfeld
Date: Sat Jul 09 2022 - 05:53:52 EST


Hi Borislav,

On Sat, Jul 9, 2022 at 11:49 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Fri, Jul 08, 2022 at 06:51:16PM -0700, H. Peter Anvin wrote:
> > #define SETUP_ENUM_MAX SETUP_RNG_SEED
> > #define SETUP_INDIRECT (1<<31)
> > #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT)
>
> Wait, if we get to add a new number, SETUP_ENUM_MAX and thus
> SETUP_TYPE_MAX will change. And they're uapi too...

Perhaps this is the reason it wasn't bumped earlier from 6 to 8 (this
patch adds 9)? I suspect the primary usage is in .rodata.kernel_info,
though.

Anyway, you now have my v9 which updates the value, and my v8 which
does not. Whichever one, v8 or v9, is fine with me. Maybe you should
take v8 into tip now, and then I'll send a follow up that updates the
values, so it can be reverted separately need-be?

Jason