Skip to contentSkip to conversation

csky: Fixup libgcc unwind error

PATCH New [email protected] 1 participant 1 message Jun 26, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 csky: Fixup libgcc unwind error

From: Guo Ren <[email protected]>

The struct rt_sigframe is also defined in libgcc/config/csky/linux-unwind.h of gcc. Although there is no use for the first three word space, we must keep them the same with linux-unwind.h for member position.

The BUG is found in glibc test with the tst-cancel02. The BUG is from commit:bf2416829362 of linux-5.2-rc1 merge window.

---
 arch/csky/kernel/signal.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/csky/kernel/signal.c +5 -0
index 04a43cf..d47a338 100644
@@ -39,6 +39,11 @@ static int save_fpu_state(struct sigcontext __user *sc)
 #endif
 
 struct rt_sigframe {
+	/*
+	 * pad[3] is compatible with the same struct defined in
+	 * gcc/libgcc/config/csky/linux-unwind.h
+	 */
+	int pad[3];
 	struct siginfo info;
 	struct ucontext uc;
 };
Signature · 1 line
2.7.4