acpi: Disable ACPI table override if the kernel is locked down
authorLinn Crosetto <lcrosetto@gmail.com>
Tue, 20 Aug 2019 00:17:52 +0000 (17:17 -0700)
committerJames Morris <jmorris@namei.org>
Tue, 20 Aug 2019 04:54:16 +0000 (21:54 -0700)
commit6ea0e815fc5e18597724169caa6e4d46dd8e693d
treee128c849c6b2a565b79967ee3b1457015993cc2d
parent41fa1ee9c6d687afb05760dd349f361855f1d7f5
acpi: Disable ACPI table override if the kernel is locked down

>From the kernel documentation (initrd_table_override.txt):

  If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible
  to override nearly any ACPI table provided by the BIOS with an
  instrumented, modified one.

When lockdown is enabled, the kernel should disallow any unauthenticated
changes to kernel space.  ACPI tables contain code invoked by the kernel,
so do not allow ACPI tables to be overridden if the kernel is locked down.

Signed-off-by: Linn Crosetto <lcrosetto@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <mjg59@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
cc: linux-acpi@vger.kernel.org
Signed-off-by: James Morris <jmorris@namei.org>
drivers/acpi/tables.c