summaryrefslogtreecommitdiff
path: root/block/blk-cgroup-rwstat.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-06-26 17:58:31 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2020-07-14 18:02:03 +0100
commit1583052d111f8ea43f9954c5e749164fd2b954af (patch)
tree29648a1747f4bc705f5e139656a1c7bc3fd7e64e /block/blk-cgroup-rwstat.h
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff)
arm64/acpi: disallow AML memory opregions to access kernel memory
AML uses SystemMemory opregions to allow AML handlers to access MMIO registers of, e.g., GPIO controllers, or access reserved regions of memory that are owned by the firmware. Currently, we also allow AML access to memory that is owned by the kernel and mapped via the linear region, which does not seem to be supported by a valid use case, and exposes the kernel's internal state to AML methods that may be buggy and exploitable. On arm64, ACPI support requires booting in EFI mode, and so we can cross reference the requested region against the EFI memory map, rather than just do a minimal check on the first page. So let's only permit regions to be remapped by the ACPI core if - they don't appear in the EFI memory map at all (which is the case for most MMIO), or - they are covered by a single region in the EFI memory map, which is not of a type that describes memory that is given to the kernel at boot. Reported-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Link: https://lore.kernel.org/r/20200626155832.2323789-2-ardb@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'block/blk-cgroup-rwstat.h')
0 files changed, 0 insertions, 0 deletions