From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F2D945000 for ; Sat, 15 Aug 2026 19:24:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786821889; cv=none; b=SZtLXlYJl80GfrBo6xT7uNDgDN3QfW9jFViGo7OPT//o5cpU1806FiIE93wsFc5/n3/SCp1AT+yjzBsABQBsH3a08rWM5YrSmJTZ+22Gwc4IwKW/7Gj8DJy286sRfm6gR4ao5fIePurfpTDRCAJzVz7oiBjz5iwy/pjwxpML5tQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786821889; c=relaxed/simple; bh=wmizx90/rjIKh9/z5AmWpFJF1295gPksfGKRdbpYGdc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=tvIa6JPn7OX9Q8aTCdtRIMhU0nw4JxtxyJYD1vzE3jLI9y3CX2JpK1G11lzkicV59C6OzfPeYmF4kR6yLeJJIPqsRQnP2JcSru3TlJQi6b2t40lKjpPQbcQ0S0dFnD1yjKI8q004sVjstaKu6QOqMmcCshfOaqmOaWjX7Lbn9sc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; dkim=pass (1024-bit key) header.d=goodmis.org header.i=@goodmis.org header.b=djD0k3e7; arc=none smtp.client-ip=216.40.44.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=goodmis.org header.i=@goodmis.org header.b="djD0k3e7" Received: from omf07.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B578BA2C54; Sat, 15 Aug 2026 19:24:44 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf07.hostedemail.com (Postfix) with ESMTPA id 06E4C2002E; Sat, 15 Aug 2026 19:24:41 +0000 (UTC) Date: Sat, 15 Aug 2026 15:25:02 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Mathieu Desnoyers , Andrew Morton , David Carlier , David Laight , Markus Elfring , "Masami Hiramatsu (Google)" , Mykyta Yatsenko , Pengpeng Hou , Po-Sheng Lin , Samuel Moelius , Woradorn Laodhanadhaworn , Yu Peng Subject: [GIT PULL] tracing: Updates for v7.3 Message-ID: <20260815152502.01a6b77d@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: 06E4C2002E X-Stat-Signature: 4s84yyge8cmsjzz9uknr8udxed8bbhgt X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX18g4WVhJSuW5OW0DknbnbZvgMGIEr9IO9k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goodmis.org; h=date:from:to:cc:subject:message-id:mime-version:content-type:content-transfer-encoding; s=dkim1; bh=XAwYhhPxlSfccnPI/DawEhBQGhxdtZiCK9IOGKqH+E8=; b=djD0k3e74svRb5p6lX/v1VJEEB1zYaDd1ftU2vHO9CYoir7GskJBN65p9aH0ojM0LoBmAAgkC/VD50oIIOcBZBVhT8V2UN9+NqwXpg5PTaAMALRq/Yl5QS09R5D8nfXI8DJni9zrw9KB0+X2DTFPS0U/vjqWSGk8E9DND9nSK/8= X-HE-Tag: 1786821881-432394 X-HE-Meta: U2FsdGVkX19W7ciyw85p9jYunsCTrsl9C0MTdvneNLg1aVgFMG7oMEFrluVlulIm4o0c2FCYEibe3Qo54u8jMmjpcxnRfjH1TRaxSnNycne89ApKhrlQpYTG+n5OSixyptzEvwyOcuAnv/U5vcv3anKIDE/kKf7MJeowNr6s3AFN2SwItQsRtKYnnBvwGjA3mvHi9PKdNYtng6ZsFd1yXYwk5IXFqViuwWZ3NbBRo1Qfkj7kHfwlWGxmKksg0IAiyaH8jN32fllpDUXCYk5bHGT9hoacUWnKtg0md0MKdumRqLTyGaPi5Ma0CS4iZDLqiLzR3xzfS6x8r5hcVJX99mO+VP4zvUqI Linus, tracing updates for v7.3: - Expose btf_ids to trace events In order to allow BPF programs to attach to system call trace events (which are actually pseudo trace events built on top of raw_syscall events), expose the BTF ID of the events. This will allow BPF programs better precision in attaching to events. - Use "u64" to assign to hist_field->type Instead of using kstrdup("u64", GFP_KERNEL) to assign the hist_field->type, just point it to "u64" instead. The hist_field->type is freed via kfree_const(). - Replace kmalloc()/strcpy() with kstrdup() for trace_printk Instead of having two calls to copy the module format string, just use kstrdup(). - Use __free() in trace event histograms and triggres where possible - Use seq_buf in trace event code instead of strcat() Instead of calculating the size of the buffer to use and filling it with strcat(), use the seq_buf infrastructure that takes care of making sure not to overflow the string size. - Reject invalid preemptirq_delay_test CPU affinity The preempt_delay_test module can take an invalid CPU affinity mask and create confusing output. Simply have the module reject invalid affinity masks. - Prevent division by zero in ftrace_ops sample module code If the ftrace_ops sample module code receives the module parameter nr_function_calls set to zero, it can cause a division by zero error. - Warn when an event dereferences a parameter in TP_printk() On boot up and module load, the trace event TP_printk() is scanned for possible bugs. As the TP_printk() code is executed when the user reads the "trace" file and processes the data written when the trace_event executed, the data it reads can be literally days old. The scan currently checks for dereferencing printk formats like "%pI6". But it does not check if the parameters themselves have a dereference like: TP_printk("offset %08x: value %08x", (u32)(__entry->addr - __entry->edma->membase), __entry->value) __entry represents the pointer to the event on the ring buffer. The __entry->edma->membase is dereferencing a pointer on the ring buffer to find membase, but the __entry->edma may no longer be a valid pointer. Warn on this case too. - Replace some strcpy() with strscpy() - Clean up mmiotrace events to use assign_type() macro The assign_type() macro makes sure the event type is indeed the type that is being parsed. The mmiotrace trace was written before that macro was created so it just simply typecasted the pointer. Replace the typecasting with the macro. - Have the ENUM processing to numbers only process what is added The code that converts ENUMs to their numbers in the trace events scanned all events to do the processing. This was true when a module was loaded too. That is, instead of processing just the events for the module, it processed *all* events. Even the builtin ones that were processed at boot up. Add a check for the event->module matching mod if it is a module before processing it. Please pull the latest trace-v7.3 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-v7.3 Tag SHA1: b47dd295cb1a6acfc4263187c56a87f55775b882 Head SHA1: ae70b04ab9c7f6162a8c0fdd18a62a945c133142 David Carlier (1): tracing: Report every TP_printk double dereference David Laight (1): kernel/trace/trace_printk: Use kstrdup() instead of kmalloc() and strcpy() Markus Elfring (3): tracing/user_events: Use seq_putc() in two functions tracing/user_events: Replace a seq_printf() call by seq_puts() in user_seq_show() fgraph: Use trace_seq_putc() in print_graph_return() Masami Hiramatsu (Google) (1): tracing/mmiotrace: Use trace_assign_type() in mmio_print_mark() Mykyta Yatsenko (4): bpf: Make btf_get_module_btf() and btf_relocate_id() non-static tracing: Expose tracepoint BTF ids via tracefs selftests/bpf: Add test for tracepoint btf_ids tracefs file tracing: Make per-template BTF id lists file-local Pengpeng Hou (3): tracing: Use __free() for expr_str() buffer tracing: Return ERR_PTR() from expr_str() tracing: Bound histogram expression strings with seq_buf Po-Sheng Lin (1): tracing: Use strscpy() instead of strcpy() in trace_sched_switch Samuel Moelius (2): tracing: Reject invalid preemptirq_delay_test CPU affinity samples/ftrace: Prevent division by zero when nr_function_calls is zero Steven Rostedt (3): tracing: Warn when an event dereferences a pointer in TP_printk() tracing: Cleanup event_enable_trigger_parse() by using __free() tracing: Have trace_event_update_all() only handle module that is loading Woradorn Laodhanadhaworn (1): tracing: Use seq_buf for string concatenation Yu Peng (1): tracing: Point constant hist field type to string literal ---- include/linux/btf.h | 2 + include/linux/trace_events.h | 9 ++ include/trace/trace_events.h | 23 ++++ kernel/bpf/btf.c | 4 +- kernel/trace/preemptirq_delay_test.c | 9 ++ kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 4 +- kernel/trace/trace_events.c | 139 +++++++++++++++++++-- kernel/trace/trace_events_hist.c | 96 ++++++++------ kernel/trace/trace_events_trigger.c | 16 +-- kernel/trace/trace_events_user.c | 10 +- kernel/trace/trace_functions_graph.c | 2 +- kernel/trace/trace_mmiotrace.c | 7 +- kernel/trace/trace_printk.c | 3 +- kernel/trace/trace_sched_switch.c | 6 +- kernel/trace/trace_syscalls.c | 18 +++ samples/ftrace/ftrace-ops.c | 2 +- .../testing/selftests/bpf/prog_tests/tp_btf_ids.c | 132 +++++++++++++++++++ 18 files changed, 408 insertions(+), 76 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/tp_btf_ids.c ---------------------------