Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20af5400 authored by James Morse's avatar James Morse Committed by David Brown
Browse files

arm64: kernel: Add support for Privileged Access Never



commit 338d4f49d6f7114a017d294ccf7374df4f998edc upstream.

'Privileged Access Never' is a new arm8.1 feature which prevents
privileged code from accessing any virtual address where read or write
access is also permitted at EL0.

This patch enables the PAN feature on all CPUs, and modifies {get,put}_user
helpers temporarily to permit access.

This will catch kernel bugs where user memory is accessed directly.
'Unprivileged loads and stores' using ldtrb et al are unaffected by PAN.

Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
[will: use ALTERNATIVE in asm and tidy up pan_enable check]
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent e7aa2ecf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment