* [git pull] VM_FAULT_RETRY fixes
@ 2023-03-05 2:10 Al Viro
2023-03-05 19:37 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2023-03-05 2:10 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-arch
The following changes since commit c9c3395d5e3dcc6daee66c6908354d47bf98cb0c:
Linux 6.2 (2023-02-19 14:24:22 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-fixes
for you to fetch changes up to caa82ae7ef52b7cf5f80a2b2fbcbdbcfd16426cc:
openrisc: fix livelock in uaccess (2023-03-02 12:32:44 -0500)
----------------------------------------------------------------
VM_FAULT_RETRY fixes
Some of the page fault handlers do not deal with the following case
correctly:
* handle_mm_fault() has returned VM_FAULT_RETRY
* there is a pending fatal signal
* fault had happened in kernel mode
Correct action in such case is not "return unconditionally" - fatal
signals are handled only upon return to userland and something like
copy_to_user() would end up retrying the faulting instruction and
triggering the same fault again and again.
What we need to do in such case is to make the caller to treat that
as failed uaccess attempt - handle exception if there is an exception
handler for faulting instruction or oops if there isn't one.
Over the years some architectures had been fixed and now are handling
that case properly; some still do not. This series should fix the
remaining ones.
Status:
m68k, riscv, hexagon, parisc: tested/acked by maintainers.
alpha, sparc32, sparc64: tested locally - bug has been
reproduced on the unpatched kernel and verified to be fixed by
this series.
ia64, microblaze, nios2, openrisc: build, but otherwise
completely untested.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----------------------------------------------------------------
Al Viro (10):
m68k: fix livelock in uaccess
riscv: fix livelock in uaccess
hexagon: fix livelock in uaccess
parisc: fix livelock in uaccess
alpha: fix livelock in uaccess
sparc: fix livelock in uaccess
ia64: fix livelock in uaccess
microblaze: fix livelock in uaccess
nios2: fix livelock in uaccess
openrisc: fix livelock in uaccess
arch/alpha/mm/fault.c | 5 ++++-
arch/hexagon/mm/vm_fault.c | 5 ++++-
arch/ia64/mm/fault.c | 5 ++++-
arch/m68k/mm/fault.c | 5 ++++-
arch/microblaze/mm/fault.c | 5 ++++-
arch/nios2/mm/fault.c | 5 ++++-
arch/openrisc/mm/fault.c | 5 ++++-
arch/parisc/mm/fault.c | 7 ++++++-
arch/riscv/mm/fault.c | 5 ++++-
arch/sparc/mm/fault_32.c | 5 ++++-
arch/sparc/mm/fault_64.c | 7 ++++++-
11 files changed, 48 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [git pull] VM_FAULT_RETRY fixes
2023-03-05 2:10 [git pull] VM_FAULT_RETRY fixes Al Viro
@ 2023-03-05 19:37 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2023-03-05 19:37 UTC (permalink / raw)
To: Al Viro; +Cc: Linus Torvalds, linux-kernel, linux-arch
The pull request you sent on Sun, 5 Mar 2023 02:10:42 +0000:
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/1a8d05a726dc5b82e608f0962511e15fcbcab1ab
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-05 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-05 2:10 [git pull] VM_FAULT_RETRY fixes Al Viro
2023-03-05 19:37 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox