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: <b803cae0-4514-4239-4004-4c3090ca67c4@infradead.org>
Date:   Wed, 27 Nov 2019 20:56:39 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Alexei Starovoitov <ast@...nel.org>, davem@...emloft.net
Cc:     daniel@...earbox.net, netdev@...r.kernel.org, bpf@...r.kernel.org,
        kernel-team@...com
Subject: Re: [PATCH bpf] bpf: Fix build in minimal configurations

On 11/27/19 8:35 PM, Alexei Starovoitov wrote:
> Some kconfigs can have BPF enabled without a single valid program type.
> In such configurations the build will fail with:
> ./kernel/bpf/btf.c:3466:1: error: empty enum is invalid
> 
> Fix it by adding unused value to the enum.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.

> ---
>  kernel/bpf/btf.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> index bd5e11881ba3..7d40da240891 100644
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
> @@ -3463,6 +3463,7 @@ enum {
>  	__ctx_convert##_id,
>  #include <linux/bpf_types.h>
>  #undef BPF_PROG_TYPE
> +	__ctx_convert_unused, /* to avoid empty enum in extreme .config */
>  };
>  static u8 bpf_ctx_convert_map[] = {
>  #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ