fsverity.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Song Liu <songliubraving@meta.com>
Cc: Song Liu <song@kernel.org>, bpf <bpf@vger.kernel.org>,
	 "fsverity@lists.linux.dev" <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>
Subject: Re: [PATCH v4 bpf-next 3/9] bpf: Introduce KF_ARG_PTR_TO_CONST_STR
Date: Mon, 23 Oct 2023 22:01:18 -0700	[thread overview]
Message-ID: <CAADnVQLC9T05WRgFebSEjMVomYJPvGmX9r2KEMqC11GdbRg9pA@mail.gmail.com> (raw)
In-Reply-To: <90721298-D511-4C37-B8BC-947215BFA59E@fb.com>

On Mon, Oct 23, 2023 at 8:25 PM Song Liu <songliubraving@meta.com> wrote:
>
>
>
> > On Oct 23, 2023, at 5:49 PM, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> >
> > On Mon, Oct 23, 2023 at 3:41 PM Song Liu <song@kernel.org> wrote:
> >> +
> >> +        __bpf_kfunc bpf_get_file_xattr(..., const char *name__const_str,
> > ...
> >> +               case KF_ARG_PTR_TO_CONST_STR:
> >
> > CONST_STR was ok here, but as __const_str suffix is a bit too verbose.
> > How about just __str ? I don't think we'll have non-const strings in
> > the near future.
>
> I thought about this. While we don't foresee non-const strings in the
> near future, I think __const_str is acceptable. These annotations are
> part of the core APIs of kfuncs. As we enabled other subsystems to add
> kfuncs without touching BPF core, it makes sense to keep the annoations
> as stable as possible. Making __const_str a little shorter doesn't seem
> to justify the risk of changing it in the future.
>
> Also, we already have longer annotations like __refcounted_kptr. So I
> personally prefer to keep the annotation as __const_str.

Ok. That's fair. Didn't realize that such a long suffix is already in use.

  reply	other threads:[~2023-10-24  5:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 22:40 [PATCH v4 bpf-next 0/9] bpf: File verification with LSM and fsverity Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 1/9] bpf: Expose bpf_dynptr_slice* kfuncs for in kernel use Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 2/9] bpf: Factor out helper check_reg_const_str() Song Liu
2023-10-24  0:47   ` Alexei Starovoitov
2023-10-23 22:40 ` [PATCH v4 bpf-next 3/9] bpf: Introduce KF_ARG_PTR_TO_CONST_STR Song Liu
2023-10-24  0:49   ` Alexei Starovoitov
2023-10-24  3:25     ` Song Liu
2023-10-24  5:01       ` Alexei Starovoitov [this message]
2023-10-23 22:40 ` [PATCH v4 bpf-next 4/9] bpf: Add kfunc bpf_get_file_xattr Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 5/9] bpf, fsverity: Add kfunc bpf_get_fsverity_digest Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 6/9] Documentation/bpf: Add documentation for filesystem kfuncs Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 7/9] selftests/bpf: Sort config in alphabetic order Song Liu
2023-10-23 22:40 ` [PATCH v4 bpf-next 8/9] selftests/bpf: Add tests for filesystem kfuncs Song Liu
2023-10-23 22:41 ` [PATCH v4 bpf-next 9/9] selftests/bpf: Add test that use 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=CAADnVQLC9T05WRgFebSEjMVomYJPvGmX9r2KEMqC11GdbRg9pA@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=martin.lau@kernel.org \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=song@kernel.org \
    --cc=songliubraving@meta.com \
    --cc=tytso@mit.edu \
    /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).