Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 081c11a5 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras
Browse files

[POWERPC] Fix 64 bits vDSO DWARF info for CR register



The current DWARF info for CR are incorrect, causing the gcc unwinder to
go to lunch if we take a segfault in the vdso.  This fixes it.

Problem identified by Andrew Haley, and fix provided by Jakub Jelinek
(thanks !).

Unfortunately, a bug in gcc cause it to not quite work either, but that
is being fixed separately with something around the lines of:

linux-unwind.h:

     fs->regs.reg[R_CR2].loc.offset = (long) &regs->ccr - new_cfa;
+    /* CR? regs are just 32-bit and PPC is big-endian.  */
+    fs->regs.reg[R_CR2].loc.offset += sizeof (long) - 4;

(According to Jakub)

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent f66bce5e
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -139,6 +139,9 @@ V_FUNCTION_END(__kernel_sigtramp_rt64)
/* Size of regs.  */
#define RSIZE	8

/* Size of CR reg in DWARF unwind info. */
#define CRSIZE	4

/* This is the offset of the VMX reg pointer.  */
#define VREGS	48*RSIZE+33*8

@@ -178,7 +181,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt64)
  rsave (31, 31*RSIZE);							\
  rsave (67, 32*RSIZE);		/* ap, used as temp for nip */		\
  rsave (65, 36*RSIZE);		/* lr */				\
  rsave (70, 38*RSIZE)		/* cr */
  rsave (70, 38*RSIZE + (RSIZE - CRSIZE)) /* cr */

/* Describe where the FP regs are saved.  */
#define EH_FRAME_FP \