]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix perf stack to non executable on x86_64
authorJiri Olsa <jolsa@redhat.com>
Mon, 6 Feb 2012 20:54:06 +0000 (18:54 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Feb 2012 20:54:06 +0000 (18:54 -0200)
commit2a624320f359599c7bc4300af168d1d5ae021e6e
tree729e6000f76c585117d43e1c050ea0bdacefec02
parentbc8afcc0ba39e808b25136383612b60b51341bc8
perf tools: Fix perf stack to non executable on x86_64

By adding following objects:
  bench/mem-memcpy-x86-64-asm.o
the x86_64 perf binary ended up with executable stack.

The reason was that above object are assembler sourced and is missing the
GNU-stack note section. In such case the linker assumes that the final binary
should not be restricted at all and mark the stack as RWX.

Adding section ".note.GNU-stack" definition to mentioned object, with all
flags disabled, thus omiting this object from linker stack flags decision.

Problem introduced in:

  $ git describe 615948d
  v2.6.37-rc2-19-gea7872b

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=783570
Reported-by: Clark Williams <williams@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/1328100848-5630-1-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
[ committer note: Backported fix to perf/urgent (3.3-rc2+) ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/mem-memcpy-x86-64-asm.S