From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH V34 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down Date: Sat, 22 Jun 2019 16:59:44 -0700 Message-ID: <201906221659.A04260B5@keescook> References: <20190622000358.19895-1-matthewgarrett@google.com> <20190622000358.19895-16-matthewgarrett@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190622000358.19895-16-matthewgarrett@google.com> Sender: linux-kernel-owner@vger.kernel.org To: Matthew Garrett Cc: jmorris@namei.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Josh Boyer , David Howells , Matthew Garrett , Dave Young , linux-acpi@vger.kernel.org List-Id: linux-api@vger.kernel.org On Fri, Jun 21, 2019 at 05:03:44PM -0700, Matthew Garrett wrote: > From: Josh Boyer > > 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 Reviewed-by: Kees Cook -Kees > Signed-off-by: David Howells > Signed-off-by: Matthew Garrett > cc: Dave Young > cc: linux-acpi@vger.kernel.org > --- > drivers/acpi/osl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c > index f29e427d0d1d..60cda8a0f36b 100644 > --- a/drivers/acpi/osl.c > +++ b/drivers/acpi/osl.c > @@ -40,6 +40,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -194,7 +195,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) > acpi_physical_address pa; > > #ifdef CONFIG_KEXEC > - if (acpi_rsdp) > + if (acpi_rsdp && !security_locked_down(LOCKDOWN_ACPI_TABLES)) > return acpi_rsdp; > #endif > pa = acpi_arch_get_root_pointer(); > -- > 2.22.0.410.gd8fdbe21b5-goog > -- Kees Cook