Skip to content

Commit b66f868

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: EC: Mark the ec_sys write_support param as module_param_hw()
Using write_support=1 with the ec_sys module changes the mode of the "io" debugfs file to 0600. This will cause any attempts to access it under a kernel in lockdown mode to return -EPERM, which makes the entire ec_sys module unusable. Use the special module_param_hw() macro for module parameters which may not be used while in lockdown mode, to avoid this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent befd9b5 commit b66f868

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/acpi/ec_sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MODULE_DESCRIPTION("ACPI EC sysfs access driver");
1919
MODULE_LICENSE("GPL");
2020

2121
static bool write_support;
22-
module_param(write_support, bool, 0644);
22+
module_param_hw(write_support, bool, other, 0644);
2323
MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "
2424
"be needed.");
2525

0 commit comments

Comments
 (0)