]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: 64-bit: Fix o32 core dump
authorYong Zhang <yong.zhang@windriver.com>
Wed, 1 Jul 2009 01:35:39 +0000 (09:35 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 3 Jul 2009 14:45:27 +0000 (15:45 +0100)
commitb817ded5a88ecf6761d6c359bc3bd8a94c82c731
tree1f524589c15cf75da217ed7b9b9b4686c3f714e9
parent1c9ceb9ce88664d199097284ce186db339cb9e78
MIPS: 64-bit: Fix o32 core dump

If an o32 process generates a core dump on a 64 bit kernel, the core file
will not be correctly recognized. This is because ELF_CORE_COPY_REGS and
ELF_CORE_COPY_TASK_REGS are not correctly defined for o32 and will use
the default register set which would be CONFIG_64BIT in asm/elf.h.

So we'll switch to use the right register defines in this situation by
checking for WANT_COMPAT_REG_H and use the right defines of
ELF_CORE_COPY_REGS and ELF_CORE_COPY_TASK_REGS.

[Ralf: made ELF_CORE_COPY_TASK_REGS() bullet-proof against funny arguments.]

Signed-off-by: Yong Zhang <yong.zhang@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/elf.h
arch/mips/include/asm/reg.h
arch/mips/kernel/binfmt_elfo32.c