#ifndef __X86_KERNEL_KPROBES_COMMON_H
#define __X86_KERNEL_KPROBES_COMMON_H
#include <asm/asm.h>
#include <asm/frame.h>
#include <asm/insn.h>
#ifdef CONFIG_X86_64
#define SAVE_REGS_STRING …
#define RESTORE_REGS_STRING …
#else
#define SAVE_REGS_STRING …
#define RESTORE_REGS_STRING …
#endif
extern bool can_boost(struct insn *insn, void *orig_addr);
extern unsigned long recover_probed_instruction(kprobe_opcode_t *buf,
unsigned long addr);
extern int __copy_instruction(u8 *dest, u8 *src, u8 *real, struct insn *insn);
extern void synthesize_reljump(void *dest, void *from, void *to);
extern void synthesize_relcall(void *dest, void *from, void *to);
#ifdef CONFIG_OPTPROBES
extern int setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter);
extern unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr);
#else
static inline int setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter)
{
return 0;
}
static inline unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr)
{
return addr;
}
#endif
#endif