lkml.org 
[lkml]   [2022]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-07-09 11:45    [W:0.082 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site