public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Mathias Krause <minipli@googlemail.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf x86: Fix perf to use non-executable stack, again
Date: Wed, 7 May 2014 18:34:43 +0200	[thread overview]
Message-ID: <20140507163443.GA16034@gmail.com> (raw)
In-Reply-To: <CA+rthh-Vajbb1XNtbjJgU7_F-SRz1v0jem4WhGQX7apRxB6amw@mail.gmail.com>


* Mathias Krause <minipli@googlemail.com> wrote:

> On 27 April 2014 18:16, Jiri Olsa <jolsa@redhat.com> wrote:
> > 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
> 
> Well, it might work on your system but it won't work on mine. See this
> bug, why: https://sourceware.org/bugzilla/show_bug.cgi?id=12492
> 
> > [...]
> >>
> >> > 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
> 
> Of course, it could be disabled, i.e. I could allow perf to get an 
> executable stack. Though, I don't like my stacks to be executable ;)

Absolutely. Using an executable stack is really just a legacy thing, 
it should be avoided (and I'd say it must be avoided) in any modern 
application.

Thanks,

	Ingo

      reply	other threads:[~2014-05-07 16:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-26 19:02 [PATCH] perf x86: Fix perf to use non-executable stack, again Mathias Krause
2014-04-27  9:26 ` Jiri Olsa
2014-04-27 10:03   ` Mathias Krause
2014-04-27 10:39     ` Jiri Olsa
2014-04-27 11:49       ` Ingo Molnar
2014-04-27 16:07       ` Mathias Krause
2014-04-27 16:16         ` Jiri Olsa
2014-04-27 16:29           ` Mathias Krause
2014-05-07 16:34             ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140507163443.GA16034@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=minipli@googlemail.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox