From: Kees Cook <keescook@chromium•org>
To: Daniel Borkmann <daniel@iogearbox•net>
Cc: Mark Rutland <mark.rutland@arm•com>,
Alexei Starovoitov <ast@kernel•org>,
Andrii Nakryiko <andrii@kernel•org>,
Martin KaFai Lau <martin.lau@linux•dev>,
Song Liu <song@kernel•org>, Yonghong Song <yhs@fb•com>,
John Fastabend <john.fastabend@gmail•com>,
KP Singh <kpsingh@kernel•org>,
Stanislav Fomichev <sdf@google•com>, Hao Luo <haoluo@google•com>,
Jiri Olsa <jolsa@kernel•org>, Mykola Lysenko <mykolal@fb•com>,
Shuah Khan <shuah@kernel•org>, Haowen Bai <baihaowen@meizu•com>,
bpf@vger•kernel.org, linux-kselftest@vger•kernel.org,
Yonghong Song <yonghong.song@linux•dev>,
Jonathan Corbet <corbet@lwn•net>,
"David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
Jesper Dangaard Brouer <hawk@kernel•org>,
Joanne Koong <joannelkoong@gmail•com>,
Yafang Shao <laoar.shao@gmail•com>,
Kui-Feng Lee <kuifeng@meta•com>,
Anton Protopopov <aspsk@isovalent•com>,
linux-kernel@vger•kernel.org, linux-doc@vger•kernel.org,
netdev@vger•kernel.org, linux-hardening@vger•kernel.org
Subject: Re: [PATCH v3] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array
Date: Tue, 20 Feb 2024 10:52:56 -0800 [thread overview]
Message-ID: <202402201047.DF40C42D24@keescook> (raw)
In-Reply-To: <4a4fadc5-5aac-3051-f1e6-c56d40350e35@iogearbox.net>
On Tue, Feb 20, 2024 at 11:18:40AM +0100, Daniel Borkmann wrote:
> On 2/20/24 12:41 AM, Kees Cook wrote:
> > Replace deprecated 0-length array in struct bpf_lpm_trie_key with
> > flexible array. Found with GCC 13:
> [...]
> This fails the BPF CI :
>
> [...]
> INSTALL /tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/skel_internal.h
> INSTALL /tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf_version.h
> INSTALL /tmp/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/usdt.bpf.h
> In file included from urandom_read_lib1.c:7:
> In file included from /tmp/work/bpf/bpf/tools/lib/bpf/libbpf_internal.h:20:
> In file included from /tmp/work/bpf/bpf/tools/lib/bpf/relo_core.h:7:
> /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h:91:2: error: type name requires a specifier or qualifier
> 91 | __struct_group(bpf_lpm_trie_key_hdr, hdr, /* no attrs */,
> | ^
> /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h:91:58: error: expected identifier
> 91 | __struct_group(bpf_lpm_trie_key_hdr, hdr, /* no attrs */,
> | ^
> /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h:93:18: error: unexpected ';' before ')'
> 93 | __u32 prefixlen;
> | ^
> /tmp/work/bpf/bpf/tools/include/uapi/linux/bpf.h:95:7: error: flexible array member 'data' not allowed in otherwise empty struct
> 95 | __u8 data[]; /* Arbitrary size */
> | ^
Ah-ha, my test build of cilium happened to cover up the lack of
stddef.h. Fixed now and sending a v4...
--
Kees Cook
prev parent reply other threads:[~2024-02-20 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 23:41 [PATCH v3] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array Kees Cook
2024-02-20 3:45 ` Gustavo A. R. Silva
2024-02-20 10:18 ` Daniel Borkmann
2024-02-20 18:52 ` Kees Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202402201047.DF40C42D24@keescook \
--to=keescook@chromium$(echo .)org \
--cc=andrii@kernel$(echo .)org \
--cc=aspsk@isovalent$(echo .)com \
--cc=ast@kernel$(echo .)org \
--cc=baihaowen@meizu$(echo .)com \
--cc=bpf@vger$(echo .)kernel.org \
--cc=corbet@lwn$(echo .)net \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=haoluo@google$(echo .)com \
--cc=hawk@kernel$(echo .)org \
--cc=joannelkoong@gmail$(echo .)com \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kpsingh@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=kuifeng@meta$(echo .)com \
--cc=laoar.shao@gmail$(echo .)com \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-hardening@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=mark.rutland@arm$(echo .)com \
--cc=martin.lau@linux$(echo .)dev \
--cc=mykolal@fb$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sdf@google$(echo .)com \
--cc=shuah@kernel$(echo .)org \
--cc=song@kernel$(echo .)org \
--cc=yhs@fb$(echo .)com \
--cc=yonghong.song@linux$(echo .)dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox