]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ptrace: Add function argument access API
authorMasami Hiramatsu <mhiramat@kernel.org>
Fri, 12 Apr 2019 14:22:01 +0000 (23:22 +0900)
committerWill Deacon <will.deacon@arm.com>
Fri, 12 Apr 2019 16:04:27 +0000 (17:04 +0100)
commit25b326051224ad5a74f1d1281355475a3a38fd33
treec1e5fa47ee4c105168ad1fbc08529f85e785a110
parentdb6c2c7a0c6442292a0b5de039f9840675c657f9
arm64: ptrace: Add function argument access API

Add regs_get_argument() which returns N th argument of the function
call. On arm64, it supports up to 8th argument.
Note that this chooses most probably assignment, in some case
it can be incorrect (e.g. passing data structure or floating
point etc.)

This enables ftrace kprobe events to access kernel function
arguments via $argN syntax.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
[will: tidied up the comment a bit]
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/Kconfig
arch/arm64/include/asm/ptrace.h