acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
authorJosh Boyer <jwboyer@redhat.com>
Wed, 8 Nov 2017 15:11:34 +0000 (15:11 +0000)
committerBastian Blank <waldi@debian.org>
Fri, 22 Jun 2018 09:50:22 +0000 (10:50 +0100)
This option allows userspace to pass the RSDP address to the kernel, which
makes it possible for a user to modify the workings of hardware .  Reject
the option when the kernel is locked down.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: Dave Young <dyoung@redhat.com>
cc: linux-acpi@vger.kernel.org

Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0016-acpi-Ignore-acpi_rsdp-kernel-param-when-the-kernel-h.patch

drivers/acpi/osl.c

index 3bb46cb24a9966ac86b950d53c817e523fe7cd40..3d3b59b97f3156590bd1e8da828103f75f725af4 100644 (file)
@@ -192,7 +192,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
        acpi_physical_address pa = 0;
 
 #ifdef CONFIG_KEXEC
-       if (acpi_rsdp)
+       if (acpi_rsdp && !kernel_is_locked_down("ACPI RSDP specification"))
                return acpi_rsdp;
 #endif