lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca81387b31025198808df6c55f411b00d74cb047.camel@kernel.org>
Date: Wed, 20 Mar 2024 16:12:29 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, Chuck
 Lever <chuck.lever@...cle.com>, Alexander Aring <alex.aring@...il.com>,
 Trond Myklebust <trond.myklebust@...merspace.com>, Anna Schumaker
 <anna@...nel.org>, Steve French <sfrench@...ba.org>, Paulo Alcantara
 <pc@...guebit.com>, Ronnie Sahlberg <ronniesahlberg@...il.com>, Shyam
 Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>, Greg
 Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
 <rafael@...nel.org>, David Howells <dhowells@...hat.com>, Tyler Hicks
 <code@...icks.com>,  Neil Brown <neilb@...e.de>, Olga Kornievskaia
 <kolga@...app.com>, Dai Ngo <Dai.Ngo@...cle.com>, Miklos Szeredi
 <miklos@...redi.hu>, Amir Goldstein <amir73il@...il.com>, Namjae Jeon
 <linkinjeon@...nel.org>, Sergey Senozhatsky <senozhatsky@...omium.org>, 
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, linux-fsdevel@...r.kernel.org,
 linux-kernel@...r.kernel.org,  linux-nfs@...r.kernel.org,
 linux-cifs@...r.kernel.org,  samba-technical@...ts.samba.org,
 netfs@...ts.linux.dev, ecryptfs@...r.kernel.org, 
 linux-unionfs@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH RFC 08/24] vfs: make vfs_mknod break delegations on
 parent directory

On Wed, 2024-03-20 at 14:42 +0100, Christian Brauner wrote:
> >  int vfs_mknod(struct mnt_idmap *, struct inode *, struct dentry *,
> > -              umode_t, dev_t);
> > +              umode_t, dev_t, struct inode **);
> 
> So we will have at least the following helpers with an additional
> delegated inode argument.
> 
> vfs_unlink()
> vfs_link()
> notify_change()
> vfs_create()
> vfs_mknod()
> vfs_mkdir()
> vfs_rmdir()
> 
> From looking at callers all these helpers will be called with non-NULL
> delegated inode argument in vfs only. Unless it is generally conceivable
> that other callers will want to pass a non-NULL inode argument over time
> it might make more sense to add vfs_<operation>_delegated() or
> __vfs_<operation>() and make vfs_mknod() and friends exported wrappers
> around it.
> 
> I mean it's a matter of preference ultimately but this seems cleaner to
> me. So at least for the new ones we should consider it. Would also make
> the patch smaller.
> 

Good suggestion. I just respun along those lines and it's a lot cleaner.
I'm still testing it but here is the new diffstat. It's a little larger
actually, but it keeps the changes more confined to namei.c:

jlayton@...ilax:~/git/linux$ git diff master --stat
 fs/locks.c                |  12 +++-
 fs/namei.c                | 227 ++++++++++++++++++++++++++++++++++++++++++++++--------------------
 fs/nfs/delegation.c       |   5 ++
 fs/nfs/dir.c              |  20 ++++++
 fs/nfs/internal.h         |   2 +-
 fs/nfs/nfs4file.c         |   2 +
 fs/nfs/nfs4proc.c         |  62 +++++++++++++++++-
 fs/nfs/nfs4trace.h        | 104 ++++++++++++++++++++++++++++++
 fs/nfs/nfs4xdr.c          | 136 +++++++++++++++++++++++++++++++++++++++
 fs/nfs/nfstrace.h         |   8 ++-
 fs/nfsd/filecache.c       |  37 +++++++++--
 fs/nfsd/filecache.h       |   2 +
 fs/nfsd/nfs4proc.c        |  48 ++++++++++++++
 fs/nfsd/nfs4state.c       | 113 ++++++++++++++++++++++++++++++++-
 fs/nfsd/nfs4xdr.c         |  91 ++++++++++++++++++++++++++-
 fs/nfsd/state.h           |   5 ++
 fs/nfsd/vfs.c             |   5 +-
 fs/nfsd/vfs.h             |   2 +-
 fs/nfsd/xdr4.h            |  19 ++++++
 fs/smb/client/cifsfs.c    |   3 +
 include/linux/filelock.h  |  14 +++++
 include/linux/nfs4.h      |   7 +++
 include/linux/nfs_fs.h    |   1 +
 include/linux/nfs_fs_sb.h |   1 +
 include/linux/nfs_xdr.h   |   2 +
 25 files changed, 838 insertions(+), 90 deletions(-)

-- 
Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ