kprobes.h (a0266c214fab21371a499e6ab1c9385cc6589189) | kprobes.h (0dc016dbd820260b8ea74337980735b8c88d4ef2) |
---|---|
1/* 2 * arch/arm/include/asm/kprobes.h 3 * 4 * Copyright (C) 2006, 2007 Motorola Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 36 unchanged lines hidden (view full) --- 45 char jprobes_stack[MAX_STACK_SIZE]; 46}; 47 48void arch_remove_kprobe(struct kprobe *); 49int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); 50int kprobe_exceptions_notify(struct notifier_block *self, 51 unsigned long val, void *data); 52 | 1/* 2 * arch/arm/include/asm/kprobes.h 3 * 4 * Copyright (C) 2006, 2007 Motorola Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 36 unchanged lines hidden (view full) --- 45 char jprobes_stack[MAX_STACK_SIZE]; 46}; 47 48void arch_remove_kprobe(struct kprobe *); 49int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); 50int kprobe_exceptions_notify(struct notifier_block *self, 51 unsigned long val, void *data); 52 |
53/* optinsn template addresses */ 54extern __visible kprobe_opcode_t optprobe_template_entry; 55extern __visible kprobe_opcode_t optprobe_template_val; 56extern __visible kprobe_opcode_t optprobe_template_call; 57extern __visible kprobe_opcode_t optprobe_template_end; 58extern __visible kprobe_opcode_t optprobe_template_sub_sp; 59extern __visible kprobe_opcode_t optprobe_template_add_sp; |
|
53 | 60 |
61#define MAX_OPTIMIZED_LENGTH 4 62#define MAX_OPTINSN_SIZE \ 63 ((unsigned long)&optprobe_template_end - \ 64 (unsigned long)&optprobe_template_entry) 65#define RELATIVEJUMP_SIZE 4 66 67struct arch_optimized_insn { 68 /* 69 * copy of the original instructions. 70 * Different from x86, ARM kprobe_opcode_t is u32. 71 */ 72#define MAX_COPIED_INSN DIV_ROUND_UP(RELATIVEJUMP_SIZE, sizeof(kprobe_opcode_t)) 73 kprobe_opcode_t copied_insn[MAX_COPIED_INSN]; 74 /* detour code buffer */ 75 kprobe_opcode_t *insn; 76 /* 77 * We always copy one instruction on ARM, 78 * so size will always be 4, and unlike x86, there is no 79 * need for a size field. 80 */ 81}; 82 |
|
54#endif /* _ARM_KPROBES_H */ | 83#endif /* _ARM_KPROBES_H */ |