summaryrefslogtreecommitdiff
path: root/lib/pm-notifier-error-inject.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2021-03-10 11:49:41 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2021-03-19 18:50:45 +0000
commit87143f404f338dbf0b51374ea48ab05e598af564 (patch)
tree3909d7a6a9afb16d331eb60ebd16314b6e777dcc /lib/pm-notifier-error-inject.c
parentc1fd78a77704318de34ba4b780cd99a5ef96d162 (diff)
arm64: mm: use XN table mapping attributes for the linear region
The way the arm64 kernel virtual address space is constructed guarantees that swapper PGD entries are never shared between the linear region on the one hand, and the vmalloc region on the other, which is where all kernel text, module text and BPF text mappings reside. This means that mappings in the linear region (which never require executable permissions) never share any table entries at any level with mappings that do require executable permissions, and so we can set the table-level PXN attributes for all table entries that are created while setting up mappings in the linear region. Since swapper's PGD level page table is mapped r/o itself, this adds another layer of robustness to the way the kernel manages its own page tables. While at it, set the UXN attribute as well for all kernel mappings created at boot. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20210310104942.174584-3-ardb@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions