[DTrace-devel] [oracle/dtrace-utils] 56ebbb: bpf: fix file descriptor leak

Kris Van Hees noreply at github.com
Thu Nov 20 20:56:08 UTC 2025


  Branch: refs/heads/dev-queue
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 56ebbb8c8b083bdbdc74a4576a3dc3dc604a3d0e
      https://github.com/oracle/dtrace-utils/commit/56ebbb8c8b083bdbdc74a4576a3dc3dc604a3d0e
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_bpf.c

  Log Message:
  -----------
  bpf: fix file descriptor leak

When a BPF program has been attached to a perf event, it is safe to
close its file descriptor.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 7c77138fd41c118a6cf3416547c03190c6cb408e
      https://github.com/oracle/dtrace-utils/commit/7c77138fd41c118a6cf3416547c03190c6cb408e
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_prov_uprobe.c

  Log Message:
  -----------
  uprobe: remove unnecessary enable_*() functions

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 3fbcca750a10cf4f3586f97ede33da6f189eb3c7
      https://github.com/oracle/dtrace-utils/commit/3fbcca750a10cf4f3586f97ede33da6f189eb3c7
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_bpf.c
    M libdtrace/dt_bpf_maps.h
    M libdtrace/dt_dlibs.c
    M libdtrace/dt_impl.h
    M libdtrace/dt_pid.c
    M libdtrace/dt_probe.c
    M libdtrace/dt_probe.h
    M libdtrace/dt_program.c
    M libdtrace/dt_program.h
    M libdtrace/dt_prov_uprobe.c
    M libdtrace/dtrace.h
    A test/unittest/usdt/tst.defer-Z-basic.r
    A test/unittest/usdt/tst.defer-Z-basic.sh

  Log Message:
  -----------
  uprobe: Implement PID-specific uprobes

The mechanism to create uprobes by writing to $TRACEFS/uprobe_events
caused probes to be placed in the dev/inode based mapping.  This means
that all tasks that use that mapping are subject to the probes firing.

The kernel supports placing uprobes for a specific task (by PID), which
avoids impacting all other tasks that share the same code but are not
the target of the tracing.

This new mechanism places uprobes using the perf_event_open interface.
Perf event attribute configuration data is read from
/sys/bus/event_source/devices/uprobe/ as needed (and cached to ease
repeated use).  Underlying probes are now organized by PID-specific
providers (uprobe$PID), and attach/detach no longer depends on the
generic tracepoint support.

The usdt_prids BPF map is no longer needed because USDT BPF programs
are now task-specific.  The trampoline generation for USDT Probes
discovered after tracing started can now perform a simple loop over
all compiled clauses, adding those that match the probe description
to the program.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 32363190e38f5a2c9f58e4a806c220d40323429c
      https://github.com/oracle/dtrace-utils/commit/32363190e38f5a2c9f58e4a806c220d40323429c
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_module.c

  Log Message:
  -----------
  module: fixing missing } when not using libctf

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 1cefd6d69ceefc845e2a20768576adca19c009ce
      https://github.com/oracle/dtrace-utils/commit/1cefd6d69ceefc845e2a20768576adca19c009ce
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_prov_tcp.c

  Log Message:
  -----------
  tcp: support non-libctf environments

Commit 0fa93b3ac ("tcp: new provider") and commit c08a5fcf2
("tcp provider: support tcp:::accept-established in absence of skb") both
introduced code that uses ctf_func_type_info() without a pre-processor
conditional to also support the case when libctf is not present on the
system.

When libctf is not present, it is assumed that the system is quite old
and therefore is running an older kernel.  Use of libdtrace-ctf (which
has been deprecated in favour of libctf) on systems with recent kernels
is not supported and may lead to unexpected results.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 37b79f723badb0f27568c38ab0f78421d912c7c6
      https://github.com/oracle/dtrace-utils/commit/37b79f723badb0f27568c38ab0f78421d912c7c6
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M libdtrace/dt_module.c

  Log Message:
  -----------
  module ranges: fix file pointer leak

The file pointer to modules.builtin.ranges was never closed.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


  Commit: 3198d4fb8a94325c84a836fdbdbd2ea974f9ee99
      https://github.com/oracle/dtrace-utils/commit/3198d4fb8a94325c84a836fdbdbd2ea974f9ee99
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-11-20 (Thu, 20 Nov 2025)

  Changed paths:
    M dtrace.spec

  Log Message:
  -----------
  spec: add testsuite dependency for perl-Net-Ping

Commit 1e689f55 ("Make a start at reviving the ip tests.") added the
perlping.pl script, but did not ensure that a dependency was added
for perl-Net-Ping that the script depends on.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>


Compare: https://github.com/oracle/dtrace-utils/compare/59a49ce9d4a3...3198d4fb8a94

To unsubscribe from these emails, change your notification settings at https://github.com/oracle/dtrace-utils/settings/notifications



More information about the DTrace-devel mailing list