/arch/ia64/kernel/ |
D | ftrace.c | 22 ftrace_orig_code[MCOUNT_INSN_SIZE] = { 41 static unsigned char ftrace_nop_code[MCOUNT_INSN_SIZE] = { 60 ftrace_call_code[MCOUNT_INSN_SIZE] = { 97 unsigned char replaced[MCOUNT_INSN_SIZE]; in ftrace_modify_code() 111 if (copy_from_kernel_nofault(replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 115 if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) in ftrace_modify_code() 120 if (copy_to_kernel_nofault(((void *)ip), new_code, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 122 flush_icache_range(ip, ip + MCOUNT_INSN_SIZE); in ftrace_modify_code() 129 unsigned char __attribute__((aligned(8))) replaced[MCOUNT_INSN_SIZE]; in ftrace_make_nop_check() 132 if (copy_from_kernel_nofault(replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_make_nop_check() [all …]
|
/arch/sh/kernel/ |
D | ftrace.c | 27 static unsigned char ftrace_replaced_code[MCOUNT_INSN_SIZE]; 50 __raw_writel(ip + MCOUNT_INSN_SIZE, ftrace_nop); in ftrace_nop_replace() 123 MCOUNT_INSN_SIZE); in ftrace_mod_code() 195 unsigned char replaced[MCOUNT_INSN_SIZE]; in ftrace_modify_code() 206 if (copy_from_kernel_nofault(replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 210 if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) in ftrace_modify_code() 217 flush_icache_range(ip, ip + MCOUNT_INSN_SIZE); in ftrace_modify_code() 225 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() 227 memcpy(old, (unsigned char *)ip, MCOUNT_INSN_SIZE); in ftrace_update_ftrace_func() 269 unsigned char code[MCOUNT_INSN_SIZE]; in ftrace_mod() [all …]
|
/arch/nds32/kernel/ |
D | ftrace.c | 25 ftrace_trace_function(ip - MCOUNT_INSN_SIZE, parent_ip, in _mcount() 65 "addi $r0, %1, #-" XSTR(MCOUNT_INSN_SIZE) "\n\t" in _ftrace_caller() 135 MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 137 if (memcmp(orig_insn, old_insn, MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 141 if (copy_to_kernel_nofault((void *)pc, new_insn, MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 156 flush_icache_range(pc, pc + MCOUNT_INSN_SIZE); in ftrace_modify_code() 219 (unsigned long)(__builtin_return_address(1) - MCOUNT_INSN_SIZE); in ftrace_graph_caller()
|
/arch/csky/kernel/probes/ |
D | ftrace.c | 30 p = get_kprobe((kprobe_opcode_t *)(ip - MCOUNT_INSN_SIZE)); in kprobe_ftrace_handler() 43 ip -= MCOUNT_INSN_SIZE; in kprobe_ftrace_handler() 53 (unsigned long)p->addr + MCOUNT_INSN_SIZE); in kprobe_ftrace_handler()
|
/arch/riscv/kernel/ |
D | ftrace.c | 52 MCOUNT_INSN_SIZE)) in ftrace_check_current_call() 82 ((void *)hook_pos, enable ? call : nops, MCOUNT_INSN_SIZE)) in __ftrace_modify_call() 94 if (patch_text_nosync((void *)rec->ip, call, MCOUNT_INSN_SIZE)) in ftrace_make_call() 105 if (patch_text_nosync((void *)rec->ip, nops, MCOUNT_INSN_SIZE)) in ftrace_make_nop()
|
/arch/x86/kernel/ |
D | ftrace.c | 79 char cur_code[MCOUNT_INSN_SIZE]; in ftrace_verify_code() 89 if (copy_from_kernel_nofault(cur_code, (void *)ip, MCOUNT_INSN_SIZE)) { in ftrace_verify_code() 95 if (memcmp(cur_code, old_code, MCOUNT_INSN_SIZE) != 0) { in ftrace_verify_code() 119 text_poke_queue((void *)ip, new_code, MCOUNT_INSN_SIZE, NULL); in ftrace_modify_code_direct() 121 text_poke_early((void *)ip, new_code, MCOUNT_INSN_SIZE); in ftrace_modify_code_direct() 186 text_poke_bp((void *)ip, new, MCOUNT_INSN_SIZE, NULL); in ftrace_update_ftrace_func() 190 text_poke_bp((void *)ip, new, MCOUNT_INSN_SIZE, NULL); in ftrace_update_ftrace_func() 247 text_poke_queue((void *)rec->ip, new, MCOUNT_INSN_SIZE, NULL); in ftrace_replace_code() 510 text_poke_bp((void *)ip, new, MCOUNT_INSN_SIZE, NULL); in arch_ftrace_update_trampoline() 607 text_poke_bp((void *)ip, new, MCOUNT_INSN_SIZE, NULL); in ftrace_mod_jmp()
|
D | ftrace_32.S | 62 subl $MCOUNT_INSN_SIZE, %eax 134 subl $MCOUNT_INSN_SIZE, %eax 175 subl $MCOUNT_INSN_SIZE, %eax
|
/arch/powerpc/kernel/ |
D | kprobes-ftrace.c | 42 regs_add_return_ip(regs, -MCOUNT_INSN_SIZE); in kprobe_ftrace_handler() 51 regs_add_return_ip(regs, MCOUNT_INSN_SIZE); in kprobe_ftrace_handler()
|
/arch/powerpc/kernel/trace/ |
D | ftrace_64_pg.S | 24 subi r3, r3, MCOUNT_INSN_SIZE 47 subi r4, r4, MCOUNT_INSN_SIZE
|
D | ftrace_32.S | 31 subi r3, r3, MCOUNT_INSN_SIZE 56 subi r4, r4, MCOUNT_INSN_SIZE
|
D | ftrace_64_mprofile.S | 87 subi r3, r7, MCOUNT_INSN_SIZE 185 subi r3, r7, MCOUNT_INSN_SIZE 307 subi r4, r4, MCOUNT_INSN_SIZE
|
/arch/microblaze/include/asm/ |
D | ftrace.h | 8 #define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */ macro
|
/arch/csky/include/asm/ |
D | ftrace.h | 6 #define MCOUNT_INSN_SIZE 14 macro
|
/arch/parisc/include/asm/ |
D | ftrace.h | 9 #define MCOUNT_INSN_SIZE 4 macro
|
/arch/sparc/include/asm/ |
D | ftrace.h | 7 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/arch/ia64/include/asm/ |
D | ftrace.h | 6 #define MCOUNT_INSN_SIZE 32 /* sizeof mcount call */ macro
|
/arch/xtensa/include/asm/ |
D | ftrace.h | 32 #define MCOUNT_INSN_SIZE 3 macro
|
/arch/sh/include/asm/ |
D | ftrace.h | 7 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/arch/nds32/include/asm/ |
D | ftrace.h | 14 #define MCOUNT_INSN_SIZE 12 macro
|
/arch/arm/include/asm/ |
D | ftrace.h | 11 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/arch/arm64/include/asm/ |
D | ftrace.h | 22 #define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE macro
|
/arch/s390/include/asm/ |
D | ftrace.h | 7 #define MCOUNT_INSN_SIZE 6 macro
|
/arch/xtensa/kernel/ |
D | mcount.S | 41 addi a6, a6, -MCOUNT_INSN_SIZE
|
/arch/mips/include/asm/ |
D | ftrace.h | 16 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/arch/x86/include/asm/ |
D | ftrace.h | 10 #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ macro
|