The FP mode checks introduced to support the FP modes indicated by the new PT_MIPS_ABIFLAGS program header & .MIPS.abiflags section have been found to cause some compatibility issues when mixing binaries with such mode information & an ELF interpreter without it, or vice-versa[1]. The mode checks serve little purpose unless the kernel actually supports the FP64 modes as indicated by CONFIG_MIPS_O32_FP64_SUPPORT, which currently defaults to disabled & is marked experimental. Bypass the mode checks when the FP64 support is disabled in order to avoid compatibility issues with v3.19 until the logic is fixed. [1]: http://www.linux-mips.org/archives/linux-mips/2015-01/msg00279.html Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx> Cc: Manuel Lauss <manuel.lauss@xxxxxxxxx> Cc: Matthew Fortune <Matthew.Fortune@xxxxxxxxxx> --- Ralf: if people agree with this approach, it would be great to get this in for v3.19. --- arch/mips/kernel/elf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c index c92b15d..bb73c7c 100644 --- a/arch/mips/kernel/elf.c +++ b/arch/mips/kernel/elf.c @@ -68,6 +68,15 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, struct elfhdr *ehdr = _ehdr; unsigned fp_abi, interp_fp_abi, abi0, abi1; + if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) { + /* + * Temporarily bypass this logic when the o32 FP64 support is + * not enabled, until all compatibility issues are resolved. + */ + state->overall_abi = MIPS_ABI_FP_DOUBLE; + return 0; + } + /* Ignore non-O32 binaries */ if (config_enabled(CONFIG_64BIT) && (ehdr->e_ident[EI_CLASS] != ELFCLASS32)) -- 2.2.1