linux/include
Linus Torvalds ac57fa9faf tracing fixes for 7.0:
- Revert "tracing: Remove pid in task_rename tracing output"
 
   A change was made to remove the pid field from the task_rename event
   because it was thought that it was always done for the current task and
   recording the pid would be redundant. This turned out to be incorrect and
   there are a few corner case where this is not true and caused some
   regressions in tooling.
 
 - Fix the reading from user space for migration
 
   The reading of user space uses a seq lock type of logic where it uses a
   per-cpu temporary buffer and disables migration, then enables preemption,
   does the copy from user space, disables preemption, enables migration and
   checks if there was any schedule switches while preemption was enabled. If
   there was a context switch, then it is considered that the per-cpu buffer
   could be corrupted and it tries again. There's a protection check that
   tests if it takes a hundred tries, it issues a warning and exits out to
   prevent a live lock.
 
   This was triggered because the task was selected by the load balancer to
   be migrated to another CPU, every time preemption is enabled the migration
   task would schedule in try to migrate the task but can't because migration
   is disabled and let it run again. This caused the scheduler to schedule out
   the task every time it enabled preemption and made the loop never exit
   (until the 100 iteration test triggered).
 
   Fix this by enabling and disabling preemption and keeping migration
   enabled if the reading from user space needs to be done again. This will
   let the migration thread migrate the task and the copy from user space
   will likely pass on the next iteration.
 
 - Fix trace_marker copy option freeing
 
   The "copy_trace_marker" option allows a tracing instance to get a copy of
   a write to the trace_marker file of the top level instance. This is
   managed by a link list protected by RCU. When an instance is removed, a
   check is made if the option is set, and if so synchronized_rcu() is
   called. The problem is that an iteration is made to reset all the flags to
   what they were when the instance was created (to perform clean ups) was
   done before the check of the copy_trace_marker option and that option was
   cleared, so the synchronize_rcu() was never called.
 
   Move the clearing of all the flags after the check of copy_trace_marker to
   do synchronize_rcu() so that the option is still set if it was before and
   the synchronization is performed.
 
 - Fix entries setting when validating the persistent ring buffer
 
   When validating the persistent ring buffer on boot up, the number of
   events per sub-buffer is added to the sub-buffer meta page. The validator
   was updating cpu_buffer->head_page (the first sub-buffer of the per-cpu
   buffer) and not the "head_page" variable that was iterating the
   sub-buffers. This was causing the first sub-buffer to be assigned the
   entries for each sub-buffer and not the sub-buffer that was supposed to be
   updated.
 
 - Use "hash" value to update the direct callers
 
   When updating the ftrace direct callers, it assigned a temporary callback
   to all the callback functions of the ftrace ops and not just the
   functions represented by the passed in hash. This causes an unnecessary
   slow down of the functions of the ftrace_ops that is not being modified.
   Only update the functions that are going to be modified to call the
   ftrace loop function so that the update can be made on those functions.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCacAMahQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qr0sAQCoI4L3iAR5HU1z8dw2GWhOz9fTnzfw
 9VPRZAsga9J5xgEA1Y0bvKBM0UPHFAL2POkaILYV1aT00lZ7aIVHPqfdYgA=
 =OoGW
 -----END PGP SIGNATURE-----

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

Pull tracing fixes from Steven Rostedt:

 - Revert "tracing: Remove pid in task_rename tracing output"

   A change was made to remove the pid field from the task_rename event
   because it was thought that it was always done for the current task
   and recording the pid would be redundant. This turned out to be
   incorrect and there are a few corner case where this is not true and
   caused some regressions in tooling.

 - Fix the reading from user space for migration

   The reading of user space uses a seq lock type of logic where it uses
   a per-cpu temporary buffer and disables migration, then enables
   preemption, does the copy from user space, disables preemption,
   enables migration and checks if there was any schedule switches while
   preemption was enabled. If there was a context switch, then it is
   considered that the per-cpu buffer could be corrupted and it tries
   again. There's a protection check that tests if it takes a hundred
   tries, it issues a warning and exits out to prevent a live lock.

   This was triggered because the task was selected by the load balancer
   to be migrated to another CPU, every time preemption is enabled the
   migration task would schedule in try to migrate the task but can't
   because migration is disabled and let it run again. This caused the
   scheduler to schedule out the task every time it enabled preemption
   and made the loop never exit (until the 100 iteration test
   triggered).

   Fix this by enabling and disabling preemption and keeping migration
   enabled if the reading from user space needs to be done again. This
   will let the migration thread migrate the task and the copy from user
   space will likely pass on the next iteration.

 - Fix trace_marker copy option freeing

   The "copy_trace_marker" option allows a tracing instance to get a
   copy of a write to the trace_marker file of the top level instance.
   This is managed by a link list protected by RCU. When an instance is
   removed, a check is made if the option is set, and if so
   synchronized_rcu() is called.

   The problem is that an iteration is made to reset all the flags to
   what they were when the instance was created (to perform clean ups)
   was done before the check of the copy_trace_marker option and that
   option was cleared, so the synchronize_rcu() was never called.

   Move the clearing of all the flags after the check of
   copy_trace_marker to do synchronize_rcu() so that the option is still
   set if it was before and the synchronization is performed.

 - Fix entries setting when validating the persistent ring buffer

   When validating the persistent ring buffer on boot up, the number of
   events per sub-buffer is added to the sub-buffer meta page. The
   validator was updating cpu_buffer->head_page (the first sub-buffer of
   the per-cpu buffer) and not the "head_page" variable that was
   iterating the sub-buffers. This was causing the first sub-buffer to
   be assigned the entries for each sub-buffer and not the sub-buffer
   that was supposed to be updated.

 - Use "hash" value to update the direct callers

   When updating the ftrace direct callers, it assigned a temporary
   callback to all the callback functions of the ftrace ops and not just
   the functions represented by the passed in hash. This causes an
   unnecessary slow down of the functions of the ftrace_ops that is not
   being modified. Only update the functions that are going to be
   modified to call the ftrace loop function so that the update can be
   made on those functions.

* tag 'trace-v7.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  ftrace: Use hash argument for tmp_ops in update_ftrace_direct_mod
  ring-buffer: Fix to update per-subbuf entries of persistent ring buffer
  tracing: Fix trace_marker copy link list updates
  tracing: Fix failure to read user space from system call trace events
  tracing: Revert "tracing: Remove pid in task_rename tracing output"
2026-03-22 11:10:31 -07:00
..
acpi mailbox: platform and core updates 2026-02-14 11:13:32 -08:00
asm-generic kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
clocksource
crypto Networking changes for 7.0 2026-02-11 19:31:52 -08:00
cxl
drm drm/dp: Add definition for Panel Replay full-line granularity 2026-03-04 15:26:08 +02:00
dt-bindings phy-for-7.0 2026-02-17 11:40:04 -08:00
hyperv Revert "mshv: expose the scrub partition hypercall" 2026-03-11 16:54:24 +00:00
keys
kunit kunit: irq: Ensure timer doesn't fire too frequently 2026-02-24 14:44:21 -08:00
kvm
linux Fix a Sparse build errors regression in <linux/local_lock_internal.h> 2026-03-22 09:57:20 -07:00
math-emu
media [GIT PULL for v7.0] media updates 2026-02-11 12:20:25 -08:00
memory
misc
net Just a few updates: 2026-03-18 19:25:41 -07:00
pcmcia
ras
rdma RDMA/core: Check id_priv->restricted_node_type in cma_listen_on_dev() 2026-02-25 07:50:10 -05:00
rv rv: Fix multiple definition of __pcpu_unique_da_mon_this 2026-02-20 13:12:00 +01:00
scsi SCSI misc on 20260212 2026-02-12 15:43:02 -08:00
soc
sound ASoC: Fixes for v7.0 2026-03-05 17:22:14 +01:00
target
trace tracing: Revert "tracing: Remove pid in task_rename tracing output" 2026-03-21 16:41:18 -04:00
uapi ARM: 2026-03-15 12:22:10 -07:00
ufs
vdso
video
xen xen/xenbus: better handle backend crash 2026-03-04 15:31:40 +01:00
Kbuild