ftrace.c (773c16705058e9be7b0f4ce124e89cd231c120a2) ftrace.c (d19ad0775dcd64b49eecf4fa79c17959ebfbd26b)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Dynamic function tracer architecture backend.
4 *
5 * Copyright IBM Corp. 2009,2014
6 *
7 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
8 * Martin Schwidefsky <schwidefsky@de.ibm.com>

--- 184 unchanged lines hidden (view full) ---

193 s390_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op));
194 return 0;
195}
196
197#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
198
199#ifdef CONFIG_KPROBES_ON_FTRACE
200void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Dynamic function tracer architecture backend.
4 *
5 * Copyright IBM Corp. 2009,2014
6 *
7 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
8 * Martin Schwidefsky <schwidefsky@de.ibm.com>

--- 184 unchanged lines hidden (view full) ---

193 s390_kernel_write(__va(ftrace_graph_caller)+1, &op, sizeof(op));
194 return 0;
195}
196
197#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
198
199#ifdef CONFIG_KPROBES_ON_FTRACE
200void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
201 struct ftrace_ops *ops, struct pt_regs *regs)
201 struct ftrace_ops *ops, struct ftrace_regs *fregs)
202{
203 struct kprobe_ctlblk *kcb;
202{
203 struct kprobe_ctlblk *kcb;
204 struct pt_regs *regs;
204 struct kprobe *p;
205 int bit;
206
207 bit = ftrace_test_recursion_trylock(ip, parent_ip);
208 if (bit < 0)
209 return;
210
205 struct kprobe *p;
206 int bit;
207
208 bit = ftrace_test_recursion_trylock(ip, parent_ip);
209 if (bit < 0)
210 return;
211
212 regs = ftrace_get_regs(fregs);
211 preempt_disable_notrace();
212 p = get_kprobe((kprobe_opcode_t *)ip);
213 if (unlikely(!p) || kprobe_disabled(p))
214 goto out;
215
216 if (kprobe_running()) {
217 kprobes_inc_nmissed_count(p);
218 goto out;

--- 31 unchanged lines hidden ---
213 preempt_disable_notrace();
214 p = get_kprobe((kprobe_opcode_t *)ip);
215 if (unlikely(!p) || kprobe_disabled(p))
216 goto out;
217
218 if (kprobe_running()) {
219 kprobes_inc_nmissed_count(p);
220 goto out;

--- 31 unchanged lines hidden ---