]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Wrong DWARF CFI in the kernel vdso for little-endian / ELFv2
authorUlrich Weigand <Ulrich.Weigand@de.ibm.com>
Wed, 20 Nov 2013 20:38:05 +0000 (07:38 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Nov 2013 22:19:23 +0000 (09:19 +1100)
commit280270828f108be56f0c486def58acabb070244f
tree60e3a4b2fdc31af724e0fdc5cc111cda7f8e2bcb
parentf53e462e907cbaed29c49c0f10f5b8f614e1bf1d
powerpc: Wrong DWARF CFI in the kernel vdso for little-endian / ELFv2

I've finally tracked down why my CR signal-unwind test case still
fails on little-endian.  The problem turned to be that the kernel
installs a signal trampoline in the vDSO, and provides a DWARF CFI
record for that trampoline.  This CFI describes the save location
for CR:

  rsave (70, 38*RSIZE + (RSIZE - CRSIZE))

which is correct for big-endian, but points to the wrong word on
little-endian.   This is wrong no matter which ABI.

In addition, for the ELFv2 ABI, we should not only provide a CFI
record for register 70 (cr2), but for all CR fields separately.
Strictly speaking, I guess this would mean providing two separate
vDSO images, one for ELFv1 processes and one for ELFv2 processes (or
maybe playing some tricks with conditional DWARF expressions).
However, having CFI records for the other CR fields in ELFv1 is not
actually wrong, they just will be ignored.   So it seems the simplest
fix would be just to always provide CFI for all the fields.

Signed-off-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/vdso64/sigtramp.S