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: <CAEf4Bzbfi8Zx=riv5GOz0NqB18yvjixT02YtmowCd7ZSSggDfQ@mail.gmail.com>
Date:   Fri, 8 Jul 2022 15:26:08 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Alan Maguire <alan.maguire@...cle.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin Lau <kafai@...com>, Song Liu <songliubraving@...com>,
        Yonghong Song <yhs@...com>,
        john fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Vernet <void@...ifault.com>, swboyd@...omium.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Dmitrii Dolgov <9erthalion6@...il.com>,
        Kenny Yu <kennyyu@...com>,
        Geliang Tang <geliang.tang@...e.com>,
        Kuniyuki Iwashima <kuniyu@...zon.co.jp>,
        bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 bpf-next 1/2] bpf: add a ksym BPF iterator

On Wed, Jul 6, 2022 at 6:17 AM Alan Maguire <alan.maguire@...cle.com> wrote:
>
> add a "ksym" iterator which provides access to a "struct kallsym_iter"
> for each symbol.  Intent is to support more flexible symbol parsing
> as discussed in [1].
>
> [1] https://lore.kernel.org/all/YjRPZj6Z8vuLeEZo@krava/
>
> Suggested-by: Alexei Starovoitov <alexei.starovoitov@...il.com>
> Signed-off-by: Alan Maguire <alan.maguire@...cle.com>
> Acked-by: Yonghong Song <yhs@...com>
> ---
>  kernel/kallsyms.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 95 insertions(+)
>

LGTM, except for unnecessary pr_warn(), see below


[...]

> +
> +BTF_ID_LIST(btf_ksym_iter_id)
> +BTF_ID(struct, kallsym_iter)
> +
> +static int __init bpf_ksym_iter_register(void)
> +{
> +       int ret;
> +
> +       ksym_iter_reg_info.ctx_arg_info[0].btf_id = *btf_ksym_iter_id;
> +       ret = bpf_iter_reg_target(&ksym_iter_reg_info);
> +       if (ret)
> +               pr_warn("Warning: could not register bpf ksym iterator: %d\n", ret);

we don't emit such warnings for some other iterators I checked (map,
link, etc). Do we really need this? It's very unlikely to happen
anyways.

> +       return ret;
> +}
> +
> +late_initcall(bpf_ksym_iter_register);
> +
> +#endif /* CONFIG_BPF_SYSCALL */
> +
>  static inline int kallsyms_for_perf(void)
>  {
>  #ifdef CONFIG_PERF_EVENTS
> --
> 1.8.3.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ