Linux Security Modules development
 help / color / mirror / Atom feed
From: Daan De Meyer <daan@amutable.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	 linux-security-module@vger.kernel.org
Subject: Re: [PATCH v3 1/2] lsm: expose mount idmaps to inode hooks
Date: Wed, 9 Sep 2026 13:31:42 +0200	[thread overview]
Message-ID: <CAPa8sAgVFXz4ZX-OR3YoRM3cOSqL613NnpWfgsbKiPjViOziBQ@mail.gmail.com> (raw)
In-Reply-To: <CAHC9VhS5q2=6p2bi5c7CZ3mutji1xiKR2eFKgJ9C+XZsYgky2g@mail.gmail.com>

> As long as you are okay with me updating the patch with the change
> above (and explicit on-list email would be good), I can swap in the
> paragraphs when I merge the patch so you don't need to do another
> respin.  However, if you would prefer to do a respin, that's fine too.

I'd be grateful if you could swap in the paragraphs, thank you!

Cheers,

Daan

On Wed, Sep 9, 2026 at 12:05 AM Paul Moore <paul@paul-moore.com> wrote:
>
> On Fri, Sep 4, 2026 at 10:48 AM Daan De Meyer via B4 Relay
> <devnull+daan.amutable.com@kernel.org> wrote:
> >
> > From: Daan De Meyer <daan@amutable.com>
> >
> > Pass the mount idmap through the create, link, symlink, mkdir, mknod,
> > and permission hooks. Update the in-tree security implementations and
> > non-VFS callers accordingly.
> >
> > Signed-off-by: Daan De Meyer <daan@amutable.com>
> > ---
> >  fs/cachefiles/security.c      |  4 +--
> >  fs/namei.c                    | 18 +++++++-------
> >  include/linux/lsm_hook_defs.h | 23 +++++++++--------
> >  include/linux/security.h      | 58 +++++++++++++++++++++++++------------------
> >  security/security.c           | 40 +++++++++++++++++------------
> >  security/selinux/hooks.c      | 19 +++++++++-----
> >  security/smack/smack_lsm.c    |  9 ++++---
> >  7 files changed, 100 insertions(+), 71 deletions(-)
>
> Casey, are you okay with the Smack changes (below)?
>
> > diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> > index 8e88ac65fd7f..a45819d13c0d 100644
> > --- a/security/smack/smack_lsm.c
> > +++ b/security/smack/smack_lsm.c
> > @@ -1089,14 +1089,15 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,
> >
> >  /**
> >   * smack_inode_link - Smack check on link
> > + * @idmap: idmap of the mount
> >   * @old_dentry: the existing object
> >   * @dir: unused
> >   * @new_dentry: the new object
> >   *
> >   * Returns 0 if access is permitted, an error code otherwise
> >   */
> > -static int smack_inode_link(struct dentry *old_dentry, struct inode *dir,
> > -                           struct dentry *new_dentry)
> > +static int smack_inode_link(struct mnt_idmap *idmap, struct dentry *old_dentry,
> > +                           struct inode *dir, struct dentry *new_dentry)
> >  {
> >         struct smack_known *isp;
> >         struct smk_audit_info ad;
> > @@ -1226,6 +1227,7 @@ static int smack_inode_rename(struct inode *old_inode,
> >
> >  /**
> >   * smack_inode_permission - Smack version of permission()
> > + * @idmap: idmap of the mount
> >   * @inode: the inode in question
> >   * @mask: the access requested
> >   *
> > @@ -1233,7 +1235,8 @@ static int smack_inode_rename(struct inode *old_inode,
> >   *
> >   * Returns 0 if access is permitted, an error code otherwise
> >   */
> > -static int smack_inode_permission(struct inode *inode, int mask)
> > +static int smack_inode_permission(struct mnt_idmap *idmap, struct inode *inode,
> > +                                 int mask)
> >  {
> >         struct superblock_smack *sbsp = smack_superblock(inode->i_sb);
> >         struct smk_audit_info ad;
> >
> > --
> > 2.54.0
>
> --
> paul-moore.com

  parent reply	other threads:[~2026-09-09 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 14:48 [PATCH v3 0/2] lsm: expose mount idmaps to inode hooks Daan De Meyer via B4 Relay
2026-09-04 14:48 ` [PATCH v3 1/2] " Daan De Meyer via B4 Relay
2026-09-08 22:05   ` Paul Moore
2026-09-08 22:27     ` Casey Schaufler
2026-09-09 11:31     ` Daan De Meyer [this message]
2026-09-04 14:48 ` [PATCH v3 2/2] selftests/bpf: verify mount idmaps reach " Daan De Meyer via B4 Relay
2026-09-08 22:22   ` Paul Moore
2026-09-08 23:20     ` Matt Bobrowski
2026-09-08 22:04 ` [PATCH v3 0/2] lsm: expose mount idmaps to " Paul Moore
2026-09-09 11:28 ` Christian Brauner

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=CAPa8sAgVFXz4ZX-OR3YoRM3cOSqL613NnpWfgsbKiPjViOziBQ@mail.gmail.com \
    --to=daan@amutable.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --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