Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410241

Re: [PATCH] MIPS: lib: Mark intrinsics notrace

From Harvey Hunt <harvey.hunt@imgtec.com>
Newsgroups linux.kernel
Subject Re: [PATCH] MIPS: lib: Mark intrinsics notrace
Date 2016-05-31 14:20 +0200
Message-ID <rEQOl-2Al-15@gated-at.bofh.it> (permalink)
References <rCDVf-89T-3@gated-at.bofh.it> <rEg89-331-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Ralf,

On 29/05/16 22:03, Ralf Baechle wrote:
> On Wed, May 25, 2016 at 11:06:35AM +0100, Harvey Hunt wrote:
>
>> On certain MIPS32 devices, the ftrace tracer "function_graph" uses
>> __lshrdi3() during the capturing of trace data. ftrace then attempts to
>> trace __lshrdi3() which leads to infinite recursion and a stack overflow.
>> Fix this by marking __lshrdi3() as notrace. Mark the other compiler
>> intrinsics as notrace in case the compiler decides to use them in the
>> ftrace path.
>
> Makes perfect sense - but I'm wondering how you triggered it.  Was this
> a build with the GCC option -Os that is CONFIG_CC_OPTIMIZE_FOR_SIZE?
> Usually people build with CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE that is -O2
> which results in intrinsics being inlined.

This is triggered by building with CONFIG_CC_OPTIMIZE_FOR_SIZE. This 
explains why I only saw it on certain MIPS32 devices - Malta's 
defconfigs don't have CONFIG_CC_OPTIMIZE_FOR_SIZE enabled, but the 
pistachio and Ci20 defconfigs do.

>
>   Ralf
>

Thanks,

Harvey

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] MIPS: lib: Mark intrinsics notrace Harvey Hunt <harvey.hunt@imgtec.com> - 2016-05-25 12:10 +0200
  Re: [PATCH] MIPS: lib: Mark intrinsics notrace Ralf Baechle <ralf@linux-mips.org> - 2016-05-29 23:10 +0200
    Re: [PATCH] MIPS: lib: Mark intrinsics notrace Harvey Hunt <harvey.hunt@imgtec.com> - 2016-05-31 14:20 +0200

csiph-web