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