[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQK8JcV8n4J-FgryKxgLBnNHLMWftjSiEZ3zPuCnFgkKrw@mail.gmail.com>
Date: Fri, 20 May 2022 15:46:40 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Shung-Hsi Yu <shung-hsi.yu@...e.com>
Cc: Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>
Subject: Re: [PATCH bpf-next 3/4] bpf: verifier: remove redundant opcode checks
On Fri, May 20, 2022 at 4:38 AM Shung-Hsi Yu <shung-hsi.yu@...e.com> wrote:
>
> The introduction of opcode validation with bpf_opcode_in_insntable() in
> commit 5e581dad4fec ("bpf: make unknown opcode handling more robust")
> has made opcode checks done in do_check_common() and its callees
> redundant, so either remove them entirely, or turn them into comments in
> places where the redundancy may not be clear.
I prefer to keep the existing checks.
They help readability on what is actually expected at this point.
These checks cost close to nothing in run-time.
Powered by blists - more mailing lists