diff options
author | 2023-02-10 19:03:46 +1100 | |
---|---|---|
committer | 2023-02-12 22:12:37 +1100 | |
commit | 50a466bf3e6f6f177dc0aeefa46a2f8927075a1d (patch) | |
tree | c495161a8da82cc0f6d95f10ee31d437cf2f9d36 /arch/powerpc/include | |
parent | powerpc/secvar: Extend sysfs to include config vars (diff) | |
download | linux-50a466bf3e6f6f177dc0aeefa46a2f8927075a1d.tar.gz linux-50a466bf3e6f6f177dc0aeefa46a2f8927075a1d.tar.bz2 linux-50a466bf3e6f6f177dc0aeefa46a2f8927075a1d.zip |
powerpc/secvar: Allow backend to populate static list of variable names
Currently, the list of variables is populated by calling
secvar_ops->get_next() repeatedly, which is explicitly modelled on the
OPAL API (including the keylen parameter).
For the upcoming PLPKS backend, we have a static list of variable names.
It is messy to fit that into get_next(), so instead, let the backend put
a NULL-terminated array of variable names into secvar_ops->var_names,
which will be used if get_next() is undefined.
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-12-ajd@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/secvar.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/secvar.h b/arch/powerpc/include/asm/secvar.h index 011a53a8076c..4828e0ab7e3c 100644 --- a/arch/powerpc/include/asm/secvar.h +++ b/arch/powerpc/include/asm/secvar.h @@ -21,6 +21,10 @@ struct secvar_operations { ssize_t (*format)(char *buf, size_t bufsize); int (*max_size)(u64 *max_size); const struct attribute **config_attrs; + + // NULL-terminated array of fixed variable names + // Only used if get_next() isn't provided + const char * const *var_names; }; #ifdef CONFIG_PPC_SECURE_BOOT |