Re: [PATCH v3 11/12] perf test: Drop samples without an IP in the dlfilter test
From: Ian Rogers
Date: Sun Nov 15 2026 - 16:57:23 EST
On Sat, Nov 14, 2026 at 5:41 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> Since v7.3 the kernel zeroes PERF_SAMPLE_IP when a userspace-only event
> skids into kernel mode, so that kernel register state is not exposed to
> an unprivileged event (166f10836a653dfa "perf/core: Fix kernel register
> info leak via hardware skid").
>
> The test dlfilter keeps those samples, and the check that nothing but
> test_loop survives then trips on their lines: the comm column reads
> "perf". Drop them, which is what the test wants, everything except
> test_loop must be filtered out.
>
> Fixes: 199d5e872a9ce737 ("perf tests script dlfilter: Add a dlfilter test")
> Cc: Ian Rogers <irogers@xxxxxxxxxx>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Thanks,
Ian
> ---
> tools/perf/tests/shell/script_dlfilter.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/script_dlfilter.sh b/tools/perf/tests/shell/script_dlfilter.sh
> index 88222280f6094fd0..797cd9ae84141f64 100755
> --- a/tools/perf/tests/shell/script_dlfilter.sh
> +++ b/tools/perf/tests/shell/script_dlfilter.sh
> @@ -46,7 +46,7 @@ int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ct
> const struct perf_dlfilter_al *al;
>
> if (!sample->ip)
> - return 0;
> + return 1;
>
> al = perf_dlfilter_fns.resolve_ip(ctx);
> if (!al || !al->sym || strcmp(al->sym, "test_loop"))
> --
> 2.56.0
>