]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: fix arg5 and up retrieval for FBT entry probes on x86
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 11 Dec 2017 20:20:16 +0000 (15:20 -0500)
committerKris Van Hees <kris.van.hees@oracle.com>
Fri, 15 Dec 2017 05:28:13 +0000 (00:28 -0500)
commit00e6db9038bf73605544ea430012f5272c348091
treec70402e0af57953884cef6a00f1a55227cf954ef
parentc957190d1d12eac1f98a7440d1835d05e3e13882
dtrace: fix arg5 and up retrieval for FBT entry probes on x86

When tracing function entry using FBT entry probes, access to all the
function arguments should be supported.  The existing code supported
access up to the 5th argument, but would yield incorrect results for
any argument beyond that.  On some kernels it could result in a crash
when the 6th (or higher) argument was being retrieved.

The reason for the problem lies in the fact that the first 5 arguments
could be read directly from the register set, whereas the 6th argument
and beyond needs to be retrieved from the stack.  The generic code
implementing retrieval of arguments turns out to be incorrect for FBT
entry probes.

Thi commit introduces a FBT-specific function to access function
arguments.

Orabug: 25949088
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
arch/x86/dtrace/fbt_x86_64.c
dtrace/fbt_impl.h
dtrace/fbt_mod.c
kernel/dtrace/dtrace_os.c