mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
FRV: Prevent syscall exit tracing and notify_resume at end of kernel exceptions
Move the test for kernel mode processing from do_signal() into entry.S to also prevent system call exit tracing and userspace resumption notification handling happening when returning from kernel exceptions. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
efee984c27
commit
137c3c469f
2 changed files with 3 additions and 11 deletions
|
@ -1163,7 +1163,9 @@ __syscall_trace_entry:
|
||||||
# perform syscall exit tracing
|
# perform syscall exit tracing
|
||||||
__syscall_exit_work:
|
__syscall_exit_work:
|
||||||
LEDS 0x6340
|
LEDS 0x6340
|
||||||
andicc gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
|
andicc gr22,#PSR_PS,gr0,icc1 ; don't handle on return to kernel mode
|
||||||
|
andicc.p gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
|
||||||
|
bne icc1,#0,__entry_return_direct
|
||||||
beq icc0,#1,__entry_work_pending
|
beq icc0,#1,__entry_work_pending
|
||||||
|
|
||||||
movsg psr,gr23
|
movsg psr,gr23
|
||||||
|
|
|
@ -474,18 +474,8 @@ static void do_signal(void)
|
||||||
{
|
{
|
||||||
struct k_sigaction ka;
|
struct k_sigaction ka;
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
sigset_t *oldset;
|
|
||||||
int signr;
|
int signr;
|
||||||
|
|
||||||
/*
|
|
||||||
* We want the common case to go fast, which
|
|
||||||
* is why we may in certain cases get here from
|
|
||||||
* kernel mode. Just return without doing anything
|
|
||||||
* if so.
|
|
||||||
*/
|
|
||||||
if (!user_mode(__frame))
|
|
||||||
return;
|
|
||||||
|
|
||||||
signr = get_signal_to_deliver(&info, &ka, __frame, NULL);
|
signr = get_signal_to_deliver(&info, &ka, __frame, NULL);
|
||||||
if (signr > 0) {
|
if (signr > 0) {
|
||||||
handle_signal(signr, &info, &ka);
|
handle_signal(signr, &info, &ka);
|
||||||
|
|
Loading…
Reference in a new issue