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: <CAEf4BzbKtJ+xehJqzStiUEB67YbDFpydVSiLbNi2=WQt+8iDBQ@mail.gmail.com>
Date:   Thu, 25 May 2023 10:54:13 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
        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, Song Liu <song@...nel.org>,
        bpf@...r.kernel.org
Subject: Re: [PATCH] perf bpf filter: Fix a broken perf sample data naming in BPF

On Wed, May 24, 2023 at 5:03 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> BPF CO-RE requires 3 underscores for the ignored suffix rule but it
> mistakenly used only 2.  Let's fix it.
>
> Fixes: 3a8b8fc31748 ("perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src'")
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/bpf_skel/sample_filter.bpf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Seems like that's the only remaining case. LGTM.

Acked-by: Andrii Nakryiko <andrii@...nel.org>

> diff --git a/tools/perf/util/bpf_skel/sample_filter.bpf.c b/tools/perf/util/bpf_skel/sample_filter.bpf.c
> index cffe493af1ed..fb94f5280626 100644
> --- a/tools/perf/util/bpf_skel/sample_filter.bpf.c
> +++ b/tools/perf/util/bpf_skel/sample_filter.bpf.c
> @@ -25,7 +25,7 @@ struct perf_sample_data___new {
>  } __attribute__((preserve_access_index));
>
>  /* new kernel perf_mem_data_src definition */
> -union perf_mem_data_src__new {
> +union perf_mem_data_src___new {
>         __u64 val;
>         struct {
>                 __u64   mem_op:5,       /* type of opcode */
> @@ -108,7 +108,7 @@ static inline __u64 perf_get_sample(struct bpf_perf_event_data_kern *kctx,
>                 if (entry->part == 7)
>                         return kctx->data->data_src.mem_blk;
>                 if (entry->part == 8) {
> -                       union perf_mem_data_src__new *data = (void *)&kctx->data->data_src;
> +                       union perf_mem_data_src___new *data = (void *)&kctx->data->data_src;
>
>                         if (bpf_core_field_exists(data->mem_hops))
>                                 return data->mem_hops;
> --
> 2.41.0.rc0.172.g3f132b7071-goog
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ