linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: David Windsor <dwindsor@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
	kpsingh@kernel.org, john.fastabend@gmail.com, brauner@kernel.org,
	jack@suse.cz, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/2] bpf: Add dentry kfuncs for BPF LSM programs
Date: Thu, 25 Sep 2025 00:55:18 +0100	[thread overview]
Message-ID: <20250924235518.GW39973@ZenIV> (raw)
In-Reply-To: <20250924232434.74761-2-dwindsor@gmail.com>

On Wed, Sep 24, 2025 at 07:24:33PM -0400, David Windsor wrote:
> Add six new BPF kfuncs that enable BPF LSM programs to safely interact
> with dentry objects:
> 
> - bpf_dget(): Acquire reference on dentry
> - bpf_dput(): Release reference on dentry
> - bpf_dget_parent(): Get referenced parent dentry
> - bpf_d_find_alias(): Find referenced alias dentry for inode
> - bpf_file_dentry(): Get dentry from file
> - bpf_file_vfsmount(): Get vfsmount from file
> 
> All kfuncs are currently restricted to BPF_PROG_TYPE_LSM programs.

You have an interesting definition of safety.

We are *NOT* letting random out-of-tree code play around with the
lifetime rules for core objects.

Not happening, whatever usecase you might have in mind.  This is
far too low-level to be exposed.

NAKed-by: Al Viro <viro@zeniv.linux.org.uk>

  reply	other threads:[~2025-09-24 23:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 23:24 [PATCH bpf-next 0/2] bpf: Add more dentry kfuncs for BPF LSM programs David Windsor
2025-09-24 23:24 ` [PATCH bpf-next 1/2] bpf: Add " David Windsor
2025-09-24 23:55   ` Al Viro [this message]
2025-09-25  0:08     ` David Windsor
2025-09-25  0:29       ` Al Viro
2025-09-25  0:44         ` David Windsor
2025-09-25  0:47           ` Al Viro
2025-09-25  0:56             ` David Windsor
2025-09-29  8:24     ` Christian Brauner
2025-09-24 23:24 ` [PATCH bpf-next 2/2] selftests/bpf: Add tests for dentry kfuncs David Windsor

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=20250924235518.GW39973@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dwindsor@gmail.com \
    --cc=jack@suse.cz \
    --cc=john.fastabend@gmail.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=song@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).