Skip to content

Commit 3ca112b

Browse files
committed
Merge tag 'probes-fixes-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes fixes from Masami Hiramatsu: - Documentation update: Add a note about argument and return value fetching is the best effort because it depends on the type. - objpool: Fix to make internal global variables static in test_objpool.c. - kprobes: Unify kprobes_exceptions_nofify() prototypes. There are the same prototypes in asm/kprobes.h for some architectures, but some of them are missing the prototype and it causes a warning. So move the prototype into linux/kprobes.h. - tracing: Fix to check the tracepoint event and return event at parsing stage. The tracepoint event doesn't support %return but if $retval exists, it will be converted to %return silently. This finds that case and rejects it. - tracing: Fix the order of the descriptions about the parameters of __kprobe_event_gen_cmd_start() to be consistent with the argument list of the function. * tag 'probes-fixes-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/kprobes: Fix the order of argument descriptions tracing: fprobe-event: Fix to check tracepoint event and return kprobes: unify kprobes_exceptions_nofify() prototypes lib: test_objpool: make global variables static Documentation: tracing: Add a note about argument and retval access
2 parents 1855350 + f032c53 commit 3ca112b

File tree

15 files changed

+25
-31
lines changed

15 files changed

+25
-31
lines changed

Documentation/trace/fprobetrace.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ Synopsis of fprobe-events
5959
and bitfield are supported.
6060

6161
(\*1) This is available only when BTF is enabled.
62-
(\*2) only for the probe on function entry (offs == 0).
63-
(\*3) only for return probe.
62+
(\*2) only for the probe on function entry (offs == 0). Note, this argument access
63+
is best effort, because depending on the argument type, it may be passed on
64+
the stack. But this only support the arguments via registers.
65+
(\*3) only for return probe. Note that this is also best effort. Depending on the
66+
return value type, it might be passed via a pair of registers. But this only
67+
accesses one register.
6468
(\*4) this is useful for fetching a field of data structures.
6569
(\*5) "u" means user-space dereference.
6670

Documentation/trace/kprobetrace.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ Synopsis of kprobe_events
6161
(x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr"
6262
and bitfield are supported.
6363

64-
(\*1) only for the probe on function entry (offs == 0).
65-
(\*2) only for return probe.
64+
(\*1) only for the probe on function entry (offs == 0). Note, this argument access
65+
is best effort, because depending on the argument type, it may be passed on
66+
the stack. But this only support the arguments via registers.
67+
(\*2) only for return probe. Note that this is also best effort. Depending on the
68+
return value type, it might be passed via a pair of registers. But this only
69+
accesses one register.
6670
(\*3) this is useful for fetching a field of data structures.
6771
(\*4) "u" means user-space dereference. See :ref:`user_mem_access`.
6872

arch/arc/include/asm/kprobes.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ struct kprobe;
3232

3333
void arch_remove_kprobe(struct kprobe *p);
3434

35-
int kprobe_exceptions_notify(struct notifier_block *self,
36-
unsigned long val, void *data);
37-
3835
struct prev_kprobe {
3936
struct kprobe *kp;
4037
unsigned long status;

arch/arm/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ struct kprobe_ctlblk {
4040

4141
void arch_remove_kprobe(struct kprobe *);
4242
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
43-
int kprobe_exceptions_notify(struct notifier_block *self,
44-
unsigned long val, void *data);
4543

4644
/* optinsn template addresses */
4745
extern __visible kprobe_opcode_t optprobe_template_entry[];

arch/arm64/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ struct kprobe_ctlblk {
3737

3838
void arch_remove_kprobe(struct kprobe *);
3939
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
40-
int kprobe_exceptions_notify(struct notifier_block *self,
41-
unsigned long val, void *data);
4240
void __kretprobe_trampoline(void);
4341
void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
4442

arch/mips/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ struct kprobe_ctlblk {
7171
struct prev_kprobe prev_kprobe;
7272
};
7373

74-
extern int kprobe_exceptions_notify(struct notifier_block *self,
75-
unsigned long val, void *data);
7674

7775
#endif /* CONFIG_KPROBES */
7876
#endif /* _ASM_KPROBES_H */

arch/powerpc/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ struct arch_optimized_insn {
8484
kprobe_opcode_t *insn;
8585
};
8686

87-
extern int kprobe_exceptions_notify(struct notifier_block *self,
88-
unsigned long val, void *data);
8987
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
9088
extern int kprobe_handler(struct pt_regs *regs);
9189
extern int kprobe_post_handler(struct pt_regs *regs);

arch/s390/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ struct kprobe_ctlblk {
7373
void arch_remove_kprobe(struct kprobe *p);
7474

7575
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
76-
int kprobe_exceptions_notify(struct notifier_block *self,
77-
unsigned long val, void *data);
7876

7977
#define flush_insn_slot(p) do { } while (0)
8078

arch/sh/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ struct kprobe_ctlblk {
4646
};
4747

4848
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
49-
extern int kprobe_exceptions_notify(struct notifier_block *self,
50-
unsigned long val, void *data);
5149
extern int kprobe_handle_illslot(unsigned long pc);
5250
#else
5351

arch/sparc/include/asm/kprobes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ struct kprobe_ctlblk {
4747
struct prev_kprobe prev_kprobe;
4848
};
4949

50-
int kprobe_exceptions_notify(struct notifier_block *self,
51-
unsigned long val, void *data);
5250
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
5351
asmlinkage void __kprobes kprobe_trap(unsigned long trap_level,
5452
struct pt_regs *regs);

0 commit comments

Comments
 (0)