diff options
author | Seth Forshee <seth.forshee@canonical.com> | 2013-03-11 16:17:50 -0500 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-03-21 12:43:46 +0000 |
commit | ec0971ba5372a4dfa753f232449d23a8fd98490e (patch) | |
tree | 1c364f3e1fbbd75a413edc80c1c237e210e997c0 /drivers/firmware/efivars.c | |
parent | ed9dc8ce7a1c8115dba9483a9b51df8b63a2e0ef (diff) | |
download | linux-stable-ec0971ba5372a4dfa753f232449d23a8fd98490e.tar.gz linux-stable-ec0971ba5372a4dfa753f232449d23a8fd98490e.tar.bz2 linux-stable-ec0971ba5372a4dfa753f232449d23a8fd98490e.zip |
efivars: Add module parameter to disable use as a pstore backend
We know that with some firmware implementations writing too much data to
UEFI variables can lead to bricking machines. Recent changes attempt to
address this issue, but for some it may still be prudent to avoid
writing large amounts of data until the solution has been proven on a
wide variety of hardware.
Crash dumps or other data from pstore can potentially be a large data
source. Add a pstore_module parameter to efivars to allow disabling its
use as a backend for pstore. Also add a config option,
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE, to allow setting the default
value of this paramter to true (i.e. disabled by default).
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r-- | drivers/firmware/efivars.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 37b6f247399e..6607daf5a08d 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -103,6 +103,11 @@ MODULE_VERSION(EFIVARS_VERSION); */ #define GUID_LEN 36 +static bool efivars_pstore_disable = + IS_ENABLED(EFI_VARS_PSTORE_DEFAULT_DISABLE); + +module_param_named(pstore_disable, efivars_pstore_disable, bool, 0644); + /* * The maximum size of VariableName + Data = 1024 * Therefore, it's reasonable to save that much @@ -2009,7 +2014,8 @@ int register_efivars(struct efivars *efivars, if (error) unregister_efivars(efivars); - efivar_pstore_register(efivars); + if (!efivars_pstore_disable) + efivar_pstore_register(efivars); register_filesystem(&efivarfs_type); |