* [PATCH] parisc: Fix vDSO signal breakage on 32-bit kernel
@ 2022-07-01 7:00 Helge Deller
0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2022-07-01 7:00 UTC (permalink / raw)
To: linux-parisc, James Bottomley, John David Anglin
Addition of vDSO support for parisc in kernel v5.18 suddenly broke
glibc testcases on a 32-bit kernel which used signals.
The trampoline code (sigtramp.S) which is mapped into userspace
processes includes offsets to the context data on the stack, which are
used by gdb and glibc to get the correct data.
In a 32-bit kernel we used by mistake the offsets into the compat
context (which is valid on a 64-bit kernel only) instead of the offsets
into the "native" 32-bit context.
Signed-off-by: Helge Deller <deller@gmx.de>
Noticed-by: John David Anglin <dave.anglin@bell.net>
Fixes: df24e1783e6e ("parisc: Add vDSO support")
CC: stable@vger.kernel.org # 5.16+
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index 2673d57eeb00..94652e13c260 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -224,8 +224,13 @@ int main(void)
BLANK();
DEFINE(ASM_SIGFRAME_SIZE, PARISC_RT_SIGFRAME_SIZE);
DEFINE(SIGFRAME_CONTEXT_REGS, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
+#ifdef CONFIG_64BIT
DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE32);
DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct compat_rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE32);
+#else
+ DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE);
+ DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
+#endif
BLANK();
DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-01 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01 7:00 [PATCH] parisc: Fix vDSO signal breakage on 32-bit kernel Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox