diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-16 14:54:20 -0400 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2012-05-25 12:24:48 -0400 |
commit | c6ddd91dbbfe34950f67fc05bed1d7b506d84213 (patch) | |
tree | 2e8df7826b630c173edd4ce88994432317714a55 | |
parent | 0af59acb60efde468c8e01b196d491970a47a057 (diff) |
arch/tile: apply commit 74fca9da0 to the compat signal handling as well
BugLink: http://bugs.launchpad.net/bugs/1002880
commit a134d228298c6aa9007205c6b81cae0cac0acb5d upstream.
This passes siginfo and mcontext to tilegx32 signal handlers that
don't have SA_SIGINFO set just as we have been doing for tilegx64.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-rw-r--r-- | arch/tile/kernel/compat_signal.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index a7869ad6277..41459d80b6b 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c | |||
@@ -406,19 +406,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
406 | * Set up registers for signal handler. | 406 | * Set up registers for signal handler. |
407 | * Registers that we don't modify keep the value they had from | 407 | * Registers that we don't modify keep the value they had from |
408 | * user-space at the time we took the signal. | 408 | * user-space at the time we took the signal. |
409 | * We always pass siginfo and mcontext, regardless of SA_SIGINFO, | ||
410 | * since some things rely on this (e.g. glibc's debug/segfault.c). | ||
409 | */ | 411 | */ |
410 | regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); | 412 | regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); |
411 | regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ | 413 | regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ |
412 | regs->sp = ptr_to_compat_reg(frame); | 414 | regs->sp = ptr_to_compat_reg(frame); |
413 | regs->lr = restorer; | 415 | regs->lr = restorer; |
414 | regs->regs[0] = (unsigned long) usig; | 416 | regs->regs[0] = (unsigned long) usig; |
415 | 417 | regs->regs[1] = ptr_to_compat_reg(&frame->info); | |
416 | if (ka->sa.sa_flags & SA_SIGINFO) { | 418 | regs->regs[2] = ptr_to_compat_reg(&frame->uc); |
417 | /* Need extra arguments, so mark to restore caller-saves. */ | 419 | regs->flags |= PT_FLAGS_CALLER_SAVES; |
418 | regs->regs[1] = ptr_to_compat_reg(&frame->info); | ||
419 | regs->regs[2] = ptr_to_compat_reg(&frame->uc); | ||
420 | regs->flags |= PT_FLAGS_CALLER_SAVES; | ||
421 | } | ||
422 | 420 | ||
423 | /* | 421 | /* |
424 | * Notify any tracer that was single-stepping it. | 422 | * Notify any tracer that was single-stepping it. |