]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/8xx: Add Kernel Userspace Execution Prevention
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 11 Mar 2019 08:30:33 +0000 (08:30 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 21 Apr 2019 13:11:46 +0000 (23:11 +1000)
commit5b713211644c857a9ea7d12a0ff0090063b9f9f8
treedd48ae9729e84beaa712f9d5dfa9ba9638f74d25
parent08ca6d1cd116b2d017c55c30fb6256fa927907ec
powerpc/8xx: Add Kernel Userspace Execution Prevention

This patch adds Kernel Userspace Execution Prevention on the 8xx.

When a page is Executable, it is set Executable for Key 0 and NX
for Key 1.

Up to now, the User group is defined with Key 0 for both User and
Supervisor.

By changing the group to Key 0 for User and Key 1 for Supervisor,
this patch prevents the Kernel from being able to execute user code.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/nohash/32/mmu-8xx.h
arch/powerpc/mm/8xx_mmu.c
arch/powerpc/platforms/Kconfig.cputype