Skip to contentSkip to conversation

: MIPS: Select CONFIG_MIPS_O32_FP64_SUPPORT if 64bit kernel and o32

PATCH In review Joshua Kinard 2 participants 3 messages Apr 1, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : MIPS: Select CONFIG_MIPS_O32_FP64_SUPPORT if 64bit kernel and o32

From: Joshua Kinard <[email protected]>

Select CONFIG_MIPS_O32_FP64_SUPPORT by default if CONFIG_64BIT and CONFIG_MIPS32_O32 are selected. This avoids breaking things when booting into an o32 userland under a 64bit kernel. Symptoms of not selecting CONFIG_MIPS_O32_FP64_SUPPORT can include OpenSSH claiming that the "PRNG is not seeded" and Python programs to fail with either a SIGSEGV or errors regarding "float NaN".

---
 arch/mips/Kconfig |    1 +
 1 file changed, 1 insertion(+)

mips-fix-o32-fp64-on-mips64.patch

arch/mips/Kconfig +1 -0
index 294f82e..1b826ed 100644
@@ -2736,6 +2736,7 @@ config MIPS32_O32
 	select COMPAT
 	select MIPS32_COMPAT
 	select SYSVIPC_COMPAT if SYSVIPC
+	select MIPS_O32_FP64_SUPPORT if 64BIT
 	help
 	  Select this option if you want to run o32 binaries.  These are pure
 	  32-bit binaries as used by the 32-bit Linux/MIPS port.  Most of
#1 lore raw
Quoted 22 lines · Joshua Kinard

From: Joshua Kinard <[email protected]>

Select CONFIG_MIPS_O32_FP64_SUPPORT by default if CONFIG_64BIT and CONFIG_MIPS32_O32 are selected. This avoids breaking things when booting into an o32 userland under a 64bit kernel. Symptoms of not selecting CONFIG_MIPS_O32_FP64_SUPPORT can include OpenSSH claiming that the "PRNG is not seeded" and Python programs to fail with either a SIGSEGV or errors regarding "float NaN".

---
 arch/mips/Kconfig |    1 +
 1 file changed, 1 insertion(+)

mips-fix-o32-fp64-on-mips64.patch

arch/mips/Kconfig +0 -0
index 294f82e..1b826ed 100644

arch/mips/Kconfig config MIPS32_O32 · line 2742

Quoted 7 lines
arch/mips/Kconfig +1 -0
@@ -2736,6 +2736,7 @@ config MIPS32_O32
 	select COMPAT
 	select MIPS32_COMPAT
 	select SYSVIPC_COMPAT if SYSVIPC
+	select MIPS_O32_FP64_SUPPORT if 64BIT
 	help
 	  Select this option if you want to run o32 binaries.  These are pure
 	  32-bit binaries as used by the 32-bit Linux/MIPS port.  Most of

Hi,

No this is not a good solution. This has already been fixed in mips-for-linux-next and might make it to 4.0 in time

https://patchwork.linux-mips.org/patch/9344/

can you try that patch instead?

Signature · 1 line
markos
#2 lore raw
Quoted 32 lines · Markos Chandras
Quoted 22 lines · Joshua Kinard

From: Joshua Kinard <[email protected]>

Select CONFIG_MIPS_O32_FP64_SUPPORT by default if CONFIG_64BIT and CONFIG_MIPS32_O32 are selected. This avoids breaking things when booting into an o32 userland under a 64bit kernel. Symptoms of not selecting CONFIG_MIPS_O32_FP64_SUPPORT can include OpenSSH claiming that the "PRNG is not seeded" and Python programs to fail with either a SIGSEGV or errors regarding "float NaN".

---
 arch/mips/Kconfig |    1 +
 1 file changed, 1 insertion(+)

mips-fix-o32-fp64-on-mips64.patch

arch/mips/Kconfig +0 -0
index 294f82e..1b826ed 100644

arch/mips/Kconfig config MIPS32_O32 · line 2742

Quoted 7 lines
arch/mips/Kconfig +1 -0
@@ -2736,6 +2736,7 @@ config MIPS32_O32
 	select COMPAT
 	select MIPS32_COMPAT
 	select SYSVIPC_COMPAT if SYSVIPC
+	select MIPS_O32_FP64_SUPPORT if 64BIT
 	help
 	  Select this option if you want to run o32 binaries.  These are pure
 	  32-bit binaries as used by the 32-bit Linux/MIPS port.  Most of

Hi,

Quoted 6 lines

No this is not a good solution. This has already been fixed in mips-for-linux-next and might make it to 4.0 in time

https://patchwork.linux-mips.org/patch/9344/

can you try that patch instead?

This appears to fix the problem. I definitely suggest this get into 4.0, or some machines out there are going to break if CONFIG_MIPS_O32_FP64_SUPPORT isn't selected. This one was stumping me for a few hours last night...

Thanks!,

--J