Message ID | alpine.LRH.2.02.2108300510300.17144@file01.intranet.prod.int.rdu2.redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [v2] parisc: fix crash with signals and alloca | expand |
Index: linux-5.12/arch/parisc/kernel/signal.c =================================================================== --- linux-5.12.orig/arch/parisc/kernel/signal.c 2021-08-29 19:06:33.000000000 +0200 +++ linux-5.12/arch/parisc/kernel/signal.c 2021-08-30 11:21:12.000000000 +0200 @@ -237,6 +237,12 @@ setup_rt_frame(struct ksignal *ksig, sig #endif usp = (regs->gr[30] & ~(0x01UL)); +#ifdef CONFIG_64BIT + if (is_compat_task()) { + /* The gcc alloca implementation leaves garbage in the upper 32 bits of sp */ + usp = (compat_uint_t)usp; + } +#endif /*FIXME: frame_size parameter is unused, remove it. */ frame = get_sigframe(&ksig->ka, usp, sizeof(*frame));