Commit 23b5d045ae5d for kernel

commit 23b5d045ae5df0a2d509915cedcd82f93261d7bc
Merge: 8c13415c8a43 9581123304b2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Jun 18 20:53:00 2026 -0700

    Merge tag 'trace-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

    Pull tracing updates from Steven Rostedt:

     - Remove a redundant IS_ERR() check

       trace_pipe_open() already checks for IS_ERR() and does it again in
       the return path. Remove the return check.

     - Export seq_buf_putmem_hex() to allow kunit tests against them

       To add Kunit tests on seq_buf_putmem_hex(), it needs to be exported.

     - Replace strcat() and strcpy() with seq_buf() logic

       The code for synthetic events uses a series of strcat() and strcpy()
       which can be error prone. Replace them with seq_buf() logic that does
       all the necessary bound checking.

     - Add a lockdep rcu_is_watching() to trace_##event##_enabled() call

       The trace_##event##_enabled() is a static branch that is true if the
       "event" is enabled. But this can hide bugs if this logic is in a
       location where RCU is disabled and not "watching". It would only
       trigger if lockdep is enabled and the event is enabled.

       Add a "rcu_is_watching()" warning if lockdep is enabled in that
       helper function to trigger regardless if the event is enabled or not.

     - Remove the local variable in the trace_printk() macro

       For name space integrity, remove the _______STR variable in the
       trace_printk() macro for using the sizeof() macro directly.

     - Use guard()s for the trace_recursion_record.c file

     - Fix typo in a comment of eventfs_callback() kerneldoc

     - Use trace_call__##event() in events within trace_##event##_enabled()

       A couple of events are called within an if block guarded by
       trace_##event##_enabled(). That is a static key that is only enabled
       when the event is enabled. The trace_call_##event() calls the
       tracepoint code directly without adding a redundant static key for
       that check.

     - Allow perf to read synthetic events

       Currently, perf does not have the ability to enable a synthetic
       event. If it does, it will either cause a kernel warning or error
       with "No such device". Synthetic events are not much different than
       kprobes and perf can handle fine with a few modifications.

     - Replace printk(KERN_WARNING ...) with pr_warn()

     - Replace krealloc() on an array with krealloc_array()

     - Fix README file path name for synthetic events

     - Change tracing_map tracing_map_array to use a flexible array

       Instead of allocating a separate pointer to hold the pages field of
       tracing_map_array, allocate the pages field as a flexible array when
       allocating the structure.

     - Fold trace_iterator_increment() into trace_find_next_entry_inc()

       The function trace_iterator_increment() was only used by
       trace_find_next_entry_inc(). It's not big enough to be a helper
       function for one user. Fold it into its caller.

     - Make field_var_str field a flexible array of hist_elt_data

       Instead of allocating a separate pointer for the field_var_str array
       of the hist_elt_data structure, allocate it as a flexible array when
       allocating the structure.

     - Disable KCOV for trace_irqsoff.c

       Like trace_preemptirq.c, trace_irqsoff.c has code that will crash
       when KCOV is enabled on ARM. The irqsoff tracing can be called on ARM
       because the irqsoff tracing code can be run from early interrupt code
       and produce coverage unrelated to syscall inputs.

     - Fix warning in __unregister_ftrace_function() called by perf

       Perf calls unregister_ftrace_function() without checking if its
       ftrace_ops has already been unregistered. There's an error path where
       on clean up it will unregister the ftrace_ops even if it wasn't
       registered and causes a warning.

    * tag 'trace-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
      perf/ftrace: Fix WARNING in __unregister_ftrace_function
      tracing: Disable KCOV instrumentation for trace_irqsoff.o
      tracing: Turn hist_elt_data field_var_str into a flexible array
      tracing: Move trace_iterator_increment() into trace_find_next_entry_inc()
      tracing: Simplify pages allocation for tracing_map logic
      tracing: Fix README path for synthetic_events
      tracing: Use krealloc_array() for trace option array growth
      tracing/branch: Use pr_warn() instead of printk(KERN_WARNING)
      tracing: Allow perf to read synthetic events
      HID: Use trace_call__##name() at guarded tracepoint call sites
      cpufreq: amd-pstate: Use trace_call__##name() at guarded tracepoint call site
      tracefs: Fix typo in a comment of eventfs_callback() kerneldoc
      tracing: Switch trace_recursion_record.c code over to use guard()
      tracing: Remove local variable for argument detection from trace_printk()
      tracepoint: Add lockdep rcu_is_watching() check to trace_##name##_enabled()
      tracing: Bound synthetic-field strings with seq_buf
      seq_buf: Export seq_buf_putmem_hex() and add KUnit tests
      tracing: Remove redundant IS_ERR() check in trace_pipe_open()