Skip to content

Commit 0cc46f1

Browse files
committed
ACPI: Drop the custom_method debugfs interface
The ACPI custom_method debugfs interface is security-sensitive and concurrent access to it is broken [1]. Moreover, the recipe for preparing a customized version of a given control method has changed at one point due to ACPICA changes, which has not been reflected in its documentation, so whoever used it before has had to adapt and it had gone unnoticed for a long time. This interface was a bad idea to start with and its implementation is fragile at the design level. It's been always conceptually questionable, problematic from the security standpoint and implemented poorly. Patches fixing its most apparent functional issues (for example, [2]) don't actually address much of the above. Granted, at the time it was introduced, there was no alternative, but there is the AML debugger in the kernel now and there is the configfs interface allowing custom ACPI tables to be loaded. The former can be used for extensive AML debugging and the latter can be use for testing new AML. [3] Accordingly, drop custom_method along with its (outdated anyway) documentation. Link: https://lore.kernel.org/linux-acpi/20221227063335.61474-1-zh.nvgt@gmail.com/ # [1] Link: https://lore.kernel.org/linux-acpi/20231111132402.4142-1-shiqiang.deng213@gmail.com/ [2] Link: https://stackoverflow.com/questions/62849113/how-to-unload-an-overlay-loaded-using-acpi-config-sysfs # [3] Reported-by: Hang Zhang <zh.nvgt@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Kees Cook <keescook@chromium.org>
1 parent c763aef commit 0cc46f1

File tree

5 files changed

+0
-208
lines changed

5 files changed

+0
-208
lines changed

Documentation/firmware-guide/acpi/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ACPI Support
1414
dsd/phy
1515
enumeration
1616
osi
17-
method-customizing
1817
method-tracing
1918
DSD-properties-rules
2019
debug

Documentation/firmware-guide/acpi/method-customizing.rst

Lines changed: 0 additions & 89 deletions
This file was deleted.

drivers/acpi/Kconfig

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -449,20 +449,6 @@ config ACPI_HED
449449
which is used to report some hardware errors notified via
450450
SCI, mainly the corrected errors.
451451

452-
config ACPI_CUSTOM_METHOD
453-
tristate "Allow ACPI methods to be inserted/replaced at run time"
454-
depends on DEBUG_FS
455-
help
456-
This debug facility allows ACPI AML methods to be inserted and/or
457-
replaced without rebooting the system. For details refer to:
458-
Documentation/firmware-guide/acpi/method-customizing.rst.
459-
460-
NOTE: This option is security sensitive, because it allows arbitrary
461-
kernel memory to be written to by root (uid=0) users, allowing them
462-
to bypass certain security measures (e.g. if root is not allowed to
463-
load additional kernel modules after boot, this feature may be used
464-
to override that restriction).
465-
466452
config ACPI_BGRT
467453
bool "Boottime Graphics Resource Table support"
468454
depends on EFI && (X86 || ARM64)

drivers/acpi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ obj-$(CONFIG_ACPI_SBS) += sbshc.o
101101
obj-$(CONFIG_ACPI_SBS) += sbs.o
102102
obj-$(CONFIG_ACPI_HED) += hed.o
103103
obj-$(CONFIG_ACPI_EC_DEBUGFS) += ec_sys.o
104-
obj-$(CONFIG_ACPI_CUSTOM_METHOD)+= custom_method.o
105104
obj-$(CONFIG_ACPI_BGRT) += bgrt.o
106105
obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o
107106
obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o

drivers/acpi/custom_method.c

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)