/Linux-v4.19/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 (probe_kernel_read(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 (probe_kernel_write(((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 (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_make_nop_check() [all …]
|
/Linux-v4.19/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 (probe_kernel_read(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 …]
|
/Linux-v4.19/arch/x86/kernel/ |
D | ftrace.c | 50 char code[MCOUNT_INSN_SIZE]; 67 calc.offset = ftrace_calc_offset(ip + MCOUNT_INSN_SIZE, addr); in ftrace_call_replace() 107 unsigned char replaced[MCOUNT_INSN_SIZE]; in ftrace_modify_code_direct() 120 if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_modify_code_direct() 124 if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) in ftrace_modify_code_direct() 130 if (probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE)) in ftrace_modify_code_direct() 234 unsigned char old[MCOUNT_INSN_SIZE]; in update_ftrace_func() 237 memcpy(old, (void *)ip, MCOUNT_INSN_SIZE); in update_ftrace_func() 298 regs->ip += MCOUNT_INSN_SIZE - 1; in ftrace_int3_handler() 315 unsigned char replaced[MCOUNT_INSN_SIZE]; in add_break() [all …]
|
D | ftrace_32.S | 75 subl $MCOUNT_INSN_SIZE, %eax 135 subl $MCOUNT_INSN_SIZE, %eax /* Adjust ip */ 199 subl $MCOUNT_INSN_SIZE, %eax 225 subl $MCOUNT_INSN_SIZE, %eax
|
/Linux-v4.19/arch/s390/include/asm/ |
D | ftrace.h | 8 #define MCOUNT_INSN_SIZE 6 macro 10 #define MCOUNT_INSN_SIZE 24 macro 52 insn->disp = MCOUNT_INSN_SIZE / 2; in ftrace_generate_nop_insn() 64 if (insn->disp == MCOUNT_INSN_SIZE / 2) in is_ftrace_nop()
|
/Linux-v4.19/arch/nds32/kernel/ |
D | ftrace.c | 26 ftrace_trace_function(ip - MCOUNT_INSN_SIZE, parent_ip, in _mcount() 66 "addi $r0, %1, #-" XSTR(MCOUNT_INSN_SIZE) "\n\t" in _ftrace_caller() 147 if (probe_kernel_read(orig_insn, (void *)pc, MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 149 if (memcmp(orig_insn, old_insn, MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 153 if (probe_kernel_write((void *)pc, new_insn, MCOUNT_INSN_SIZE)) in __ftrace_modify_code() 168 flush_icache_range(pc, pc + MCOUNT_INSN_SIZE); in ftrace_modify_code() 245 (unsigned long)(__builtin_return_address(1) - MCOUNT_INSN_SIZE); in ftrace_graph_caller()
|
/Linux-v4.19/arch/riscv/kernel/ |
D | ftrace.c | 27 if (probe_kernel_read(replaced, (void *)hook_pos, MCOUNT_INSN_SIZE)) in ftrace_check_current_call() 55 MCOUNT_INSN_SIZE); in __ftrace_modify_call() 61 flush_icache_range((void *)hook_pos, (void *)hook_pos + MCOUNT_INSN_SIZE); in __ftrace_modify_call()
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | kprobes-ftrace.c | 47 regs->nip -= MCOUNT_INSN_SIZE; in kprobe_ftrace_handler() 56 regs->nip += MCOUNT_INSN_SIZE; in kprobe_ftrace_handler()
|
/Linux-v4.19/arch/powerpc/kernel/trace/ |
D | ftrace_64_pg.S | 28 subi r3, r3, MCOUNT_INSN_SIZE 50 subi r4, r4, MCOUNT_INSN_SIZE
|
D | ftrace_32.S | 35 subi r3, r3, MCOUNT_INSN_SIZE 59 subi r4, r4, MCOUNT_INSN_SIZE
|
D | ftrace_64_mprofile.S | 87 subi r3, r7, MCOUNT_INSN_SIZE 183 subi r3, r7, MCOUNT_INSN_SIZE 304 subi r4, r4, MCOUNT_INSN_SIZE
|
D | ftrace.c | 60 if (probe_kernel_read(&replaced, (void *)ip, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 182 if (probe_kernel_read(&op, (void *)(ip+4), MCOUNT_INSN_SIZE)) { in __ftrace_make_nop() 211 if (probe_kernel_read(&op, (void *)ip, MCOUNT_INSN_SIZE)) in __ftrace_make_nop() 426 if (probe_kernel_read(&op, (void *)ip, MCOUNT_INSN_SIZE))
|
/Linux-v4.19/arch/arm/kernel/ |
D | ftrace.c | 118 if (probe_kernel_read(&replaced, (void *)pc, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 125 if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 128 flush_icache_range(pc, pc + MCOUNT_INSN_SIZE); in ftrace_modify_code()
|
/Linux-v4.19/arch/s390/kernel/ |
D | mcount.S | 47 aghik %r2,%r0,-MCOUNT_INSN_SIZE 52 aghi %r2,-MCOUNT_INSN_SIZE
|
/Linux-v4.19/arch/parisc/include/asm/ |
D | ftrace.h | 8 #define MCOUNT_INSN_SIZE 4 macro
|
/Linux-v4.19/arch/microblaze/include/asm/ |
D | ftrace.h | 8 #define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */ macro
|
/Linux-v4.19/arch/sparc/include/asm/ |
D | ftrace.h | 7 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/Linux-v4.19/arch/ia64/include/asm/ |
D | ftrace.h | 6 #define MCOUNT_INSN_SIZE 32 /* sizeof mcount call */ macro
|
/Linux-v4.19/arch/arm64/include/asm/ |
D | ftrace.h | 17 #define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE macro
|
/Linux-v4.19/arch/xtensa/include/asm/ |
D | ftrace.h | 32 #define MCOUNT_INSN_SIZE 3 macro
|
/Linux-v4.19/arch/sh/include/asm/ |
D | ftrace.h | 7 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/Linux-v4.19/arch/nds32/include/asm/ |
D | ftrace.h | 14 #define MCOUNT_INSN_SIZE 12 macro
|
/Linux-v4.19/arch/arm/include/asm/ |
D | ftrace.h | 11 #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ macro
|
/Linux-v4.19/arch/riscv/include/asm/ |
D | ftrace.h | 65 #define MCOUNT_INSN_SIZE 8 macro
|
/Linux-v4.19/arch/x86/include/asm/ |
D | ftrace.h | 12 #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ macro
|