mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-03 08:14:12 +00:00
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>
This commit is contained in:
committed by
Michael Ellerman
parent
b4d16ab58c
commit
7cd01b08d3
13
arch/powerpc/include/asm/error-injection.h
Normal file
13
arch/powerpc/include/asm/error-injection.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
|
||||
#ifndef _ASM_ERROR_INJECTION_H
|
||||
#define _ASM_ERROR_INJECTION_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm-generic/error-injection.h>
|
||||
|
||||
void override_function_with_return(struct pt_regs *regs);
|
||||
|
||||
#endif /* _ASM_ERROR_INJECTION_H */
|
||||
Reference in New Issue
Block a user