diff options
author | Paul Burton <paul.burton@imgtec.com> | 2015-05-06 11:52:32 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-05-12 18:54:05 +0200 |
commit | 620b155034570f577470cf5309f741bac6a6e32b (patch) | |
tree | c3264695ac23aee0873484bf466f9ba7bc13f7f3 /net/ipv4/tcp_vegas.c | |
parent | cafb45b2562baa57cb58bef0636c073705954cc4 (diff) | |
download | op-kernel-dev-620b155034570f577470cf5309f741bac6a6e32b.zip op-kernel-dev-620b155034570f577470cf5309f741bac6a6e32b.tar.gz |
MIPS: fix FP mode selection in lieu of .MIPS.abiflags data
Commit 46490b572544 ("MIPS: kernel: elf: Improve the overall ABI and FPU
mode checks") reworked the ELF FP ABI mode selection logic, but when
CONFIG_MIPS_O32_FP64_SUPPORT is enabled it breaks the use of binaries
which have no PT_MIPS_ABIFLAGS program header & associated
.MIPS.abiflags section.
A default mode is selected based upon whether the ELF contains MIPS32 or
MIPS64 code, but that selection is made in arch_elf_pt_proc.
arch_elf_pt_proc only executes when a PT_MIPS_ABIFLAGS program header is
found. If one is not found then arch_elf_pt_proc is never called, and no
default overall_fp_mode value is selected. When arch_check_elf is
called, both abi0 & abi1 are MIPS_ABI_FP_UNKNOWN which leads to both
prog_req & interp_req being set to none_req. none_req matches none of
the conditions for mode selection at the end of arch_check_elf, so
overall_fp_mode is left untouched. Finally once mips_set_personality_fp
is called the BUG() in the default case is then hit & the kernel likely
panics.
Fix this by moving the selection of a default overall mode to the start
of arch_check_elf, which runs once per ELF executed regardless of
whether it has a PT_MIPS_ABIFLAGS program header.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Matthew Fortune <matthew.fortune@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.0+
Patchwork: http://patchwork.linux-mips.org/patch/9978/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'net/ipv4/tcp_vegas.c')
0 files changed, 0 insertions, 0 deletions