Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __ASM_SH_KPROBES_H
 3#define __ASM_SH_KPROBES_H
 4
 5#include <asm-generic/kprobes.h>
 6
 7#define BREAKPOINT_INSTRUCTION	0xc33a
 8
 9#ifdef CONFIG_KPROBES
10
11#include <linux/types.h>
12#include <linux/ptrace.h>
13
14typedef insn_size_t kprobe_opcode_t;
 
15
16#define MAX_INSN_SIZE 16
17#define MAX_STACK_SIZE 64
18#define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
19	(((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
20	? (MAX_STACK_SIZE) \
21	: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
22
23#define flush_insn_slot(p)		do { } while (0)
24#define kretprobe_blacklist_size	0
25
26struct kprobe;
27
28void arch_remove_kprobe(struct kprobe *);
29void kretprobe_trampoline(void);
 
30
31/* Architecture specific copy of original instruction*/
32struct arch_specific_insn {
33	/* copy of the original instruction */
34	kprobe_opcode_t insn[MAX_INSN_SIZE];
35};
36
37struct prev_kprobe {
38	struct kprobe *kp;
39	unsigned long status;
40};
41
42/* per-cpu kprobe control block */
43struct kprobe_ctlblk {
44	unsigned long kprobe_status;
 
 
 
45	struct prev_kprobe prev_kprobe;
46};
47
48extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49extern int kprobe_exceptions_notify(struct notifier_block *self,
50				    unsigned long val, void *data);
51extern int kprobe_handle_illslot(unsigned long pc);
52#else
53
54#define kprobe_handle_illslot(pc)	(-1)
55
56#endif /* CONFIG_KPROBES */
57#endif /* __ASM_SH_KPROBES_H */
v3.15
 
 1#ifndef __ASM_SH_KPROBES_H
 2#define __ASM_SH_KPROBES_H
 3
 
 
 
 
 4#ifdef CONFIG_KPROBES
 5
 6#include <linux/types.h>
 7#include <linux/ptrace.h>
 8
 9typedef insn_size_t kprobe_opcode_t;
10#define BREAKPOINT_INSTRUCTION	0xc33a
11
12#define MAX_INSN_SIZE 16
13#define MAX_STACK_SIZE 64
14#define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
15	(((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
16	? (MAX_STACK_SIZE) \
17	: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
18
19#define flush_insn_slot(p)		do { } while (0)
20#define kretprobe_blacklist_size	0
21
22struct kprobe;
23
24void arch_remove_kprobe(struct kprobe *);
25void kretprobe_trampoline(void);
26void jprobe_return_end(void);
27
28/* Architecture specific copy of original instruction*/
29struct arch_specific_insn {
30	/* copy of the original instruction */
31	kprobe_opcode_t insn[MAX_INSN_SIZE];
32};
33
34struct prev_kprobe {
35	struct kprobe *kp;
36	unsigned long status;
37};
38
39/* per-cpu kprobe control block */
40struct kprobe_ctlblk {
41	unsigned long kprobe_status;
42	unsigned long jprobe_saved_r15;
43	struct pt_regs jprobe_saved_regs;
44	kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
45	struct prev_kprobe prev_kprobe;
46};
47
48extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49extern int kprobe_exceptions_notify(struct notifier_block *self,
50				    unsigned long val, void *data);
51extern int kprobe_handle_illslot(unsigned long pc);
52#else
53
54#define kprobe_handle_illslot(pc)	(-1)
55
56#endif /* CONFIG_KPROBES */
57#endif /* __ASM_SH_KPROBES_H */