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