mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
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. This requires some reworking of the existing RSDP command line logic, since the early boot code also makes use of a command-line passed RSDP when locating the SRAT table before the lockdown code has been initialised. This is achieved by separating the command line RSDP path in the early boot code from the generic RSDP path, and then copying the command line RSDP into boot params in the kernel proper if lockdown is not enabled. If lockdown is enabled and an RSDP is provided on the command line, this will only be used when parsing SRAT (which shouldn't permit kernel code execution) and will be ignored in the rest of the kernel. (Modified by Matthew Garrett in order to handle the early boot RSDP environment) Signed-off-by: Josh Boyer <jwboyer@redhat.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: Dave Young <dyoung@redhat.com> cc: linux-acpi@vger.kernel.org Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
f474e1486b
commit
41fa1ee9c6
7 changed files with 49 additions and 7 deletions
|
@ -632,6 +632,12 @@ bool acpi_gtdt_c3stop(int type);
|
|||
int acpi_arch_timer_mem_init(struct arch_timer_mem *timer_mem, int *timer_count);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_HAVE_ARCH_SET_ROOT_POINTER
|
||||
static inline void acpi_arch_set_root_pointer(u64 addr)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_HAVE_ARCH_GET_ROOT_POINTER
|
||||
static inline u64 acpi_arch_get_root_pointer(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue