Skip to content

Commit dd9b004

Browse files
committed
Merge tag 'trace-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing fixes from Steven Rostedt: - Add Documentation/core-api/tracepoint.rst to TRACING in MAINTAINERS file Updates to the tracepoint.rst document should be reviewed by the tracing maintainers. - Fix warning triggered by perf attaching to synthetic events The synthetic events do not add a function to be registered when perf attaches to them. This causes a warning when perf registers a synthetic event and passes a NULL pointer to the tracepoint register function. Ideally synthetic events should be updated to work with perf, but as that's a feature and not a bug fix, simply now return -ENODEV when perf tries to register an event that has a NULL pointer for its function. This no longer causes a kernel warning and simply causes the perf code to fail with an error message. - Fix 32bit overflow in option flag test The option's flags changed from 32 bits in size to 64 bits in size. Fix one of the places that shift 1 by the option bit number to to be 1ULL. - Fix the output of printing the direct jmp functions The enabled_functions that shows how functions are being attached by ftrace wasn't updated to accommodate the new direct jmp trampolines that set the LSB of the pointer, and outputs garbage. Update the output to handle the direct jmp trampolines. * tag 'trace-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ftrace: Fix address for jmp mode in t_show() tracing: Fix UBSAN warning in __remove_instance() tracing: Do not register unsupported perf events MAINTAINERS: add tracepoint core-api doc files to TRACING
2 parents 5164715 + 39263f9 commit dd9b004

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26463,6 +26463,7 @@ L: linux-trace-kernel@vger.kernel.org
2646326463
S: Maintained
2646426464
Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/
2646526465
T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
26466+
F: Documentation/core-api/tracepoint.rst
2646626467
F: Documentation/trace/*
2646726468
F: fs/tracefs/
2646826469
F: include/linux/trace*.h

kernel/trace/ftrace.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4518,8 +4518,11 @@ static int t_show(struct seq_file *m, void *v)
45184518
unsigned long direct;
45194519

45204520
direct = ftrace_find_rec_direct(rec->ip);
4521-
if (direct)
4522-
seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
4521+
if (direct) {
4522+
seq_printf(m, "\n\tdirect%s-->%pS",
4523+
ftrace_is_jmp(direct) ? "(jmp)" : "",
4524+
(void *)ftrace_jmp_get(direct));
4525+
}
45234526
}
45244527
}
45254528

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10507,7 +10507,7 @@ static int __remove_instance(struct trace_array *tr)
1050710507

1050810508
/* Disable all the flags that were enabled coming in */
1050910509
for (i = 0; i < TRACE_FLAGS_MAX_SIZE; i++) {
10510-
if ((1 << i) & ZEROED_TRACE_FLAGS)
10510+
if ((1ULL << i) & ZEROED_TRACE_FLAGS)
1051110511
set_tracer_flag(tr, 1ULL << i, 0);
1051210512
}
1051310513

kernel/trace/trace_events.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,8 @@ int trace_event_reg(struct trace_event_call *call,
700700

701701
#ifdef CONFIG_PERF_EVENTS
702702
case TRACE_REG_PERF_REGISTER:
703+
if (!call->class->perf_probe)
704+
return -ENODEV;
703705
return tracepoint_probe_register(call->tp,
704706
call->class->perf_probe,
705707
call);

0 commit comments

Comments
 (0)