Skip to content

Commit aa78fa9

Browse files
committed
parisc: Fix vDSO signal breakage on 32-bit kernel
Addition of vDSO support for parisc in kernel v5.18 suddenly broke glibc signal testcases on a 32-bit kernel. The trampoline code (sigtramp.S) which is mapped into userspace includes an offset to the context data on the stack, which is used by gdb and glibc to get access to registers. In a 32-bit kernel we used by mistake the offset into the compat context (which is valid on a 64-bit kernel only) instead of the offset into the "native" 32-bit context. Reported-by: John David Anglin <[email protected]> Tested-by: John David Anglin <[email protected]> Fixes: df24e17 ("parisc: Add vDSO support") CC: [email protected] # 5.18 Signed-off-by: Helge Deller <[email protected]>
1 parent 96b80fc commit aa78fa9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/parisc/kernel/asm-offsets.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,13 @@ int main(void)
224224
BLANK();
225225
DEFINE(ASM_SIGFRAME_SIZE, PARISC_RT_SIGFRAME_SIZE);
226226
DEFINE(SIGFRAME_CONTEXT_REGS, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
227+
#ifdef CONFIG_64BIT
227228
DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE32);
228229
DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct compat_rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE32);
230+
#else
231+
DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE);
232+
DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
233+
#endif
229234
BLANK();
230235
DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
231236
DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));

0 commit comments

Comments
 (0)