lkml.org 
[lkml]   [2019]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/4] riscv: correct the do_trap_break()
Date

The following three situations may occur in the current implementation of
do_trap_break().
1. When the CONFIG_GENERIC_BUG is disabled, if a kernel thread is trapped
by BUG(), the whole system will be in the loop that infinitely handles
the break exception instead of entering the die function.
2. When the kernel runs code on behalf of a user thread, and the kernel
executes a WARN() or WARN_ON(), the user thread will be sent a bogus
SIGTRAP.
3. Handling the unexpected ebreak instructions is to send a SIGTRAP
to the trapped thread. However, if a kernel executes an unexpected
ebreak, it may cause the kernel thread to be stuck in the ebreak
instruction.

This patch set will solve the above problems by adjusting the
implementations of the do_trap_break().


Vincent Chen (4):
riscv: avoid kernel hangs when trapped in BUG()
rsicv: avoid sending a SIGTRAP to a user thread trapped in WARN()
riscv: Correct the handling of unexpected ebreak in do_trap_break()
riscv: remove the switch statement in do_trap_break()

arch/riscv/kernel/traps.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

--
2.7.4

\
 
 \ /
  Last update: 2019-09-23 02:45    [W:0.304 / U:4.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site