diff mbox

acpi: create CONFIG item for debugfs custom_method

Message ID 20110222193250.GA23913@outflux.net (mailing list archive)
State New, archived
Headers show

Commit Message

Kees Cook Feb. 22, 2011, 7:32 p.m. UTC
None

Comments

Len Brown May 29, 2011, 5:39 a.m. UTC | #1
applied

thanks,
Len Brown, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Len Brown May 29, 2011, 5:51 a.m. UTC | #2
> applied

un-applied - forgot I had Thomas' version already pending.

> thanks,
> Len Brown, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 2aa042a..726b7ea 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -381,6 +381,16 @@  config ACPI_HED
 	  which is used to report some hardware errors notified via
 	  SCI, mainly the corrected errors.
 
+config ACPI_DEBUG_CUSTOM_METHOD
+	bool "Debugging: Custom Method Insertion"
+	depends on DEBUG_FS
+	default n
+	help
+	  This creates the debugfs interface file "acpi/custom_method"
+	  used for loading custom ACPI methods. Note that this allows
+	  arbitrary kernel memory writing by the root user and is not
+	  recommended for normal systems.
+
 source "drivers/acpi/apei/Kconfig"
 
 endif	# ACPI
diff --git a/drivers/acpi/debugfs.c b/drivers/acpi/debugfs.c
index 5df67f1..0240b15 100644
--- a/drivers/acpi/debugfs.c
+++ b/drivers/acpi/debugfs.c
@@ -20,6 +20,7 @@  module_param_named(aml_debug_output, acpi_gbl_enable_aml_debug_object,
 MODULE_PARM_DESC(aml_debug_output,
 		 "To enable/disable the ACPI Debug Object output.");
 
+#ifdef CONFIG_ACPI_DEBUG_CUSTOM_METHOD
 /* /sys/kernel/debug/acpi/custom_method */
 
 static ssize_t cm_write(struct file *file, const char __user * user_buf,
@@ -92,3 +93,4 @@  err:
 		debugfs_remove(acpi_dir);
 	return -EINVAL;
 }
+#endif