Re: [PATCH] perf, tool: Fix perf stack to non executable on x86_64

From: Eric Dumazet
Date: Fri Feb 03 2012 - 04:50:54 EST


Le mercredi 01 fÃvrier 2012 Ã 13:54 +0100, Jiri Olsa a Ãcrit :
> By adding following objects:
> bench/mem-memset-x86-64-asm.o
> bench/mem-memcpy-x86-64-asm.o
> the x86_64 perf binary ended up with executable stack.
>
> The reason was that above objects are assembler sourced and
> are 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 objects,
> with all flags disabled, thus omiting those objects from linker
> stack flags decision.
>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> ---

Good catch, thanks !

Acked-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/