lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fU135iJV72o6tLEBj2GW-uMsQdnnbE=hTAz3rDbmSnBEg@mail.gmail.com>
Date: Wed, 19 Nov 2025 08:49:05 -0800
From: Ian Rogers <irogers@...gle.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, James Clark <james.clark@...aro.org>, 
	Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, 
	LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org, 
	Steven Rostedt <rostedt@...dmis.org>, Josh Poimboeuf <jpoimboe@...nel.org>, 
	Indu Bhagat <indu.bhagat@...cle.com>, Jens Remus <jremus@...ux.ibm.com>, 
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, linux-trace-kernel@...r.kernel.org, 
	bpf@...r.kernel.org
Subject: Re: [PATCH v4 1/5] tools headers UAPI: Sync linux/perf_event.h for
 deferred callchains

On Sat, Nov 15, 2025 at 3:41 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> It needs to sync with the kernel to support user space changes for the
> deferred callchains.
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>

Reviewed-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> ---
>  tools/include/uapi/linux/perf_event.h | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
> index 78a362b8002776e5..d292f96bc06f86bc 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -463,7 +463,9 @@ struct perf_event_attr {
>                                 inherit_thread :  1, /* children only inherit if cloned with CLONE_THREAD */
>                                 remove_on_exec :  1, /* event is removed from task on exec */
>                                 sigtrap        :  1, /* send synchronous SIGTRAP on event */
> -                               __reserved_1   : 26;
> +                               defer_callchain:  1, /* request PERF_RECORD_CALLCHAIN_DEFERRED records */
> +                               defer_output   :  1, /* output PERF_RECORD_CALLCHAIN_DEFERRED records */
> +                               __reserved_1   : 24;
>
>         union {
>                 __u32           wakeup_events;    /* wake up every n events */
> @@ -1239,6 +1241,22 @@ enum perf_event_type {
>          */
>         PERF_RECORD_AUX_OUTPUT_HW_ID            = 21,
>
> +       /*
> +        * This user callchain capture was deferred until shortly before
> +        * returning to user space.  Previous samples would have kernel
> +        * callchains only and they need to be stitched with this to make full
> +        * callchains.
> +        *
> +        * struct {
> +        *      struct perf_event_header        header;
> +        *      u64                             cookie;
> +        *      u64                             nr;
> +        *      u64                             ips[nr];
> +        *      struct sample_id                sample_id;
> +        * };
> +        */
> +       PERF_RECORD_CALLCHAIN_DEFERRED          = 22,
> +
>         PERF_RECORD_MAX,                        /* non-ABI */
>  };
>
> @@ -1269,6 +1287,7 @@ enum perf_callchain_context {
>         PERF_CONTEXT_HV                         = (__u64)-32,
>         PERF_CONTEXT_KERNEL                     = (__u64)-128,
>         PERF_CONTEXT_USER                       = (__u64)-512,
> +       PERF_CONTEXT_USER_DEFERRED              = (__u64)-640,
>
>         PERF_CONTEXT_GUEST                      = (__u64)-2048,
>         PERF_CONTEXT_GUEST_KERNEL               = (__u64)-2176,
> --
> 2.52.0.rc1.455.g30608eb744-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ