mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
aaa4dd1b47
This enables HAVE_FUNCTION_ERROR_INJECTION by adding necessary regs_set_return_value() and override_function_with_return(). Simply tested according to Documentation/fault-injection/fault-injection.rst. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
11 lines
255 B
C
11 lines
255 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/error-injection.h>
|
|
#include <linux/kprobes.h>
|
|
|
|
void override_function_with_return(struct pt_regs *regs)
|
|
{
|
|
instruction_pointer_set(regs, regs->ARM_lr);
|
|
}
|
|
NOKPROBE_SYMBOL(override_function_with_return);
|