[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56339D6E-6435-4BC4-95AC-BC2404DFF2F4@meta.com>
Date: Fri, 11 Jul 2025 23:09:54 +0000
From: Song Liu <songliubraving@...a.com>
To: Christian Brauner <brauner@...nel.org>
CC: Paul Moore <paul@...l-moore.com>, Al Viro <viro@...iv.linux.org.uk>,
Song
Liu <song@...nel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"apparmor@...ts.ubuntu.com"
<apparmor@...ts.ubuntu.com>,
"selinux@...r.kernel.org"
<selinux@...r.kernel.org>,
"tomoyo-users_en@...ts.sourceforge.net"
<tomoyo-users_en@...ts.sourceforge.net>,
"tomoyo-users_ja@...ts.sourceforge.net"
<tomoyo-users_ja@...ts.sourceforge.net>,
Kernel Team <kernel-team@...a.com>,
"andrii@...nel.org" <andrii@...nel.org>,
"eddyz87@...il.com"
<eddyz87@...il.com>,
"ast@...nel.org" <ast@...nel.org>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"martin.lau@...ux.dev"
<martin.lau@...ux.dev>,
"jack@...e.cz" <jack@...e.cz>,
"kpsingh@...nel.org"
<kpsingh@...nel.org>,
"mattbobrowski@...gle.com" <mattbobrowski@...gle.com>,
"amir73il@...il.com" <amir73il@...il.com>,
"repnop@...gle.com"
<repnop@...gle.com>,
"jlayton@...nel.org" <jlayton@...nel.org>,
"josef@...icpanda.com" <josef@...icpanda.com>,
"mic@...ikod.net"
<mic@...ikod.net>,
"gnoack@...gle.com" <gnoack@...gle.com>,
"m@...wtm.org"
<m@...wtm.org>,
"john.johansen@...onical.com" <john.johansen@...onical.com>,
"john@...armor.net" <john@...armor.net>,
"stephen.smalley.work@...il.com"
<stephen.smalley.work@...il.com>,
"omosnace@...hat.com"
<omosnace@...hat.com>,
"takedakn@...data.co.jp" <takedakn@...data.co.jp>,
"penguin-kernel@...ove.sakura.ne.jp" <penguin-kernel@...ove.sakura.ne.jp>,
"enlightened@...omium.org" <enlightened@...omium.org>
Subject: Re: [RFC] vfs: security: Parse dev_name before calling
security_sb_mount
> On Jul 11, 2025, at 2:36 AM, Christian Brauner <brauner@...nel.org> wrote:
>
> On Thu, Jul 10, 2025 at 05:00:18PM +0000, Song Liu wrote:
>>
>>
>>> On Jul 10, 2025, at 4:46 AM, Christian Brauner <brauner@...nel.org> wrote:
>>
>> [...]
>>
>>>> Right now, we have security_sb_mount and security_move_mount, for
>>>> syscall “mount” and “move_mount” respectively. This is confusing
>>>> because we can also do move mount with syscall “mount”. How about
>>>> we create 5 different security hooks:
>>>>
>>>> security_bind_mount
>>>> security_new_mount
>>>> security_reconfigure_mount
>>>> security_remount
>>>> security_change_type_mount
>>>>
>>>> and remove security_sb_mount. After this, we will have 6 hooks for
>>>> each type of mount (the 5 above plus security_move_mount).
>>>
>>> I've multiple times pointed out that the current mount security hooks
>>> aren't working and basically everything in the new mount api is
>>> unsupervised from an LSM perspective.
>>
>> To make sure I understand the comment. By “new mount api”, do you mean
>> the code path under do_new_mount()?
>
> fsopen()
> fsconfig()
> fsmount()
> open_tree()
> open_tree_attr()
> move_mount()
> statmount()
> listmount()
>
> I think that's all.
Reading the code, I think we also need to cover fspick.
Thanks,
Song
Powered by blists - more mailing lists