From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A3F5D37FF70 for ; Tue, 18 Aug 2026 14:41:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787064071; cv=none; b=nnjZcnZExcuNsx8aVO8TCQ0GuAmXJzxkdrlL1qRv8r+Uy8/lIHZv67TIcV2ApG8LgsroME09nfmUCPzvUX9YErfhjINn27Qd7fpv34mLU5GpkhndmxxI5iqAQODh3bfDJ9/0dYW/94j4dPHZ7OjnK0eP255iQeedX4gM6kp8fuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787064071; c=relaxed/simple; bh=r+Npo5R/UoVg9PDSSLw6/Ucnw2oadYYeqDmRDRrEiyw=; h=Date:From:To:Cc:Subject:Message-Id:Mime-Version:Content-Type; b=ocstivOWo3GZnXndVq9+1dG2omv3747iwJkl2DgRz9DL/JrK09ER/fQWQfckJ8+2u4DO1T05f8sb6che6cDGj2KmDsjKeISiB2ECiVKpEjuI4mY6X5yThD12iPJ2/Gck46brqnqJM8mPOLoWjQZxlx3r+aaBBHOJTrAbfmD1A+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hgWoeIoo; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hgWoeIoo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 234D71F000E9; Tue, 18 Aug 2026 14:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787064067; bh=Am9ZfRjko8opyE8rKVOXnDl/vwbYfkpgc9ltKRQolXg=; h=Date:From:To:Cc:Subject; b=hgWoeIooFHH1U2RFhOgAJs2LC6vQodBCpUPDCUBDys9zW2QSqS+7riPCtvy5GV3iU bODO5pRBayDD40B2TXj55LfL+8r+v+Bj/AOyeFMNawpWG7Xki4GNSGC/zJuwrBi4Fg SwJCfekER9FClkAUOYnBtQQ5RW6c2zLrh13UdRUZCj86C0WAYE1i19fY6Xwz4m3Zsy hJDRJxJgd0uqtnxj2lxvqT/x9vrq7ai5CLhvwBqn5x/Q6AWUvD4kwFBnxxrm4Hu5aF W6CV5AXaTBycEmjbDJxBrZ+NR3tsfOJrHsJ1d+YN4lrgT61VEUJAHW0T4jJE7Agfg4 rXPYiUaGxNdCA== Date: Tue, 18 Aug 2026 23:41:02 +0900 From: Masami Hiramatsu (Google) To: Linus Torvalds Cc: Markus Schneider-Pargmann (The Capable Hub) , Martin Kaiser , Masami Hiramatsu (Google) , Masami Hiramatsu , Rui Qi , Thomas Huth , Yudistira Putra , shaikh.kamal , Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org Subject: [GIT PULL] probes: Updates for v7.3 Message-Id: <20260818234102.47ffba217f811f7be177346a@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (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 Hi Linus, Probes updates for v7.3: - probes: Advanced BTF typecasting and variable fetch enhancements . Typecast support across probe events: Extended BTF typecasting syntax (e.g., (STRUCT)PARAM->MEMBER) to kprobes, uprobes, and fprobes on function entry and return. . Nested typecasts: Added support for chaining and nesting typecasts up to 3 levels, including casting registers and stack variables. . Field specifier option: Added (STRUCT,FIELD) syntax to emulate container_of(), allowing retrieval of parent structures from member pointers. . $current variable support: Introduced $current special variable to access the running task_struct via BTF dereferencing. . Per-CPU variable access: Added this_cpu_read() and this_cpu_ptr() fetcharg methods to trace CPU-local data safely. . Fetcharg bytecode dumper: Added CONFIG_PROBE_EVENTS_DUMP_FETCHARG to dump the compiled fetcharg bytecode instructions as comments in dynamic_events. . Extended symbol name handling: Removed the MAX_COMMON_HEAD_LEN limit and extended MAX_ARGSTR_LEN to 256 bytes, enabling probing of long symbols, mangled Rust symbols and complex BTF expressions. . eprobe variable syntax: Allowed eprobes to reference event fields directly without requiring a '$' prefix. . Cleanup unused parameters, redundant codes, duplicate macros and pointer arithmetic. . Use a ternary operator for simplifying fetch_type_from_btf_type(). - bootconfig / boottime-trace: Expanded dynamic probe support . Added boot-time tracing configuration support for event probes (eprobes), function probes (fprobes), and tracepoint probes (tprobes). . ftrace2bootconfig: Allowed comment lines ('#') in dynamic_events file. - fprobe / kprobe: Optimization, robustness, and cleanups . fprobe: Simplified fprobe_remove_ips() by reusing graph and ftrace helpers. . fprobe: Removed __packed attribute from struct __fprobe_header to avoid unaligned memory access penalties on RISC architectures. . kprobe & fprobe: Removed redundant memset() calls in perf event probe handlers. . kprobes: Replaced legacy __ASSEMBLY__ with __ASSEMBLER__ in header files. - selftests & refactoring: . Refactored parse_probe_arg() and parse_probe_vars(), and eliminated recursion in probe argument parsing to protect kernel stack depth. . Added selftests for BTF typecasts and module probing without module prefixes. . Forced LC_ALL=C in ftracetest to prevent test failures on localized systems. . Refactored btf_type_skip_modifiers() to remove ignored id parameter. . Sorted ERRORS list in trace_probe.h alphabetically. . Fixed typo in fprobe docs, and trace_fprobe function name. . Renamed FETCH_OP_DATA to FETCH_OP_IMMSTR. . Made file offset error message probe-agnostic. Please pull the latest probes-v7.3 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-v7.3 Tag SHA1: 25c070753f4404d31582d0d25a32e4a95f2c5486 Head SHA1: 29a86c5e6361caffa7e75e891169e813f82ff688 Markus Schneider-Pargmann (The Capable Hub) (1): tracing: fprobe: Remove __packed from generic __fprobe_header Martin Kaiser (2): tracing: trace_fprobe: fix typo in function name tracing/probes: ignore id update from btf_type_skip_modifiers Masami Hiramatsu (5): tracing/probes: Refactor parse_probe_vars() tracing/probes: Refactor parse_probe_arg() tracing/probes: Sort ERRORS list in trace_probe.h alphabetically tracing/probes: Extend max length of argument string tracing/probes: Eliminate recursion in parse_probe_arg() Masami Hiramatsu (Google) (25): tracing/probes: Rename FETCH_OP_DATA to FETCH_OP_IMMSTR tracing/probes: Allow eprobe to use variable without $ prefix tracing/probes: Support dumping fetcharg program for debugging dynamic events tools/bootconfig: Ignore comment lines in dynamic_events/kprobe_events file tracing/probes: Support typecast for various probe events tracing/probes: Support nested typecast tracing/probes: Type casting always involves nested calls tracing/probes: Support field specifier option for typecast tracing/probes: Add $current variable support tracing/probes: Add this_cpu_read() and this_cpu_ptr() dereference method to fetcharg tracing/probes: Add a new testcase for BTF typecasts selftests/ftrace: Add test case for a symbol in a module without module name tracing/probes: Remove duplicate MAX_ARRAY_LEN macro definition tracing/probes: Remove redundant boolean conversion in trace_probe_has_single_file() tracing/probes: Remove redundant bounds check in trace_probe_compare_arg_type() tracing/probes: Remove unused parameter from parse_probe_var_retval() tracing/probes: Cleanup pointer arithmetic in store_trace_entry_data() tracing/probes: Simplify BTF_KIND_PTR case in fetch_type_from_btf_type() tracing/fprobe: Remove redundant snprintf in trace_fprobe_match_command_head() tracing/fprobe: Remove redundant memset in fentry_perf_func() tracing/kprobe: Remove redundant memset in kprobe_perf_func() tracing/probes: Fix extra whitespace in trace_probe_kernel.h tracing/probes: Treating longer symbol name on event comparation tracing/boot: Add support for eprobe, fprobe, and tprobe events fprobe: Simplify fprobe_remove_ips() by reusing existing helpers Rui Qi (1): selftests/ftrace: Force C locale in ftracetest Thomas Huth (1): kprobes: Replace __ASSEMBLY__ with __ASSEMBLER__ in header file Yudistira Putra (1): tracing/probes: make file offset error message probe-agnostic shaikh.kamal (1): docs: trace: fprobe: fix 'thos' spelling ---- Documentation/trace/boottime-trace.rst | 18 +- Documentation/trace/eprobetrace.rst | 7 +- Documentation/trace/fprobe.rst | 2 +- Documentation/trace/fprobetrace.rst | 10 + Documentation/trace/kprobetrace.rst | 11 + include/asm-generic/kprobes.h | 4 +- kernel/trace/Kconfig | 12 + kernel/trace/fprobe.c | 13 +- kernel/trace/trace.c | 8 +- kernel/trace/trace_boot.c | 97 ++ kernel/trace/trace_dynevent.c | 5 + kernel/trace/trace_eprobe.c | 2 + kernel/trace/trace_fprobe.c | 12 +- kernel/trace/trace_kprobe.c | 27 +- kernel/trace/trace_probe.c | 1183 ++++++++++++++------ kernel/trace/trace_probe.h | 278 +++-- kernel/trace/trace_probe_kernel.h | 2 +- kernel/trace/trace_probe_tmpl.h | 27 +- kernel/trace/trace_uprobe.c | 5 +- samples/trace_events/trace-events-sample.c | 40 +- samples/trace_events/trace-events-sample.h | 34 +- tools/bootconfig/scripts/ftrace2bconf.sh | 2 + tools/testing/selftests/ftrace/ftracetest | 3 + .../ftrace/test.d/dynevent/btf_probe_event.tc | 51 + .../test.d/dynevent/btf_typecast_accepted.tc | 103 ++ .../test.d/dynevent/eprobes_syntax_errors.tc | 12 +- .../ftrace/test.d/dynevent/fprobe_syntax_errors.tc | 16 +- .../ftrace/test.d/dynevent/tprobe_syntax_errors.tc | 4 +- .../ftrace/test.d/kprobe/kprobe_module.tc | 6 + .../ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 16 +- .../ftrace/test.d/kprobe/uprobe_syntax_errors.tc | 5 + 31 files changed, 1525 insertions(+), 490 deletions(-) create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/btf_probe_event.tc create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/btf_typecast_accepted.tc -- Masami Hiramatsu (Google)