2019-06-04 08:11:33 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2013-01-22 11:33:59 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ARC_KPROBES_H
|
|
|
|
#define _ARC_KPROBES_H
|
|
|
|
|
2017-02-27 22:26:56 +00:00
|
|
|
#include <asm-generic/kprobes.h>
|
|
|
|
|
2013-01-22 11:33:59 +00:00
|
|
|
#ifdef CONFIG_KPROBES
|
|
|
|
|
|
|
|
typedef u16 kprobe_opcode_t;
|
|
|
|
|
|
|
|
#define UNIMP_S_INSTRUCTION 0x79e0
|
|
|
|
#define TRAP_S_2_INSTRUCTION 0x785e
|
|
|
|
|
|
|
|
#define MAX_INSN_SIZE 8
|
|
|
|
#define MAX_STACK_SIZE 64
|
|
|
|
|
|
|
|
struct arch_specific_insn {
|
|
|
|
int is_short;
|
|
|
|
kprobe_opcode_t *t1_addr, *t2_addr;
|
|
|
|
kprobe_opcode_t t1_opcode, t2_opcode;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define flush_insn_slot(p) do { } while (0)
|
|
|
|
|
|
|
|
#define kretprobe_blacklist_size 0
|
|
|
|
|
|
|
|
struct kprobe;
|
|
|
|
|
|
|
|
void arch_remove_kprobe(struct kprobe *p);
|
|
|
|
|
|
|
|
int kprobe_exceptions_notify(struct notifier_block *self,
|
|
|
|
unsigned long val, void *data);
|
|
|
|
|
|
|
|
struct prev_kprobe {
|
|
|
|
struct kprobe *kp;
|
|
|
|
unsigned long status;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kprobe_ctlblk {
|
|
|
|
unsigned int kprobe_status;
|
|
|
|
struct prev_kprobe prev_kprobe;
|
|
|
|
};
|
|
|
|
|
|
|
|
int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
|
2021-09-14 14:40:54 +00:00
|
|
|
void __kretprobe_trampoline(void);
|
2013-06-12 09:43:40 +00:00
|
|
|
void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
|
2013-01-22 11:33:59 +00:00
|
|
|
#else
|
2017-03-30 17:02:57 +00:00
|
|
|
#define trap_is_kprobe(address, regs)
|
2017-02-27 22:26:56 +00:00
|
|
|
#endif /* CONFIG_KPROBES */
|
2013-01-22 11:33:59 +00:00
|
|
|
|
2017-02-27 22:26:56 +00:00
|
|
|
#endif /* _ARC_KPROBES_H */
|