/kernel/entry/ |
D | common.c | 21 static __always_inline void enter_from_user_mode(struct pt_regs *regs) in enter_from_user_mode() argument 23 arch_check_user_regs(regs); in enter_from_user_mode() 34 static inline void syscall_enter_audit(struct pt_regs *regs, long syscall) in syscall_enter_audit() argument 39 syscall_get_arguments(current, regs, args); in syscall_enter_audit() 44 static long syscall_trace_enter(struct pt_regs *regs, long syscall, in syscall_trace_enter() argument 51 ret = arch_syscall_enter_tracehook(regs); in syscall_trace_enter() 64 syscall = syscall_get_nr(current, regs); in syscall_trace_enter() 67 trace_sys_enter(regs, syscall); in syscall_trace_enter() 69 syscall_enter_audit(regs, syscall); in syscall_trace_enter() 75 __syscall_enter_from_user_work(struct pt_regs *regs, long syscall) in __syscall_enter_from_user_work() argument [all …]
|
/kernel/trace/ |
D | trace_syscalls.c | 67 trace_get_syscall_nr(struct task_struct *task, struct pt_regs *regs) in trace_get_syscall_nr() argument 69 if (unlikely(arch_trace_is_compat_syscall(regs))) in trace_get_syscall_nr() 72 return syscall_get_nr(task, regs); in trace_get_syscall_nr() 76 trace_get_syscall_nr(struct task_struct *task, struct pt_regs *regs) in trace_get_syscall_nr() argument 78 return syscall_get_nr(task, regs); in trace_get_syscall_nr() 293 static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id) in ftrace_syscall_enter() argument 307 syscall_nr = trace_get_syscall_nr(current, regs); in ftrace_syscall_enter() 336 syscall_get_arguments(current, regs, args); in ftrace_syscall_enter() 343 static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) in ftrace_syscall_exit() argument 355 syscall_nr = trace_get_syscall_nr(current, regs); in ftrace_syscall_exit() [all …]
|
D | trace_uprobe.c | 98 static int uprobe_dispatcher(struct uprobe_consumer *con, struct pt_regs *regs); 100 unsigned long func, struct pt_regs *regs); 114 static unsigned long get_user_stack_nth(struct pt_regs *regs, unsigned int n) in get_user_stack_nth() argument 117 unsigned long addr = user_stack_pointer(regs); in get_user_stack_nth() 223 struct pt_regs *regs = rec; in process_fetch_insn() local 229 val = regs_get_register(regs, code->param); in process_fetch_insn() 232 val = get_user_stack_nth(regs, code->param); in process_fetch_insn() 235 val = user_stack_pointer(regs); in process_fetch_insn() 238 val = regs_return_value(regs); in process_fetch_insn() 947 unsigned long func, struct pt_regs *regs, in __uprobe_trace_func() argument [all …]
|
D | trace_kprobe.c | 240 static int kprobe_dispatcher(struct kprobe *kp, struct pt_regs *regs); 242 struct pt_regs *regs); 1338 struct pt_regs *regs = rec; in process_fetch_insn() local 1345 val = regs_get_register(regs, code->param); in process_fetch_insn() 1348 val = regs_get_kernel_stack_nth(regs, code->param); in process_fetch_insn() 1351 val = kernel_stack_pointer(regs); in process_fetch_insn() 1354 val = regs_return_value(regs); in process_fetch_insn() 1367 val = regs_get_kernel_argument(regs, code->param); in process_fetch_insn() 1384 __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs, in NOKPROBE_SYMBOL() 1401 dsize = __get_data_size(&tk->tp, regs); in NOKPROBE_SYMBOL() [all …]
|
D | bpf_trace.c | 133 BPF_CALL_2(bpf_override_return, struct pt_regs *, regs, unsigned long, rc) in BPF_CALL_2() argument 135 regs_set_return_value(regs, rc); in BPF_CALL_2() 136 override_function_with_return(regs); in BPF_CALL_2() 877 __bpf_perf_event_output(struct pt_regs *regs, struct bpf_map *map, in __bpf_perf_event_output() argument 903 return perf_event_output(event, sd, regs); in __bpf_perf_event_output() 916 BPF_CALL_5(bpf_perf_event_output, struct pt_regs *, regs, struct bpf_map *, map, in BPF_CALL_5() argument 945 err = __bpf_perf_event_output(regs, map, flags, sd); in BPF_CALL_5() 965 struct pt_regs regs[3]; member 988 struct pt_regs *regs; in bpf_event_output() local 1000 regs = this_cpu_ptr(&bpf_pt_regs.regs[nest_level - 1]); in bpf_event_output() [all …]
|
D | trace_event_perf.c | 395 void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp) in perf_trace_buf_alloc() argument 410 if (regs) in perf_trace_buf_alloc() 411 *regs = this_cpu_ptr(&__perf_regs[rctx]); in perf_trace_buf_alloc() 440 struct pt_regs regs; in perf_ftrace_function_call() local 461 memset(®s, 0, sizeof(regs)); in perf_ftrace_function_call() 462 perf_fetch_caller_regs(®s); in perf_ftrace_function_call() 471 1, ®s, &head, NULL); in perf_ftrace_function_call()
|
D | ftrace_internal.h | 14 int ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs); 36 ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) in ftrace_ops_test() argument
|
/kernel/events/ |
D | callchain.c | 39 struct pt_regs *regs) in perf_callchain_kernel() argument 44 struct pt_regs *regs) in perf_callchain_user() argument 180 get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, in get_perf_callchain() argument 197 if (kernel && !user_mode(regs)) { in get_perf_callchain() 200 perf_callchain_kernel(&ctx, regs); in get_perf_callchain() 204 if (!user_mode(regs)) { in get_perf_callchain() 206 regs = task_pt_regs(current); in get_perf_callchain() 208 regs = NULL; in get_perf_callchain() 211 if (regs) { in get_perf_callchain() 221 perf_callchain_user(&ctx, regs); in get_perf_callchain()
|
D | uprobes.c | 1690 unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs) in uprobe_get_swbp_addr() argument 1692 return instruction_pointer(regs) - UPROBE_SWBP_INSN_SIZE; in uprobe_get_swbp_addr() 1695 unsigned long uprobe_get_trap_addr(struct pt_regs *regs) in uprobe_get_trap_addr() argument 1702 return instruction_pointer(regs); in uprobe_get_trap_addr() 1849 struct pt_regs *regs) in cleanup_return_instances() argument 1854 while (ri && !arch_uretprobe_is_alive(ri, ctx, regs)) { in cleanup_return_instances() 1861 static void prepare_uretprobe(struct uprobe *uprobe, struct pt_regs *regs) in prepare_uretprobe() argument 1887 orig_ret_vaddr = arch_uretprobe_hijack_return_addr(trampoline_vaddr, regs); in prepare_uretprobe() 1893 cleanup_return_instances(utask, chained, regs); in prepare_uretprobe() 1913 ri->func = instruction_pointer(regs); in prepare_uretprobe() [all …]
|
D | core.c | 6478 struct pt_regs *regs, u64 mask) in perf_output_sample_regs() argument 6487 val = perf_reg_value(regs, bit); in perf_output_sample_regs() 6493 struct pt_regs *regs) in perf_sample_regs_user() argument 6495 if (user_mode(regs)) { in perf_sample_regs_user() 6497 regs_user->regs = regs; in perf_sample_regs_user() 6499 perf_get_regs_user(regs_user, regs); in perf_sample_regs_user() 6502 regs_user->regs = NULL; in perf_sample_regs_user() 6507 struct pt_regs *regs) in perf_sample_regs_intr() argument 6509 regs_intr->regs = regs; in perf_sample_regs_intr() 6521 static u64 perf_ustack_task_size(struct pt_regs *regs) in perf_ustack_task_size() argument [all …]
|
D | internal.h | 241 #define perf_user_stack_pointer(regs) user_stack_pointer(regs) argument 248 #define perf_user_stack_pointer(regs) 0 argument
|
/kernel/ |
D | test_kprobes.c | 26 static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler() argument 36 static void kp_post_handler(struct kprobe *p, struct pt_regs *regs, in kp_post_handler() argument 87 static int kp_pre_handler2(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler2() argument 93 static void kp_post_handler2(struct kprobe *p, struct pt_regs *regs, in kp_post_handler2() argument 159 static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs) in entry_handler() argument 169 static int return_handler(struct kretprobe_instance *ri, struct pt_regs *regs) in return_handler() argument 171 unsigned long ret = regs_return_value(regs); in return_handler() 216 static int return_handler2(struct kretprobe_instance *ri, struct pt_regs *regs) in return_handler2() argument 218 unsigned long ret = regs_return_value(regs); in return_handler2()
|
D | rseq.c | 230 static int rseq_ip_fixup(struct pt_regs *regs) in rseq_ip_fixup() argument 232 unsigned long ip = instruction_pointer(regs); in rseq_ip_fixup() 256 instruction_pointer_set(regs, (unsigned long)rseq_cs.abort_ip); in rseq_ip_fixup() 271 void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) in __rseq_handle_notify_resume() argument 285 if (regs) { in __rseq_handle_notify_resume() 286 ret = rseq_ip_fixup(regs); in __rseq_handle_notify_resume() 305 void rseq_syscall(struct pt_regs *regs) in rseq_syscall() argument 307 unsigned long ip = instruction_pointer(regs); in rseq_syscall()
|
D | stacktrace.c | 164 unsigned int stack_trace_save_regs(struct pt_regs *regs, unsigned long *store, in stack_trace_save_regs() argument 174 arch_stack_walk(consume_entry, &c, current, regs); in stack_trace_save_regs() 258 save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace) in save_stack_trace_regs() argument 318 unsigned int stack_trace_save_regs(struct pt_regs *regs, unsigned long *store, in stack_trace_save_regs() argument 327 save_stack_trace_regs(regs, &trace); in stack_trace_save_regs()
|
D | panic.c | 149 void __weak nmi_panic_self_stop(struct pt_regs *regs) in nmi_panic_self_stop() argument 188 void nmi_panic(struct pt_regs *regs, const char *msg) in nmi_panic() argument 198 nmi_panic_self_stop(regs); in nmi_panic() 654 struct pt_regs *regs, struct warn_args *args) in __warn() argument 671 if (regs) in __warn() 672 show_regs(regs); in __warn() 676 if (!regs) in __warn()
|
D | watchdog_hld.c | 112 struct pt_regs *regs) in watchdog_overflow_callback() argument 142 if (regs) in watchdog_overflow_callback() 143 show_regs(regs); in watchdog_overflow_callback() 156 nmi_panic(regs, "Hard LOCKUP"); in watchdog_overflow_callback()
|
D | ptrace.c | 936 ptrace_get_syscall_info_entry(struct task_struct *child, struct pt_regs *regs, in ptrace_get_syscall_info_entry() argument 943 info->entry.nr = syscall_get_nr(child, regs); in ptrace_get_syscall_info_entry() 944 syscall_get_arguments(child, regs, args); in ptrace_get_syscall_info_entry() 953 ptrace_get_syscall_info_seccomp(struct task_struct *child, struct pt_regs *regs, in ptrace_get_syscall_info_seccomp() argument 963 ptrace_get_syscall_info_entry(child, regs, info); in ptrace_get_syscall_info_seccomp() 972 ptrace_get_syscall_info_exit(struct task_struct *child, struct pt_regs *regs, in ptrace_get_syscall_info_exit() argument 976 info->exit.rval = syscall_get_error(child, regs); in ptrace_get_syscall_info_exit() 979 info->exit.rval = syscall_get_return_value(child, regs); in ptrace_get_syscall_info_exit() 989 struct pt_regs *regs = task_pt_regs(child); in ptrace_get_syscall_info() local 993 .instruction_pointer = instruction_pointer(regs), in ptrace_get_syscall_info() [all …]
|
D | fail_function.c | 15 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs); 17 static void fei_post_handler(struct kprobe *kp, struct pt_regs *regs, in fei_post_handler() argument 169 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs) in fei_kprobe_handler() argument 174 regs_set_return_value(regs, attr->retval); in fei_kprobe_handler() 175 override_function_with_return(regs); in fei_kprobe_handler()
|
D | watchdog.c | 352 struct pt_regs *regs = get_irq_regs(); in watchdog_timer_fn() local 422 if (regs) in watchdog_timer_fn() 423 show_regs(regs); in watchdog_timer_fn() 432 trace_android_vh_watchdog_timer_softlockup(duration, regs, !!softlockup_panic); in watchdog_timer_fn()
|
/kernel/bpf/ |
D | verifier.c | 589 reg = &state->regs[i]; in print_verifier_state() 1077 struct bpf_reg_state *regs, u32 regno) in mark_reg_known_zero() argument 1083 __mark_reg_not_init(env, regs + regno); in mark_reg_known_zero() 1086 __mark_reg_known_zero(regs + regno); in mark_reg_known_zero() 1367 struct bpf_reg_state *regs, u32 regno) in mark_reg_unknown() argument 1373 __mark_reg_not_init(env, regs + regno); in mark_reg_unknown() 1376 __mark_reg_unknown(env, regs + regno); in mark_reg_unknown() 1387 struct bpf_reg_state *regs, u32 regno) in mark_reg_not_init() argument 1393 __mark_reg_not_init(env, regs + regno); in mark_reg_not_init() 1396 __mark_reg_not_init(env, regs + regno); in mark_reg_not_init() [all …]
|
D | stackmap.c | 467 BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map, in BPF_CALL_3() argument 484 trace = get_perf_callchain(regs, 0, kernel, user, max_depth, in BPF_CALL_3() 526 return bpf_get_stackid((unsigned long)(ctx->regs), in BPF_CALL_3() 572 static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task, in __bpf_get_stack() argument 598 if (task && user && !user_mode(regs)) in __bpf_get_stack() 619 trace = get_perf_callchain(regs, 0, kernel, user, max_depth, in __bpf_get_stack() 648 BPF_CALL_4(bpf_get_stack, struct pt_regs *, regs, void *, buf, u32, size, in BPF_CALL_4() argument 651 return __bpf_get_stack(regs, NULL, NULL, buf, size, flags); in BPF_CALL_4() 667 struct pt_regs *regs; in BPF_CALL_4() local 673 regs = task_pt_regs(task); in BPF_CALL_4() [all …]
|
D | core.c | 43 #define BPF_R0 regs[BPF_REG_0] 44 #define BPF_R1 regs[BPF_REG_1] 45 #define BPF_R2 regs[BPF_REG_2] 46 #define BPF_R3 regs[BPF_REG_3] 47 #define BPF_R4 regs[BPF_REG_4] 48 #define BPF_R5 regs[BPF_REG_5] 49 #define BPF_R6 regs[BPF_REG_6] 50 #define BPF_R7 regs[BPF_REG_7] 51 #define BPF_R8 regs[BPF_REG_8] 52 #define BPF_R9 regs[BPF_REG_9] [all …]
|
/kernel/debug/ |
D | debug_core.c | 206 unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs) in kgdb_arch_pc() argument 208 return instruction_pointer(regs); in kgdb_arch_pc() 217 int __weak kgdb_skipexception(int exception, struct pt_regs *regs) in kgdb_skipexception() argument 587 static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs, in kgdb_cpu_enter() argument 607 arch_kgdb_ops.disable_hw_break(regs); in kgdb_cpu_enter() 618 kgdb_info[cpu].debuggerinfo = regs; in kgdb_cpu_enter() 852 kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) in kgdb_handle_exception() argument 874 ks->linux_regs = regs; in kgdb_handle_exception() 881 ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); in kgdb_handle_exception() 902 int kgdb_nmicallback(int cpu, void *regs) in kgdb_nmicallback() argument [all …]
|
/kernel/debug/kdb/ |
D | kdb_bp.c | 27 static void kdb_setsinglestep(struct pt_regs *regs) in kdb_setsinglestep() argument 108 static void kdb_handle_bp(struct pt_regs *regs, kdb_bp_t *bp) in kdb_handle_bp() argument 111 kdb_printf("regs->ip = 0x%lx\n", instruction_pointer(regs)); in kdb_handle_bp() 116 kdb_setsinglestep(regs); in kdb_handle_bp() 125 static int _kdb_bp_install(struct pt_regs *regs, kdb_bp_t *bp) in _kdb_bp_install() argument 142 kdb_handle_bp(regs, bp); in _kdb_bp_install() 174 void kdb_bp_install(struct pt_regs *regs) in kdb_bp_install() argument 186 _kdb_bp_install(regs, bp); in kdb_bp_install()
|
/kernel/irq/ |
D | generic-chip.c | 43 irq_reg_writel(gc, mask, ct->regs.disable); in irq_gc_mask_disable_reg() 63 irq_reg_writel(gc, *ct->mask_cache, ct->regs.mask); in irq_gc_mask_set_bit() 83 irq_reg_writel(gc, *ct->mask_cache, ct->regs.mask); in irq_gc_mask_clr_bit() 102 irq_reg_writel(gc, mask, ct->regs.enable); in irq_gc_unmask_enable_reg() 118 irq_reg_writel(gc, mask, ct->regs.ack); in irq_gc_ack_set_bit() 134 irq_reg_writel(gc, mask, ct->regs.ack); in irq_gc_ack_clr_bit() 157 irq_reg_writel(gc, mask, ct->regs.disable); in irq_gc_mask_disable_and_ack_set() 159 irq_reg_writel(gc, mask, ct->regs.ack); in irq_gc_mask_disable_and_ack_set() 174 irq_reg_writel(gc, mask, ct->regs.eoi); in irq_gc_eoi() 258 u32 *mskptr = &gc->mask_cache, mskreg = ct->regs.mask; in irq_gc_init_mask_cache() [all …]
|