OSDN Git Service

arm64: Add support for function error injection
authorLeo Yan <leo.yan@linaro.org>
Tue, 6 Aug 2019 10:00:14 +0000 (18:00 +0800)
committerWill Deacon <will@kernel.org>
Wed, 7 Aug 2019 12:53:09 +0000 (13:53 +0100)
commit42d038c4fb00f1ec1a4c4616784da4561385b628
treec8c5335e01986c073ae56ca1df94eeed5c13fe1e
parent45880f7b7b19e043ce0aaa4cb7d05369425c82fa
arm64: Add support for function error injection

Inspired by the commit 7cd01b08d35f ("powerpc: Add support for function
error injection"), this patch supports function error injection for
Arm64.

This patch mainly support two functions: one is regs_set_return_value()
which is used to overwrite the return value; the another function is
override_function_with_return() which is to override the probed
function returning and jump to its caller.

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Kconfig
arch/arm64/include/asm/ptrace.h
arch/arm64/lib/Makefile
arch/arm64/lib/error-inject.c [new file with mode: 0644]