From: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>
To: "Paul Moore" <paul@paul-moore.com>
Cc: "David Windsor" <dwindsor@gmail.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"John Fastabend" <john.fastabend@gmail.com>,
"KP Singh" <kpsingh@kernel.org>, "Jiri Olsa" <jolsa@kernel.org>,
"Emil Tsalapatis" <emil@etsalapatis.com>,
"Matt Bobrowski" <mattbobrowski@google.com>,
"James Morris" <jmorris@namei.org>,
"Serge E . Hallyn" <serge@hallyn.com>,
"Casey Schaufler" <casey@schaufler-ca.com>,
"Stephen Smalley" <stephen.smalley.work@gmail.com>,
"Ondrej Mosnacek" <omosnace@redhat.com>,
"Mimi Zohar" <zohar@linux.ibm.com>,
"Roberto Sassu" <roberto.sassu@huawei.com>,
"Dmitry Kasatkin" <dmitry.kasatkin@gmail.com>,
"Eric Snowberg" <eric.snowberg@oracle.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>,
"Jan Kara" <jack@suse.cz>, "Shuah Khan" <shuah@kernel.org>,
<bpf@vger.kernel.org>, <linux-security-module@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>,
<linux-integrity@vger.kernel.org>, <selinux@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 bpf-next 3/4] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling
Date: Fri, 31 Jul 2026 20:18:03 +0200 [thread overview]
Message-ID: <DKCYOLBUWJBZ.1N8JAXJ3QJYCE@gmail.com> (raw)
In-Reply-To: <CAHC9VhRQWRKHi-hdtvSnYPD_dqgP7Q8RB_X4PEDLwPUe6EegYA@mail.gmail.com>
On Fri Jul 31, 2026 at 6:59 PM CEST, Paul Moore wrote:
> On Fri, Jul 31, 2026 at 12:32 PM Kumar Kartikeya Dwivedi
> <memxor@gmail.com> wrote:
>> On Fri Jul 31, 2026 at 6:02 PM CEST, Paul Moore wrote:
>> > On Fri, Jul 31, 2026 at 11:44 AM Kumar Kartikeya Dwivedi
>> > <memxor@gmail.com> wrote:
>> >> On Fri Jul 31, 2026 at 5:30 PM CEST, David Windsor wrote:
>> >> > On Fri, Jul 31, 2026 at 11:17 AM Paul Moore <paul@paul-moore.com> wrote:
>> >> >>
>> >> >>
>> >> >> Okay, it looks like there was some confusion/misunderstanding.
>> >> >>
>> >> >> My understanding of Kumar's comments was that he was referring to the
>> >> >> exisiting LSM related kfuncs that are located in fs/bpf_fs_kfuncs.c,
>> >> >> not necessarily the new kfunc you are proposing in this patchset.
>> >> >> Kumar is welcome to correct either one or both of us, if we read that
>> >> >> wrong :)
>> >> >>
>> >> >
>> >> > Yes, after another reading, that does appear to be the case =).
>> >> >
>> >> > We'll need v7 anyway to fix the ocfs-related UAF the bot found.
>> >> >
>> >>
>> >> Since there is confusion, let me clear it up.
>> >>
>> >> I meant it for all of them. I don't think it makes sense to keep this one in
>> >> security/ when others are in fs/bpf_fs_kfuncs.c. That confusing limbo state is
>> >> worse than just placing it where others already are.
>> >>
>> >> As I already said, the discussion around whether all of them they should go in
>> >> security/ is orthogonal and should be done separately; it isn't productive to
>> >> repeatedly bring it up in the context of this patch set.
>> >>
>> >> I honestly don't get the urgency; it will be a mechanical change if we need to
>> >> make such changes. The worst outcome would be stalling David's work over it.
>> >>
>> >> As for landing this stuff, we can let Paul take the patches touching security/
>> >> and route the rest (3-4) through bpf-next after the merge window. We need them
>> >> to go through BPF CI anyway to ensure nothing breaks.
>> >
>> > Some existing LSM kfuncs are located in the wrong files. I'm not
>> > suggesting that David needs to fix the existing problems, but there is
>> > no reason to keep making the same mistakes. The new LSM kfunc must go
>> > in security/bpf_lsm_kfuncs.c; if that isn't acceptable to the BPF
>> > developers then David will need to find a new way that doesn't involve
>> > kfuncs.
>>
>> What "mistakes"? Really? It's just code organization bureaucracy. Calling it a
>> mistake is just blowing things out of proportion.
>
> :D
>
> You've no doubt seen the challenging interactions between some of the
> BPF and LSM developers over the past several years. A recent BPF LSM
> bug/vulnerability as well as these interactions between the BPF/LSM
> devs, has caused me to take a much closer look at how things have been
> done regarding the BPF LSM and there are a number of things that
> should be addressed. Not all of those things will be addressed now,
> but I won't support patches that continue to do things the wrong way
> because I currently have very little faith in our ability to correct
> them later.
I am not sure whether you shared whatever concerns you are talking about. If
they are valid, we would be happy to engage and resolve them.
I am aware of the past discussions, but we did spend additional effort to find a
way that worked well for everyone in the end.
> I do hope that at some time in the future we can reach a
> point where there is more cooperation between the two communities, but
> given the recent difficulties over even the small things, we are not
> there yet.
>
I think it takes two hands to clap.
So far, I have tried to engage constructively, and offered to discuss where
these kfuncs collectively should stay in a separate discussion. Explained why it
cannot be done unilaterally, and that we need consensus from all stakeholders
(FS, BPF, LSM). Explained that we need to figure out how the testing strategy
for such cross-cutting changes would work if they don't go through BPF tree.
In response, I have only seen you continually tried to derail the whole thing
over the location of the kfunc, threatening to not let it move forward.
Yes, I understand you feel it should be placed under security/. You are entitled
to your opinion.
No, I do not think the newly added kfunc is a big enough layering violation such
that we need to do it ASAP, disregarding everything else outlined above. I am
sure you see that too. There are several other instances of similar kfuncs.
Therefore, please attempt to meet me halfway here.
It is calling a single security_lsmxattr_add() kfunc cleanly abstracted and
already placed under security/, where it belongs.
>> I don't think you can simply decide this unilaterally either. Do you take full
>> responsibility that kfuncs going there won't introduce BPF side regressions? Who
>> makes sure patches touching the new location run through BPF CI? All of this
>> needs to be thought through before we decide upon anything.
>
> I would expect, and require, that patch submitters perform the
> necessary testing for the patches they submit; this is no different
> from any other patch today that is submitted for the LSM framework.
It doesn't scale. The amount of combinations (architectures x compilers x modes)
that need to be tested for the BPF subsystem is beyond reasonable for any patch
submitter to test themselves. The only realistic approach is letting it go
through BPF CI and exercising the full matrix on submission.
It is fairly apparent to me that you do not have a clear picture how BPF code
gets tested (which is fine and understandable).
It only underscores my point: we need to move this discussion elsewhere, and
have a broader dialogue and form consensus. Not litigate over it in this thread.
David spent considerable effort on this set, and has carefully reworked his code
several times. Blocking his work over this terriotrial argument would be a loss
for everyone, including the users of the kernel.
Anyhow, I cannot stop you, but it would be unfortunate if you continue to double
down, in that case we'll have to figure out other ways of moving things forward.
> [...]
next prev parent reply other threads:[~2026-07-31 18:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 23:45 [PATCH v6 bpf-next 0/4] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling David Windsor
2026-07-30 23:45 ` [PATCH v6 bpf-next 1/4] security: introduce struct lsm_xattrs David Windsor
2026-07-30 23:45 ` [PATCH v6 bpf-next 2/4] security: add security_lsmxattr_add() David Windsor
2026-07-30 23:45 ` [PATCH v6 bpf-next 3/4] bpf: add bpf_init_inode_xattr kfunc for atomic inode labeling David Windsor
2026-07-30 23:53 ` Paul Moore
2026-07-31 0:01 ` David Windsor
2026-07-31 15:17 ` Paul Moore
2026-07-31 15:30 ` David Windsor
2026-07-31 15:33 ` Paul Moore
2026-07-31 15:36 ` David Windsor
2026-07-31 15:44 ` Kumar Kartikeya Dwivedi
2026-07-31 16:02 ` Paul Moore
2026-07-31 16:32 ` Kumar Kartikeya Dwivedi
2026-07-31 16:59 ` Paul Moore
2026-07-31 18:18 ` Kumar Kartikeya Dwivedi [this message]
2026-07-31 18:42 ` Paul Moore
2026-07-31 18:50 ` Kumar Kartikeya Dwivedi
2026-07-31 19:05 ` Paul Moore
2026-07-31 19:20 ` Kumar Kartikeya Dwivedi
2026-07-31 20:01 ` Paul Moore
2026-07-31 20:07 ` Paul Moore
2026-07-31 20:16 ` Kumar Kartikeya Dwivedi
2026-07-31 20:48 ` Paul Moore
2026-07-30 23:45 ` [PATCH v6 bpf-next 4/4] selftests/bpf: add tests for bpf_init_inode_xattr kfunc 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=DKCYOLBUWJBZ.1N8JAXJ3QJYCE@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=casey@schaufler-ca.com \
--cc=daniel@iogearbox.net \
--cc=dmitry.kasatkin@gmail.com \
--cc=dwindsor@gmail.com \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=eric.snowberg@oracle.com \
--cc=jack@suse.cz \
--cc=jmorris@namei.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mattbobrowski@google.com \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=roberto.sassu@huawei.com \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=stephen.smalley.work@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yonghong.song@linux.dev \
--cc=zohar@linux.ibm.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