Skip to content

xtensa: allow handling protection faults in noMMU

Max Filippov lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xtensa: move asid_cache from fault.c to mmu.carch/xtensa/mm/fault.c arch/xtensa/mm/mmu.c+2 -10 replies
2/3xtensa: extract vmalloc_fault code into a functionarch/xtensa/mm/fault.c+54 -530 replies
3/3xtensa: noMMU: allow handling protection faultsarch/xtensa/Kconfig arch/xtensa/kernel/traps.c arch/xtensa/mm/Makefile +1 more+27 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] xtensa: allow handling protection faults in noMMU

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(-)
Signature · 1 line
2.30.2