]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
arm64: pgtable: Clear the GP bit for non-executable kernel pages
authorWill Deacon <will@kernel.org>
Mon, 15 Jun 2020 15:27:43 +0000 (16:27 +0100)
committerWill Deacon <will@kernel.org>
Tue, 16 Jun 2020 16:21:07 +0000 (17:21 +0100)
commit034aa9cd698e315c767af1bac3fd1ff8898d2cd7
tree6529aff9bc5aa4384b5a091ebef6364c7f56332b
parent8dd4daa04278d7437641962ed53b843c0b0ec4a9
arm64: pgtable: Clear the GP bit for non-executable kernel pages

Commit cca98e9f8b5e ("mm: enforce that vmap can't map pages executable")
introduced 'pgprot_nx(prot)' for arm64 but collided silently with the
BTI support during the merge window, which endeavours to clear the GP
bit for non-executable kernel mappings in set_memory_nx().

For consistency between the two APIs, clear the GP bit in pgprot_nx().

Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200615154642.3579-1-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable.h