diff options
author | 2024-01-03 15:40:32 -0300 | |
---|---|---|
committer | 2024-02-22 10:37:21 -0800 | |
commit | a28655c330ab294862cabe66deadb0f85cd4f191 (patch) | |
tree | b67782643031b63498d14d61938bcb5009ae0679 /drivers/firmware/efi/sysfb_efi.c | |
parent | arm64: defconfig: Enable PSTORE_RAM (diff) | |
download | linux-a28655c330ab294862cabe66deadb0f85cd4f191.tar.gz linux-a28655c330ab294862cabe66deadb0f85cd4f191.tar.bz2 linux-a28655c330ab294862cabe66deadb0f85cd4f191.zip |
efi: pstore: Allow dynamic initialization based on module parameter
The efi-pstore module parameter "pstore_disable" warrants that users
are able to deactivate such backend. There is also a Kconfig option
for the default value of this parameter. It was originally added due
to some bad UEFI FW implementations that could break with many variables
written.
Some distros (such as Arch Linux) set this in their config file still
nowadays. And once it is set, even being a writable module parameter,
there is effectively no way to make use of efi-pstore anymore.
If "pstore_disable" is set to true, the init function of the module exits
early and is never called again after the initcall processing.
Let's switch this module parameter to have a callback and perform the
pstore backend registration again each time it's set from Y->N (and
vice-versa). With this, the writable nature of the parameter starts to
make sense, given that users now can switch back to using efi-pstore
or not during runtime by writing into it.
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20240103184053.226203-1-gpiccoli@igalia.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/firmware/efi/sysfb_efi.c')
0 files changed, 0 insertions, 0 deletions