Hello,
most xtensa cores have some sort of memory protection mechanism, even
those without full MMU. This series separates protection fault handling
from the CONFIG_MMU setting and allows noMMU configurations to also
do it. This improves userspace behavior in case of errors such as
passing NULL pointer to a syscall that expects a valid memory pointer:
instead of killing the process the kernel is now able to return -EINVAL
from a syscall.
Max Filippov (3):
xtensa: move asid_cache from fault.c to mmu.c
xtensa: extract vmalloc_fault code into a function
xtensa: noMMU: allow handling protection faults
arch/xtensa/Kconfig | 11 ++++
arch/xtensa/kernel/traps.c | 20 +++----
arch/xtensa/mm/Makefile | 3 +-
arch/xtensa/mm/fault.c | 112 +++++++++++++++++++------------------
arch/xtensa/mm/mmu.c | 2 +
5 files changed, 83 insertions(+), 65 deletions(-)
--
2.30.2