linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, kernel-team@meta.com,
	andrii@kernel.org, eddyz87@gmail.com, ast@kernel.org,
	daniel@iogearbox.net, martin.lau@linux.dev,
	viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	kpsingh@kernel.org, mattbobrowski@google.com, amir73il@gmail.com,
	gregkh@linuxfoundation.org, daan.j.demeyer@gmail.com
Subject: Re: [PATCH bpf-next 0/4] Introduce bpf_kernfs_read_xattr
Date: Wed, 18 Jun 2025 14:43:34 -1000	[thread overview]
Message-ID: <aFNdNv4Bvw6MwlaH@slm.duckdns.org> (raw)
In-Reply-To: <20250618233739.189106-1-song@kernel.org>

Hello,

On Wed, Jun 18, 2025 at 04:37:35PM -0700, Song Liu wrote:
> Introduce a new kfunc bpf_kernfs_read_xattr, which can read xattr from
> kernfs nodes (cgroupfs, for example). The primary users are LSMs, for
> example, from systemd. sched_ext could also use xattrs on cgroupfs nodes.
> However, this is not allowed yet, because bpf_kernfs_read_xattr is only
> allowed from LSM hooks. The plan is to address sched_ext later (or in a
> later revision of this set).

I don't think kernfs is the name we should be exposing to BPF users. This is
an implementation detail which may change in the future. I'd rather make it
a generic interface or a cgroup specific one. The name "kernfs" doesn't
really mean much outside kernel code that's using them.

Thanks.

-- 
tejun

  parent reply	other threads:[~2025-06-19  0:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 23:37 [PATCH bpf-next 0/4] Introduce bpf_kernfs_read_xattr Song Liu
2025-06-18 23:37 ` [PATCH bpf-next 1/4] kernfs: Add __kernfs_xattr_get for RCU protected access Song Liu
2025-06-19 10:01   ` Christian Brauner
2025-06-19 10:33     ` Greg Kroah-Hartman
2025-06-19 15:33     ` Song Liu
2025-06-21  2:38     ` Tejun Heo
2025-06-19 13:57   ` kernel test robot
2025-06-18 23:37 ` [PATCH bpf-next 2/4] bpf: Introduce bpf_kernfs_read_xattr to read xattr of kernfs nodes Song Liu
2025-06-19  8:49   ` Christian Brauner
2025-06-18 23:37 ` [PATCH bpf-next 3/4] bpf: Mark cgroup_subsys_state->cgroup RCU safe Song Liu
2025-06-18 23:37 ` [PATCH bpf-next 4/4] selftests/bpf: Add tests for bpf_kernfs_read_xattr Song Liu
2025-06-19  0:43 ` Tejun Heo [this message]
2025-06-19  8:48   ` [PATCH bpf-next 0/4] Introduce bpf_kernfs_read_xattr Christian Brauner
2025-06-19 15:31     ` 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=aFNdNv4Bvw6MwlaH@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=daan.j.demeyer@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=kernel-team@meta.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mattbobrowski@google.com \
    --cc=song@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).