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)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 7 Oct 2018 20:57:06 +0000 (21:57 +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 8df9abfa947b0dca4719c674fd645d187ade242d..098afb371d2cb4631a7c1f690a9607a7571dbc75 100644 (file)
@@ -194,7 +194,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
        acpi_physical_address pa;
 
 #ifdef CONFIG_KEXEC
-       if (acpi_rsdp)
+       if (acpi_rsdp && !kernel_is_locked_down("ACPI RSDP specification"))
                return acpi_rsdp;
 #endif
        pa = acpi_arch_get_root_pointer();