Skip to contentSkip to conversation

4.0-rc1 breakage in FPE?

DISCUSSION Paul Martin 3 participants 7 messages Feb 25, 2015 – Feb 27, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

eg.

  $ echo "1 2" | gawk '{ print $1 }'
  1 2

which should output (and does output on 3.19)

  $ echo "1 2" | gawk '{ print $1 }'
  1

I'm going to try bisecting this over the next few days.

We've been here before...

cf. http://www.linux-mips.org/archives/linux-mips/2014-07/msg00431.html

Signature · 2 lines
Paul Martin                                  http://www.codethink.co.uk/
Senior Software Developer, Codethink Ltd.
#1 lore raw
Quoted 23 lines · Paul Martin

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

eg.

  $ echo "1 2" | gawk '{ print $1 }'
  1 2

which should output (and does output on 3.19)

  $ echo "1 2" | gawk '{ print $1 }'
  1

I'm going to try bisecting this over the next few days.

We've been here before...

cf. http://www.linux-mips.org/archives/linux-mips/2014-07/msg00431.html

Signature · 2 lines
Paul Martin                                  http://www.codethink.co.uk/
Senior Software Developer, Codethink Ltd.
Signature · 2 lines
Måns Rullgård
[email protected]
#2 lore raw
In reply to Paul Martin
Quoted 8 lines · Paul Martin

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

eg.

  $ echo "1 2" | gawk '{ print $1 }'
  1 2
Quoted 6 lines

which should output (and does output on 3.19)

  $ echo "1 2" | gawk '{ print $1 }'
  1

I'm going to try bisecting this over the next few days.

Are you running a 32-bit userland? If so, enabling MIPS_O32_FP64_SUPPORT should fix this.

Signature · 2 lines
Måns Rullgård
[email protected]
#3 lore raw
Quoted 5 lines · Måns Rullgård
Quoted 3 lines · Paul Martin

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

Can you say where your userspace comes from, so we can try to reproduce the issue?

Quoted 7 lines
Quoted 7 lines

eg.

   $ echo "1 2" | gawk '{ print $1 }'
   1 2

which should output (and does output on 3.19)

Quoted 7 lines
Quoted 4 lines
   $ echo "1 2" | gawk '{ print $1 }'
   1

I'm going to try bisecting this over the next few days.

Are you running a 32-bit userland? If so, enabling MIPS_O32_FP64_SUPPORT should fix this.

??

32-bit userland (Debian for instance) typically shouldn't need special "Exprimental" config options enabled.

If we can identify the offending patch, we should revert it.

David Daney

#4 lore raw
Quoted 22 lines · David Daney
Quoted 5 lines · Måns Rullgård
Quoted 3 lines · Paul Martin

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

Can you say where your userspace comes from, so we can try to reproduce the issue?

Quoted 12 lines
Quoted 11 lines

eg.

   $ echo "1 2" | gawk '{ print $1 }'
   1 2

which should output (and does output on 3.19)

   $ echo "1 2" | gawk '{ print $1 }'
   1

I'm going to try bisecting this over the next few days.

Quoted 7 lines
Quoted 2 lines

Are you running a 32-bit userland? If so, enabling MIPS_O32_FP64_SUPPORT should fix this.

??

32-bit userland (Debian for instance) typically shouldn't need special "Exprimental" config options enabled.

Indeed, it should not. Someone made a mistake.

Quoted 1 line

If we can identify the offending patch, we should revert it.

The offending patch is 46490b57 "MIPS: kernel: elf: Improve the overall ABI and FPU mode checks"

There is no need for a full revert. This is enough to make things work:

arch/mips/kernel/elf.c +0 -6
index d2c09f6..57f0353 100644
@@ -148,9 +148,6 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
 	struct mode_req prog_req, interp_req;
 	int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
 
-	if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
-		return 0;
-
 	fp_abi = get_fp_abi(state->fp_abi);
 
 	if (has_interpreter) {
@@ -245,9 +242,6 @@ void mips_set_personality_fp(struct arch_elf_state *state)
 	 * not be worried about N32/N64 binaries.
 	 */
 
-	if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
-		return;
-
 	switch (state->overall_fp_mode) {
 	case FP_FRE:
 		set_thread_fp_mode(1, 0);
Signature · 2 lines
Måns Rullgård
[email protected]
#5 lore raw
In reply to David Daney
Quoted 25 lines · David Daney
Quoted 5 lines · Måns Rullgård
Quoted 3 lines · Paul Martin

Some change between 3.19 and 4.0-rc1 has broken the FPE such that some code running on an Octeon II is subtly not working.

Can you say where your userspace comes from, so we can try to reproduce the issue?

Quoted 7 lines
Quoted 7 lines

eg.

   $ echo "1 2" | gawk '{ print $1 }'
   1 2

which should output (and does output on 3.19)

Quoted 7 lines
Quoted 4 lines
   $ echo "1 2" | gawk '{ print $1 }'
   1

I'm going to try bisecting this over the next few days.

Are you running a 32-bit userland? If so, enabling MIPS_O32_FP64_SUPPORT should fix this.

Quoted 6 lines

??

32-bit userland (Debian for instance) typically shouldn't need special "Exprimental" config options enabled.

If we can identify the offending patch, we should revert it.

FYI, a fix (MIPS: asm: elf: Set O32 default FPU flags) has been posted to linux-mips.

Signature · 2 lines
Måns Rullgård
[email protected]
#6 lore raw
Quoted 2 lines · Måns Rullgård

FYI, a fix (MIPS: asm: elf: Set O32 default FPU flags) has been posted to linux-mips.

I can confirm this fix does tame gawk.

Signature · 2 lines
Paul Martin                                  http://www.codethink.co.uk/
Senior Software Developer, Codethink Ltd.