[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YslN1bo2jnnxl3E3@zx2c4.com>
Date: Sat, 9 Jul 2022 11:43:49 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH tip v8] x86/setup: Use rng seeds from setup_data
Hi Peter,
On Fri, Jul 08, 2022 at 06:51:16PM -0700, H. Peter Anvin wrote:
> On 7/8/22 04:39, Jason A. Donenfeld wrote:
> >
> > diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
> > index ca0796ac4403..2cbfe630230d 100644
> > --- a/arch/x86/include/uapi/asm/bootparam.h
> > +++ b/arch/x86/include/uapi/asm/bootparam.h
> > @@ -12,6 +12,7 @@
> > #define SETUP_JAILHOUSE 6
> > #define SETUP_CC_BLOB 7
> > #define SETUP_IMA 8
> > +#define SETUP_RNG_SEED 9
> >
> > #define SETUP_INDIRECT (1<<31)
> >
>
> Just one miss here: you need to bump SETUP_TYPE_MAX. It is a bit more
> confusing than it needs to be that SETUP_INDIRECT sits in between, and
> honestly I think SETUP_TYPE_MAX shouldn't include the SETUP_INDIRECT
> bit; however, this is uapi and so we can't change that per se.
>
> Perhaps we should do:
>
> #define SETUP_ENUM_MAX SETUP_RNG_SEED
> #define SETUP_INDIRECT (1<<31)
> #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT)
Thanks, nice catch. I'll do exactly that. v+1 incoming.
Jason
Powered by blists - more mailing lists