diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2018-06-07 12:52:02 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-20 05:26:43 +0300 |
commit | 7cd01b08d35f1b7d55686ed8cd57c94d3406ec8f (patch) | |
tree | ba2112d797cf4e9ba7c690fe9bbe07dad8d5a873 /arch/powerpc/lib/Makefile | |
parent | b4d16ab58c41ff0125822464bdff074cebd0fe47 (diff) | |
download | linux-7cd01b08d35f1b7d55686ed8cd57c94d3406ec8f.tar.xz |
powerpc: Add support for function error injection
We implement regs_set_return_value() and override_function_with_return()
for this purpose.
On powerpc, a return from a function (blr) just branches to the location
contained in the link register. So, we can just update pt_regs rather
than redirecting execution to a dummy function that returns.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib/Makefile')
-rw-r--r-- | arch/powerpc/lib/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 703afa1808ed..3bf9fc6fd36c 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -12,6 +12,8 @@ obj-y += string.o alloc.o code-patching.o feature-fixups.o obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o strlen_32.o +obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o + # See corresponding test in arch/powerpc/Makefile # 64-bit linker creates .sfpr on demand for final link (vmlinux), # so it is only needed for modules, and only for older linkers which |