summaryrefslogtreecommitdiffstats
path: root/arch/mips/pci/pci-vr41xx.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@mips.com>2017-11-07 20:09:20 +0100
committerJames Hogan <jhogan@kernel.org>2017-11-09 16:04:57 +0100
commit547da673173de51f73887377eb275304775064ad (patch)
tree77e4be35ffd3cad4ffa5cf6e6969e703ca76a5dc /arch/mips/pci/pci-vr41xx.c
parentMIPS: Fix MIPS64 FP save/restore on 32-bit kernels (diff)
downloadlinux-547da673173de51f73887377eb275304775064ad.tar.xz
linux-547da673173de51f73887377eb275304775064ad.zip
MIPS: Fix an n32 core file generation regset support regression
Fix a commit 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") regression, then activated by commit 6a9c001b7ec3 ("MIPS: Switch ELF core dumper to use regsets.)", that caused n32 processes to dump o32 core files by failing to set the EF_MIPS_ABI2 flag in the ELF core file header's `e_flags' member: $ file tls-core tls-core: ELF 32-bit MSB executable, MIPS, N32 MIPS64 rel2 version 1 (SYSV), [...] $ ./tls-core Aborted (core dumped) $ file core core: ELF 32-bit MSB core file MIPS, MIPS-I version 1 (SYSV), SVR4-style $ Previously the flag was set as the result of a: statement placed in arch/mips/kernel/binfmt_elfn32.c, however in the regset case, i.e. when CORE_DUMP_USE_REGSET is set, ELF_CORE_EFLAGS is no longer used by `fill_note_info' in fs/binfmt_elf.c, and instead the `->e_flags' member of the regset view chosen is. We have the views defined in arch/mips/kernel/ptrace.c, however only an o32 and an n64 one, and the latter is used for n32 as well. Consequently an o32 core file is incorrectly dumped from n32 processes (the ELF32 vs ELF64 class is chosen elsewhere, and the 32-bit one is correctly selected for n32). Correct the issue then by defining an n32 regset view and using it as appropriate. Issue discovered in GDB testing. Fixes: 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") Signed-off-by: Maciej W. Rozycki <macro@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Djordje Todorovic <djordje.todorovic@rt-rk.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 3.13+ Patchwork: https://patchwork.linux-mips.org/patch/17617/ Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/pci/pci-vr41xx.c')
0 files changed, 0 insertions, 0 deletions