[DTrace-devel] [oracle/dtrace-utils] 44570e: Set lockmem limit before checking BPF helper funct...

Kris Van Hees noreply at github.com
Thu Oct 16 05:05:22 UTC 2025


  Branch: refs/heads/dev-queue
  Home:   https://github.com/oracle/dtrace-utils
  Commit: 44570eac499ab824035ef2d778e405089c98f833
      https://github.com/oracle/dtrace-utils/commit/44570eac499ab824035ef2d778e405089c98f833
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M libdtrace/dt_open.c
    A test/unittest/misc/tst.lockmem-init.r
    A test/unittest/misc/tst.lockmem-init.sh

  Log Message:
  -----------
  Set lockmem limit before checking BPF helper functions

In dtrace_init(), we set the locked-memory limit, either to the
user-specified value (if any) or to unlimited (by default).  We also check
to make sure that certain BPF helper functions are available, falling
over to alternatives or indicating they are not available in case of
problems.

It is possible, however, that the limit is too low when dtrace starts,
causing problems with the helper-function tests before dtrace_init()
even has a chance to reset the limit.

Switch the order to set the limit before checking the helper functions.

A test is added.  The underlying problem, however, depends on kernel
version, how locked memory is handled, the behavior of fallback
functions, and so on.  So the test could easily pass on some systems
even if the fix is not employed.

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


  Commit: d1f678e51183befe166483cbdfbfd5f0a4ff7474
      https://github.com/oracle/dtrace-utils/commit/d1f678e51183befe166483cbdfbfd5f0a4ff7474
  Author: Kris Van Hees <kris.van.hees at oracle.com>
  Date:   2025-10-16 (Thu, 16 Oct 2025)

  Changed paths:
    A test/unittest/actions/return/err.destructive.x
    A test/unittest/actions/return/tst.destructive.x
    A test/unittest/actions/return/tst.override-getpid-entry.x
    A test/unittest/actions/return/tst.override-getpid-return.x

  Log Message:
  -----------
  test: skip D return() action for kernels without support

Most of the err.* tests can still be run, since they test other failure
modes.

Suggested-by: Eugene Loh <eugene.loh at oracle.com>
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/29c01a51963c...d1f678e51183

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