[DTrace-devel] [PATCH 1/3] pid: ensure pid offset probes perform lookup with adjusted address
Nick Alcock
nick.alcock at oracle.com
Tue Feb 10 15:18:45 UTC 2026
On 9 Feb 2026, Kris Van Hees via DTrace-devel stated:
> For PIE executables and libraries, pid offset probes need to have the
> address adjusted based on the actual segment load address.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Looks good (in particular it's good that we're actually recording that
this is PIE rather than relying on a usually-right guess), modulo one
tiny nit:
> ---
> include/sys/sol_procfs.h | 3 ++-
> libdtrace/dt_pid.c | 3 +++
> libproc/Psymtab.c | 7 +++++--
> 3 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/include/sys/sol_procfs.h b/include/sys/sol_procfs.h
> index d195a108..950ab31a 100644
> --- a/include/sys/sol_procfs.h
> +++ b/include/sys/sol_procfs.h
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2026, Oracle and/or its affiliates. All rights reserved.
> * Licensed under the Universal Permissive License v 1.0 as shown at
> * http://oss.oracle.com/licenses/upl.
> */
> @@ -50,6 +50,7 @@ typedef struct prmap {
>
>
> /* Protection and attribute flags */
> +#define MA_PIC 0x08 /* position independent code */
> #define MA_READ 0x04 /* readable by the traced process */
Tab/space?
--
NULL && (void)
More information about the DTrace-devel
mailing list