2019-05-19 13:51:43 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2014-12-16 17:58:19 +00:00
|
|
|
/*
|
|
|
|
* livepatch.h - x86-specific Kernel Live Patching Core
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Seth Jennings <sjenning@redhat.com>
|
|
|
|
* Copyright (C) 2014 SUSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_X86_LIVEPATCH_H
|
|
|
|
#define _ASM_X86_LIVEPATCH_H
|
|
|
|
|
2015-04-27 11:25:23 +00:00
|
|
|
#include <asm/setup.h>
|
2014-12-19 06:11:17 +00:00
|
|
|
#include <linux/ftrace.h>
|
2014-12-16 17:58:19 +00:00
|
|
|
|
2020-10-28 21:15:27 +00:00
|
|
|
static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip)
|
2014-12-19 06:11:17 +00:00
|
|
|
{
|
2020-10-28 21:15:27 +00:00
|
|
|
ftrace_instruction_pointer_set(fregs, ip);
|
2014-12-19 06:11:17 +00:00
|
|
|
}
|
2014-12-16 17:58:19 +00:00
|
|
|
|
|
|
|
#endif /* _ASM_X86_LIVEPATCH_H */
|