]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 24 Dec 2020 19:44:38 +0000 (19:44 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 28 Dec 2020 22:26:17 +0000 (23:26 +0100)
commitd74d52efc26275414b9e231f4c30990e00010331
tree82609dbf924ecf207d3d79908bbf1da4ee1588ab
parent635d780dc4a1ad498f92ebe98317792b1ae0e5a6
MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps

Patches that introduced NT_FILE and NT_SIGINFO notes back in 2012
had taken care of native (fs/binfmt_elf.c) and compat (fs/compat_binfmt_elf.c)
coredumps; unfortunately, compat on mips (which does not go through the
usual compat_binfmt_elf.c) had not been noticed.

As the result, both N32 and O32 coredumps on 64bit mips kernels
have those sections malformed enough to confuse the living hell out of
all gdb and readelf versions (up to and including the tip of binutils-gdb.git).

Longer term solution is to make both O32 and N32 compat use the
regular compat_binfmt_elf.c, but that's too much for backports.  The minimal
solution is to do in arch/mips/kernel/binfmt_elf[on]32.c the same thing
those patches have done in fs/compat_binfmt_elf.c

Cc: stable@kernel.org # v3.7+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/binfmt_elfn32.c
arch/mips/kernel/binfmt_elfo32.c