All of lore.kernel.org
 help / color / mirror / Atom feed
* 4.0-rc1 breakage in FPE?
@ 2015-02-25 18:20 Paul Martin
  2015-02-25 21:30 ` Måns Rullgård
  2015-02-25 21:31 ` Måns Rullgård
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Martin @ 2015-02-25 18:20 UTC (permalink / raw)
  To: linux-mips

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

-- 
Paul Martin                                  http://www.codethink.co.uk/
Senior Software Developer, Codethink Ltd.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-25 18:20 4.0-rc1 breakage in FPE? Paul Martin
@ 2015-02-25 21:30 ` Måns Rullgård
  2015-02-25 21:31 ` Måns Rullgård
  1 sibling, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2015-02-25 21:30 UTC (permalink / raw)
  To: linux-mips

Paul Martin <paul.martin@codethink.co.uk> writes:

> 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
>
> -- 
> Paul Martin                                  http://www.codethink.co.uk/
> Senior Software Developer, Codethink Ltd.
>

-- 
Måns Rullgård
mans@mansr.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-25 18:20 4.0-rc1 breakage in FPE? Paul Martin
  2015-02-25 21:30 ` Måns Rullgård
@ 2015-02-25 21:31 ` Måns Rullgård
  2015-02-25 21:40   ` David Daney
  1 sibling, 1 reply; 7+ messages in thread
From: Måns Rullgård @ 2015-02-25 21:31 UTC (permalink / raw)
  To: Paul Martin; +Cc: linux-mips

Paul Martin <paul.martin@codethink.co.uk> writes:

> 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.

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

-- 
Måns Rullgård
mans@mansr.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-25 21:31 ` Måns Rullgård
@ 2015-02-25 21:40   ` David Daney
  2015-02-25 21:48     ` Måns Rullgård
  2015-02-26 11:29     ` Måns Rullgård
  0 siblings, 2 replies; 7+ messages in thread
From: David Daney @ 2015-02-25 21:40 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: Paul Martin, linux-mips

On 02/25/2015 01:31 PM, Måns Rullgård wrote:
> Paul Martin <paul.martin@codethink.co.uk> writes:
>
>> 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?



>> 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.
>
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-25 21:40   ` David Daney
@ 2015-02-25 21:48     ` Måns Rullgård
  2015-02-26 11:29     ` Måns Rullgård
  1 sibling, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2015-02-25 21:48 UTC (permalink / raw)
  To: David Daney; +Cc: Paul Martin, linux-mips

David Daney <ddaney.cavm@gmail.com> writes:

> On 02/25/2015 01:31 PM, Måns Rullgård wrote:
>> Paul Martin <paul.martin@codethink.co.uk> writes:
>>
>>> 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?
>
>>> 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.
>>
>> 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.

> 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:

diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c
index d2c09f6..57f0353 100644
--- a/arch/mips/kernel/elf.c
+++ b/arch/mips/kernel/elf.c
@@ -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);

-- 
Måns Rullgård
mans@mansr.com

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-25 21:40   ` David Daney
  2015-02-25 21:48     ` Måns Rullgård
@ 2015-02-26 11:29     ` Måns Rullgård
  2015-02-27 10:53       ` Paul Martin
  1 sibling, 1 reply; 7+ messages in thread
From: Måns Rullgård @ 2015-02-26 11:29 UTC (permalink / raw)
  To: David Daney; +Cc: Paul Martin, linux-mips

David Daney <ddaney.cavm@gmail.com> writes:

> On 02/25/2015 01:31 PM, Måns Rullgård wrote:
>> Paul Martin <paul.martin@codethink.co.uk> writes:
>>
>>> 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?
>
>>> 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.
>>
>> 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.

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

-- 
Måns Rullgård
mans@mansr.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 4.0-rc1 breakage in FPE?
  2015-02-26 11:29     ` Måns Rullgård
@ 2015-02-27 10:53       ` Paul Martin
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Martin @ 2015-02-27 10:53 UTC (permalink / raw)
  To: linux-mips

On Thu, Feb 26, 2015 at 11:29:46AM +0000, Måns Rullgård wrote:

> 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.

-- 
Paul Martin                                  http://www.codethink.co.uk/
Senior Software Developer, Codethink Ltd.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-27 10:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 18:20 4.0-rc1 breakage in FPE? Paul Martin
2015-02-25 21:30 ` Måns Rullgård
2015-02-25 21:31 ` Måns Rullgård
2015-02-25 21:40   ` David Daney
2015-02-25 21:48     ` Måns Rullgård
2015-02-26 11:29     ` Måns Rullgård
2015-02-27 10:53       ` Paul Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.