From: Max Filippov <jcmvbkbc@gmail.com>
To: linux-xtensa@linux-xtensa.org
Cc: Chris Zankel <chris@zankel.net>,
linux-kernel@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH 0/3] xtensa: allow handling protection faults in noMMU
Date: Wed, 13 Apr 2022 16:49:27 -0700 [thread overview]
Message-ID: <20220413234930.1212335-1-jcmvbkbc@gmail.com> (raw)
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
next reply other threads:[~2022-04-13 23:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 23:49 Max Filippov [this message]
2022-04-13 23:49 ` [PATCH 1/3] xtensa: move asid_cache from fault.c to mmu.c Max Filippov
2022-04-13 23:49 ` [PATCH 2/3] xtensa: extract vmalloc_fault code into a function Max Filippov
2022-04-13 23:49 ` [PATCH 3/3] xtensa: noMMU: allow handling protection faults Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220413234930.1212335-1-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=chris@zankel.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox