lkml.org 
[lkml]   [2022]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH tip v8] x86/setup: Use rng seeds from setup_data
From
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)

-hpa

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