]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: ptrace: Change GP regset to use correct core dump register layout
authorAlex Smith <alex@alex-smith.me.uk>
Wed, 23 Jul 2014 13:40:09 +0000 (14:40 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 30 Jul 2014 21:27:46 +0000 (23:27 +0200)
commitdfffcdb82bbc4fdeee113092082e14a02537798d
treeadec9f6c5adf5556df55619c7217b270ebf68eae
parent00d262b544c87405d37655cce94dea2a7c0b3675
MIPS: ptrace: Change GP regset to use correct core dump register layout

Commit ade7b55f1d49 ("MIPS: Switch ELF core dumper to use regsets.")
switched the core dumper to use regsets, however the GP regset code
simply makes a direct copy of the kernel's pt_regs, which does not
match the original core dump register layout as defined in asm/reg.h.
Furthermore, the definition of pt_regs can vary with certain Kconfig
variables, therefore the GP regset can never be relied upon to return
registers in the same layout.

Therefore, this patch changes the GP regset to match the original core
dump layout. The layout differs for 32- and 64-bit processes, so
separate implementations of the get/set functions are added for the
32- and 64-bit regsets.

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
Cc: <stable@vger.kernel.org> # v3.13+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7452/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/ptrace.c