diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch new file mode 100644 index 00000000..2b95a674 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 4fb637e8e8bd6149d99d92389a104494bb234540 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Metcalf <cmetcalf@tilera.com> | ||
3 | Date: Wed, 16 May 2012 14:54:20 -0400 | ||
4 | Subject: [PATCH 47/56] arch/tile: apply commit 74fca9da0 to the compat signal | ||
5 | handling as well | ||
6 | |||
7 | commit a134d228298c6aa9007205c6b81cae0cac0acb5d upstream. | ||
8 | |||
9 | This passes siginfo and mcontext to tilegx32 signal handlers that | ||
10 | don't have SA_SIGINFO set just as we have been doing for tilegx64. | ||
11 | |||
12 | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> | ||
13 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
14 | --- | ||
15 | arch/tile/kernel/compat_signal.c | 12 +++++------- | ||
16 | 1 files changed, 5 insertions(+), 7 deletions(-) | ||
17 | |||
18 | diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c | ||
19 | index a7869ad..41459d8 100644 | ||
20 | --- a/arch/tile/kernel/compat_signal.c | ||
21 | +++ b/arch/tile/kernel/compat_signal.c | ||
22 | @@ -406,19 +406,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | ||
23 | * Set up registers for signal handler. | ||
24 | * Registers that we don't modify keep the value they had from | ||
25 | * user-space at the time we took the signal. | ||
26 | + * We always pass siginfo and mcontext, regardless of SA_SIGINFO, | ||
27 | + * since some things rely on this (e.g. glibc's debug/segfault.c). | ||
28 | */ | ||
29 | regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); | ||
30 | regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ | ||
31 | regs->sp = ptr_to_compat_reg(frame); | ||
32 | regs->lr = restorer; | ||
33 | regs->regs[0] = (unsigned long) usig; | ||
34 | - | ||
35 | - if (ka->sa.sa_flags & SA_SIGINFO) { | ||
36 | - /* Need extra arguments, so mark to restore caller-saves. */ | ||
37 | - regs->regs[1] = ptr_to_compat_reg(&frame->info); | ||
38 | - regs->regs[2] = ptr_to_compat_reg(&frame->uc); | ||
39 | - regs->flags |= PT_FLAGS_CALLER_SAVES; | ||
40 | - } | ||
41 | + regs->regs[1] = ptr_to_compat_reg(&frame->info); | ||
42 | + regs->regs[2] = ptr_to_compat_reg(&frame->uc); | ||
43 | + regs->flags |= PT_FLAGS_CALLER_SAVES; | ||
44 | |||
45 | /* | ||
46 | * Notify any tracer that was single-stepping it. | ||
47 | -- | ||
48 | 1.7.7.6 | ||
49 | |||