Skip to content

Commit

Permalink
ACPI: EC: Mark the ec_sys write_support param as module_param_hw()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Rafael J. Wysocki committed Dec 1, 2021
1 parent befd9b5 commit b66f868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/ec_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MODULE_DESCRIPTION("ACPI EC sysfs access driver");
MODULE_LICENSE("GPL");

static bool write_support;
module_param(write_support, bool, 0644);
module_param_hw(write_support, bool, other, 0644);
MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "
"be needed.");

Expand Down

0 comments on commit b66f868

Please sign in to comment.