From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Song Liu <song@kernel.org>
Cc: bpf <bpf@vger.kernel.org>,
fsverity@lists.linux.dev, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@kernel.org>,
Kernel Team <kernel-team@meta.com>,
Eric Biggers <ebiggers@kernel.org>,
"Theodore Ts'o" <tytso@mit.edu>,
Roberto Sassu <roberto.sassu@huaweicloud.com>,
KP Singh <kpsingh@kernel.org>, Vadim Fedorenko <vadfed@meta.com>
Subject: Re: [PATCH v9 bpf-next 2/9] bpf: Factor out helper check_reg_const_str()
Date: Fri, 3 Nov 2023 13:26:35 -0700 [thread overview]
Message-ID: <CAADnVQJgsaH1XddyKphFW0to_0n7xFY_5SFQ2BjMeFACQNH2Zg@mail.gmail.com> (raw)
In-Reply-To: <20231103190147.1757520-3-song@kernel.org>
On Fri, Nov 3, 2023 at 12:02 PM Song Liu <song@kernel.org> wrote:
>
>
> +static int check_reg_const_str(struct bpf_verifier_env *env,
> + struct bpf_reg_state *reg, u32 regno)
> +{
> + struct bpf_map *map = reg->map_ptr;
> + int err;
> + int map_off;
> + u64 map_addr;
> + char *str_ptr;
> +
> + if (WARN_ON_ONCE(reg->type != PTR_TO_MAP_VALUE))
> + return -EINVAL;
Pls drop WARN. People run kernels with panic_on_warn.
This is not an error that is worth panicking on.
next prev parent reply other threads:[~2023-11-03 20:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 19:01 [PATCH v9 bpf-next 0/9] bpf: File verification with LSM and fsverity Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 1/9] bpf: Add __bpf_dynptr_data* for in kernel use Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 2/9] bpf: Factor out helper check_reg_const_str() Song Liu
2023-11-03 20:26 ` Alexei Starovoitov [this message]
2023-11-03 19:01 ` [PATCH v9 bpf-next 3/9] bpf: Introduce KF_ARG_PTR_TO_CONST_STR Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 4/9] bpf: Add kfunc bpf_get_file_xattr Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 5/9] bpf, fsverity: Add kfunc bpf_get_fsverity_digest Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 6/9] Documentation/bpf: Add documentation for filesystem kfuncs Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 7/9] selftests/bpf: Sort config in alphabetic order Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 8/9] selftests/bpf: Add tests for filesystem kfuncs Song Liu
2023-11-03 19:01 ` [PATCH v9 bpf-next 9/9] selftests/bpf: Add test that uses fsverity and xattr to sign a file Song Liu
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=CAADnVQJgsaH1XddyKphFW0to_0n7xFY_5SFQ2BjMeFACQNH2Zg@mail.gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=ebiggers@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=kernel-team@meta.com \
--cc=kpsingh@kernel.org \
--cc=martin.lau@kernel.org \
--cc=roberto.sassu@huaweicloud.com \
--cc=song@kernel.org \
--cc=tytso@mit.edu \
--cc=vadfed@meta.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).