Skip to contentSkip to conversation

tracing: Two minor fixes for 6.13

GIT PULL Merged Steven Rostedt 2 participants 2 messages Dec 26, 2024 – Dec 27, 2024 Tracing

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

Linus,

Two minor tracing fixes for 6.13:

- Add "const" to "char *" in event structure field that gets assigned literals.

- Check size of input passed into the tracing cpumask file.

If a too large of an input gets passed into the cpumask file, it could trigger a warning in the bitmask parsing code.

Please pull the latest trace-v6.13-rc4 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-v6.13-rc4

Tag SHA1: b40a14f57ffeed1c9d5c19a13fadfff6beb3bd5f Head SHA1: 98feccbf32cfdde8c722bc4587aaa60ee5ac33f0

Christian Göttsche (1):
tracing: Constify string literal data member in struct trace_event_call

Lizhi Xu (1):
tracing: Prevent bad count for tracing_cpumask_write

----

 include/linux/trace_events.h | 2 +-
 kernel/trace/trace.c         | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

---------------------------

include/linux/trace_events.h +1 -1
index 91b8ffbdfa8c..58ad4ead33fc 100644
@@ -364,7 +364,7 @@ struct trace_event_call {
 	struct list_head	list;
 	struct trace_event_class *class;
 	union {
-		char			*name;
+		const char		*name;
 		/* Set TRACE_EVENT_FL_TRACEPOINT flag when using "tp" */
 		struct tracepoint	*tp;
 	};
kernel/trace/trace.c +3 -0
index 957f941a08e7..f8aebcb01e62 100644
@@ -5087,6 +5087,9 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
 	cpumask_var_t tracing_cpumask_new;
 	int err;
 
+	if (count == 0 || count > KMALLOC_MAX_SIZE)
+		return -EINVAL;
+
 	if (!zalloc_cpumask_var(&tracing_cpumask_new, GFP_KERNEL))
 		return -ENOMEM;
 
merge bot Merged
#1 lore raw
The pull request you sent on Thu, 26 Dec 2024 09:33:40 -0500:

The pull request you sent on Thu, 26 Dec 2024 09:33:40 -0500:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v6.13-rc4

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2c2b3d906c88a40b75f8d258119400a047e587de

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html