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: <CAADnVQK5nHGnC_9+m0q__AdhSxuHtE5Uh98epw2JEdjOCP343Q@mail.gmail.com>
Date:   Wed, 10 Nov 2021 14:02:29 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Song Liu <songliubraving@...com>
Cc:     bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Kernel Team <kernel-team@...com>,
        syzbot+e0d81ec552a21d9071aa@...kaller.appspotmail.com,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH bpf-next] bpf: extend BTF_ID_LIST_GLOBAL with parameter
 for number of IDs

On Wed, Nov 10, 2021 at 9:47 AM Song Liu <songliubraving@...com> wrote:
>
> -#ifdef CONFIG_DEBUG_INFO_BTF
> -BTF_ID_LIST_GLOBAL(btf_sock_ids)
> +BTF_ID_LIST_GLOBAL(btf_sock_ids, MAX_BTF_SOCK_TYPE)
>  #define BTF_SOCK_TYPE(name, type) BTF_ID(struct, type)
>  BTF_SOCK_TYPE_xxx
>  #undef BTF_SOCK_TYPE
> -#else
> -u32 btf_sock_ids[MAX_BTF_SOCK_TYPE];
> -#endif

If we're trying to future proof it I think it would be better
to combine it with MAX_BTF_SOCK_TYPE and BTF_SOCK_TYPE_xxx macro.
(or have another macro that is tracing specific).
That will help avoid cryptic btf_task_struct_ids[0|1|2]
references in the code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ