0f09adf
From: Josh Boyer <jwboyer@redhat.com>
0f09adf
Date: Mon, 25 Jun 2012 19:57:30 -0400
0f09adf
Subject: [PATCH] acpi: Ignore acpi_rsdp kernel parameter when module loading
0f09adf
 is restricted
0f09adf
0f09adf
This option allows userspace to pass the RSDP address to the kernel, which
0f09adf
makes it possible for a user to circumvent any restrictions imposed on
0f09adf
loading modules. Disable it in that case.
0f09adf
0f09adf
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
0f09adf
---
0f09adf
 drivers/acpi/osl.c | 3 ++-
0f09adf
 1 file changed, 2 insertions(+), 1 deletion(-)
0f09adf
0f09adf
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
0f09adf
index 3abe9b223ba7..ee8f11cf65da 100644
0f09adf
--- a/drivers/acpi/osl.c
0f09adf
+++ b/drivers/acpi/osl.c
0f09adf
@@ -44,6 +44,7 @@
0f09adf
 #include <linux/list.h>
0f09adf
 #include <linux/jiffies.h>
0f09adf
 #include <linux/semaphore.h>
0f09adf
+#include <linux/module.h>
0f09adf
 
0f09adf
 #include <asm/io.h>
0f09adf
 #include <asm/uaccess.h>
0f09adf
@@ -245,7 +246,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp);
0f09adf
 acpi_physical_address __init acpi_os_get_root_pointer(void)
0f09adf
 {
0f09adf
 #ifdef CONFIG_KEXEC
0f09adf
-	if (acpi_rsdp)
0f09adf
+	if (acpi_rsdp && !secure_modules())
0f09adf
 		return acpi_rsdp;
0f09adf
 #endif
0f09adf
 
0f09adf
-- 
0f09adf
1.9.3
0f09adf