diff options
author | David Howells <dhowells@redhat.com> | 2012-05-01 14:44:14 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:59:18 -0400 |
commit | 137c3c469f5a940c8c095b734373581c3a0d3955 (patch) | |
tree | 43a01fe1f514429fc915605587ace27b14dccc9f /arch/frv | |
parent | efee984c27b67e3ebef40410f35671997441b57c (diff) |
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>
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/frv/kernel/signal.c | 10 |
2 files changed, 3 insertions, 11 deletions
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 5ba23f715ea5..ff3092c18ca2 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -1163,7 +1163,9 @@ __syscall_trace_entry: | |||
1163 | # perform syscall exit tracing | 1163 | # perform syscall exit tracing |
1164 | __syscall_exit_work: | 1164 | __syscall_exit_work: |
1165 | LEDS 0x6340 | 1165 | LEDS 0x6340 |
1166 | andicc gr4,#_TIF_SYSCALL_TRACE,gr0,icc0 | 1166 | andicc gr22,#PSR_PS,gr0,icc1 ; don't handle on return to kernel mode |
1167 | andicc.p gr4,#_TIF_SYSCALL_TRACE,gr0,icc0 | ||
1168 | bne icc1,#0,__entry_return_direct | ||
1167 | beq icc0,#1,__entry_work_pending | 1169 | beq icc0,#1,__entry_work_pending |
1168 | 1170 | ||
1169 | movsg psr,gr23 | 1171 | movsg psr,gr23 |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 4e134c7eceea..f3b9064c548c 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -474,18 +474,8 @@ static void do_signal(void) | |||
474 | { | 474 | { |
475 | struct k_sigaction ka; | 475 | struct k_sigaction ka; |
476 | siginfo_t info; | 476 | siginfo_t info; |
477 | sigset_t *oldset; | ||
478 | int signr; | 477 | int signr; |
479 | 478 | ||
480 | /* | ||
481 | * We want the common case to go fast, which | ||
482 | * is why we may in certain cases get here from | ||
483 | * kernel mode. Just return without doing anything | ||
484 | * if so. | ||
485 | */ | ||
486 | if (!user_mode(__frame)) | ||
487 | return; | ||
488 | |||
489 | signr = get_signal_to_deliver(&info, &ka, __frame, NULL); | 479 | signr = get_signal_to_deliver(&info, &ka, __frame, NULL); |
490 | if (signr > 0) { | 480 | if (signr > 0) { |
491 | handle_signal(signr, &info, &ka); | 481 | handle_signal(signr, &info, &ka); |