Files
linux/Documentation
Linus Torvalds 97f4f3805f Merge tag 'probes-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probe fixes from Masami Hiramatsu:
 "Fix ftrace ops switching and optprobe state transitions:

   - Switch an armed ftrace-based kprobe from kprobe_ftrace_ops to
     kprobe_ipmodify_ops in register_aggr_kprobe() when adding a probe
     with a post_handler, so later disarming does not fail with -ENOENT
     and leave the probe armed

   - Queue forcibly unoptimized probes onto the generation's
     cooling_list in force_unoptimize_kprobe() so unregister_kprobes()
     waits for Tasks RCU before freeing the optinsn slot, preventing a
     use-after-free

   - Skip arch_arm_kprobe() in __arm_kprobe() when a probe is queued for
     unoptimization so the active relative jump instruction is not
     partially overwritten with a breakpoint before the optimizer runs

   - Re-queue any jump-optimized sibling probe covering a disabled
     probe's address when that probe finishes cooling in
     optprobe_finalize_generation(), matching the freeing_list path

  Fix multiprobe lifecycle and boot kprobe setup

   - Return early in setup_boot_kprobe_events() when the kprobe_event=
     boot buffer is empty to avoid contending on event_mutex with
     asynchronous eval-map work during normal boot

   - Verify that a multiprobe event is neither enabled nor busy before
     unlinking any sibling kprobe, fprobe, uprobe, or eprobe so active
     probes cannot be unlinked and freed via dynamic_events

   - Register and enable a newly appended fprobe or uprobe immediately
     when the target multiprobe event is already enabled so the probe
     fires and disable or perf cleanup does not act on an unregistered
     probe

   - Free the temporary event name string with __free(kfree) in
     __trace_uprobe_create() to prevent a memory leak if a subsequent
     allocation fails

  Fix BTF parsing and string array fetch handling:

   - Compute BTF bitfield byte and bit offsets consistently, select the
     smallest unsigned fetch type covering the bitfield, and size
     FETCH_OP_MOD_BF from that type to prevent an 8-byte out-of-bounds
     write on smaller ring buffer slots

   - Validate BTF_KIND_PTR and non-NULL BTF_KIND_INT types in
     btf_type_is_char_ptr() and btf_type_is_char_array() before reading
     inner type metadata to avoid misinterpreting byte sizes as type IDs
     or reading out of bounds

   - Check for FETCH_OP_UDEREF before advancing the fetch instruction
     slot in finalize_fetch_insn() so user-space dereference string
     arrays emit FETCH_OP_ST_USTRING instead of reading kernel memory

   - Reject string array counts when the preceding fetch operation is
     not a memory dereference so non-dereference string sources ($comm,
     immediate strings, eprobe fields) do not emit invalid
     FETCH_OP_LP_ARRAY loops

  Fix signed 1-byte field fetch and fprobe target check:

   - Use explicit fixed-width integer types (s8/u8, s16/u16, s32/u32) in
     get_event_field() so 1-byte signed event fields are sign-extended
     instead of zero-extended under -funsigned-char

   - Exclude TRACE_EVENT_FL_FPROBE events in find_and_get_event() so
     eprobes cannot attach to fprobe or tprobe events

  Fix typo in kprobes documentation:

   - Remove a stray closing parenthesis in Documentation/trace/kprobes.rst"

* tag 'probes-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/uprobes: Fix memory leak of tail in __trace_uprobe_create()
  tracing/probes: Reject array count on non-dereference string sources
  tracing/probes: Fix user-space dereference string array store type
  tracing/eprobe: Disallow attaching eprobes to fprobe events
  tracing/eprobe: Fix 1-byte signed field fetch in get_event_field()
  tracing/probes: Fix missing BTF kind checks in char pointer/array helpers
  tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write
  tracing/probes: Enable newly appended probe when target event is enabled
  tracing/probes: Check enabled and busy state before unlinking sibling probes
  kprobes: Re-optimize blocked sibling probe when cooling finishes
  kprobes: Do not overwrite jump instruction when re-arming unoptimizing probe
  kprobes: Fix UAF and queue cooling probes on forced unoptimization
  kprobes: Switch ftrace ops when adding probe with post_handler
  docs, kprobes: Fix bracket
  tracing: skip boot kprobe setup when no events were requested
2026-11-15 08:34:09 -08:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-11-13 11:22:21 +09:00
…
…
…
…
…
…
…
…