All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, paul@paul-moore.com,
	linux-fsdevel@vger.kernel.org,
	linux-security-module@vger.kernel.org, keescook@chromium.org,
	kernel-team@meta.com, sargun@sargun.me
Subject: Re: [PATCH bpf-next 1/8] bpf: fail BPF_TOKEN_CREATE if no delegation option was set on BPF FS
Date: Fri, 8 Dec 2023 22:49:52 +0100	[thread overview]
Message-ID: <20231208-pocken-flugverbindung-0e4b956cd089@brauner> (raw)
In-Reply-To: <20231207185443.2297160-2-andrii@kernel.org>

On Thu, Dec 07, 2023 at 10:54:36AM -0800, Andrii Nakryiko wrote:
> It's quite confusing in practice when it's possible to successfully
> create a BPF token from BPF FS that didn't have any of delegate_xxx
> mount options set up. While it's not wrong, it's actually more
> meaningful to reject BPF_TOKEN_CREATE with specific error code (-ENOENT)
> to let user-space know that no token delegation is setup up.
> 
> So, instead of creating empty BPF token that will be always ignored
> because it doesn't have any of the allow_xxx bits set, reject it with
> -ENOENT. If we ever need empty BPF token to be possible, we can support
> that with extra flag passed into BPF_TOKEN_CREATE.
> 
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
> ---

Might consider EOPNOTSUPP (or whatever the correct way of spelling this
is). Otherwise,
Acked-by: Christian Brauner <brauner@kernel.org>

  reply	other threads:[~2023-12-08 21:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 18:54 [PATCH bpf-next 0/8] BPF token support in libbpf's BPF object Andrii Nakryiko
2023-12-07 18:54 ` [PATCH bpf-next 1/8] bpf: fail BPF_TOKEN_CREATE if no delegation option was set on BPF FS Andrii Nakryiko
2023-12-08 21:49   ` Christian Brauner [this message]
2023-12-08 22:42     ` Andrii Nakryiko
2023-12-11 21:33   ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 2/8] libbpf: split feature detectors definitions from cached results Andrii Nakryiko
2023-12-11 21:38   ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 3/8] libbpf: further decouple feature checking logic from bpf_object Andrii Nakryiko
2023-12-10 15:31   ` Eduard Zingerman
2023-12-11 18:20     ` Andrii Nakryiko
2023-12-11 21:41   ` John Fastabend
2023-12-11 22:50     ` Andrii Nakryiko
2023-12-07 18:54 ` [PATCH bpf-next 4/8] libbpf: move feature detection code into its own file Andrii Nakryiko
2023-12-11 21:41   ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 5/8] libbpf: wire up token_fd into feature probing logic Andrii Nakryiko
2023-12-11 21:44   ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 6/8] libbpf: wire up BPF token support at BPF object level Andrii Nakryiko
2023-12-11 22:56   ` John Fastabend
2023-12-12  0:05     ` Andrii Nakryiko
2023-12-12  0:26       ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 7/8] selftests/bpf: add BPF object loading tests with explicit token passing Andrii Nakryiko
2023-12-11 22:59   ` John Fastabend
2023-12-07 18:54 ` [PATCH bpf-next 8/8] selftests/bpf: add tests for BPF object load with implicit token Andrii Nakryiko
2023-12-11 23:00   ` John Fastabend
2023-12-10 15:30 ` [PATCH bpf-next 0/8] BPF token support in libbpf's BPF object Eduard Zingerman
2023-12-11 18:21   ` Andrii Nakryiko

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=20231208-pocken-flugverbindung-0e4b956cd089@brauner \
    --to=brauner@kernel.org \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=keescook@chromium.org \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sargun@sargun.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.