From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Lorenz Bauer <lmb@cloudflare.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
kernel-team <kernel-team@cloudflare.com>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: explicitly size compatible_reg_types
Date: Wed, 23 Sep 2020 11:49:09 -0700 [thread overview]
Message-ID: <CAADnVQ+m+b5GKxk+sw-R+374vQRbQn59MP4g1uKPghnSWt6pVw@mail.gmail.com> (raw)
In-Reply-To: <CAEf4BzZJQBdW72TRCuW7q0c3kke1Qan59fDzV0DKN_EOAgXGaw@mail.gmail.com>
On Wed, Sep 23, 2020 at 9:05 AM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Sep 23, 2020 at 9:03 AM Lorenz Bauer <lmb@cloudflare.com> wrote:
> >
> > Arrays with designated initializers have an implicit length of the highest
> > initialized value plus one. I used this to ensure that newly added entries
> > in enum bpf_reg_type get a NULL entry in compatible_reg_types.
> >
> > This is difficult to understand since it requires knowledge of the
> > peculiarities of designated initializers. Use __BPF_ARG_TYPE_MAX to size
> > the array instead.
> >
> > Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
> > Suggested-by: Alexei Starovoitov <ast@kernel.org>
> > ---
>
> I like this more as well.
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
Applied. Thanks
prev parent reply other threads:[~2020-09-23 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 16:01 [PATCH bpf-next] bpf: explicitly size compatible_reg_types Lorenz Bauer
2020-09-23 16:05 ` Andrii Nakryiko
2020-09-23 18:49 ` Alexei Starovoitov [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=CAADnVQ+m+b5GKxk+sw-R+374vQRbQn59MP4g1uKPghnSWt6pVw@mail.gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@cloudflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).