70fa099
From b46d1094a9e2f858f2bb829b9137c41604265faa Mon Sep 17 00:00:00 2001
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
6a91557
index 3abe9b223ba7..ee8f11cf65da 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>
6a91557
@@ -245,7 +246,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
-- 
6a91557
1.9.3
6a91557