mirror_ubuntu-kernels/arch/powerpc
Christophe Leroy ed815bd3fe powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER
_PAGE_USER is used to select the zone. Today zone 0 is kernel
and zone 1 is user.

To implement _PAGE_NONE, _PAGE_USER is cleared, leading to no access
for user but kernel still has access to the page so it's possible for
a user application to write in that page by using a kernel function
as trampoline.

What is really wanted is to have user rights on pages below TASK_SIZE
and no user rights on pages above TASK_SIZE. Use zones for that.
There are 16 zones so lets use the 4 upper address bits to set the
zone and declare zone rights based on TASK_SIZE.

Then drop _PAGE_USER and reuse it as _PAGE_READ that will be checked
in Data TLB miss handler. That will properly handle PAGE_NONE for
both kernel and user.

In addition, it partially implements execute-only right. The
implementation won't be complete because once a TLB has been loaded
via the Instruction TLB miss handler, it will be possible to read
the page. But at least it can't be read unless it is executed first.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/2a13e3ba8a5dec43143cc1f9a91ec71ea1529f3c.1695659959.git.christophe.leroy@csgroup.eu
2023-10-19 17:12:47 +11:00
..
boot powerpc: dts: add missing space before { 2023-08-25 08:39:30 +10:00
configs powerpc/configs: Remove ReiserFS from defconfig 2023-09-19 20:36:20 +10:00
crypto This push fixes a random config build failure on powerpc. 2023-09-01 15:39:25 -07:00
include powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER 2023-10-19 17:12:47 +11:00
kernel powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER 2023-10-19 17:12:47 +11:00
kexec powerpc: add cur_cpu_spec symbol to vmcoreinfo 2023-09-18 12:23:27 +10:00
kvm powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
lib powerpc/qspinlock: Fix stale propagated yield_cpu 2023-10-18 21:07:21 +11:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER 2023-10-19 17:12:47 +11:00
net powerpc/bpf: Fixed 'instead' typo in bpf_jit_build_body() 2023-10-18 22:27:00 +11:00
perf powerpc/perf/hv-24x7: Update domain value check 2023-09-18 12:23:47 +10:00
platforms powerpc: Untangle fixmap.h and pgtable.h and mmu.h 2023-10-19 17:12:44 +11:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
sysdev TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
tools powerpc/ftrace: Add support for -fpatchable-function-entry 2023-08-22 00:09:06 +10:00
xmon TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/mm: Allow ARCH_FORCE_MAX_ORDER up to 12 2023-10-15 20:55:03 +11:00
Kconfig.debug powerpc: Use shared font data 2023-10-01 23:09:02 +11:00
Makefile powerpc/64s: Move CPU -mtune options into Kconfig 2023-08-25 08:39:29 +10:00
Makefile.postlink kbuild: remove --include-dir MAKEFLAG from top Makefile 2023-02-05 18:51:22 +09:00