From: Matthew Garrett Date: Mon, 9 Sep 2013 22:49:41 +0000 (-0700) Subject: acpi: Ignore acpi_rsdp kernel parameter when securelevel is set X-Git-Tag: v4.1.12-92~310^2~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad0eb71d4366e8375d91ab39c40c30e04eba9171;p=users%2Fjedix%2Flinux-maple.git acpi: Ignore acpi_rsdp kernel parameter when securelevel is set Orabug: 21539498 From: Josh Boyer This option allows userspace to pass the RSDP address to the kernel, which makes it possible for a user to execute arbitrary code in the kernel. Disable this when securelevel is set. Signed-off-by: Josh Boyer Signed-off-by: Santosh Shilimkar --- diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 7ccba395c9ddb..5a2e173cf3158 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -252,7 +253,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); acpi_physical_address __init acpi_os_get_root_pointer(void) { #ifdef CONFIG_KEXEC - if (acpi_rsdp) + if (acpi_rsdp && (get_securelevel() <= 0)) return acpi_rsdp; #endif