lkml.org 
[lkml]   [2014]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf x86: Fix perf to use non-executable stack, again
On Sun, Apr 27, 2014 at 06:07:30PM +0200, Mathias Krause wrote:
> On 27 April 2014 12:39, Jiri Olsa <jolsa@redhat.com> wrote:
> > On Sun, Apr 27, 2014 at 12:03:50PM +0200, Mathias Krause wrote:
> > [...]
> >> 2/ What if somebody tries to add/link code to perf that makes use of
> >> nested functions? That'll make perf fail as the trampoline code
> >> generated by gcc won't be executable due to the enforced
> >> non-executable stack by -Wl,-z,noexecstack.
> >
> > I guess in that case he would change the Makefile as well?
>
> Not necessarily. What if a later version of a library already used by
> perf needs an executable stack because it now makes use of nested
> functions? Unlikely, though in that case no change to perf would be
> made, but perf would then require an executable stack, too.

I tried you can run binary with noexecstack having dynamic
library dependency wit execstack

>
> Anyway, as Ingo votes for the global linker option as well, I'll send
> a v2 of the patch containing your suggested linker flag.

cool

>
> > anyway I have no objection for leaving that code in assembly
> > objects, but I suggest we use the global option as well to
> > prevent any future surprise..
>
> Okay.
>
> > or insert test case for perf's executable stack to 'perf test'
>
> That won't work for systems preventing processes getting an executable
> stack in the first place. That was the reason I stumbled about the

could be disabled on such systems

jirka


\
 
 \ /
  Last update: 2014-04-28 11:21    [W:0.128 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site