]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: prevent the stack protector from breaking syscall tracing.
authorNick Alcock <nick.alcock@oracle.com>
Thu, 13 Aug 2015 15:47:50 +0000 (16:47 +0100)
committerKris Van Hees <kris.van.hees@oracle.com>
Thu, 13 Aug 2015 16:49:31 +0000 (12:49 -0400)
commit07bc84b75a5e24359507576e0f172a1c2a67e486
treed6c889f8982c91bd10593cee66dec692c141cb1f
parent28df3b99a76e7a1bc9c9765706ff922ca36d1c29
dtrace: prevent the stack protector from breaking syscall tracing.

The systrace_syscall() function is unusual in that it requires %rax to be
conserved in the function prologue (until the volatile asm which collects the
syscall number from it and sticks it in a local variable). GCC doesn't know
about this, and recent GCC has started smashing it with the stack protector
prologue. Fix this by turning off stack protection in this one function (which
does not benefit from it anyway -- it contains only two assignments, neither of
which can overrun -- and is a notable hot spot).

Also declare it asmlinkage, like every other syscall already is: it is called
from asm, just like them.

Orabug: 21630345
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
arch/x86/kernel/dtrace_syscall.c