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: <CAEjxPJ66vErSdqaMkdx8H2xcYXQ1hrscLpkWDSQ906q8c2VTFQ@mail.gmail.com>
Date: Mon, 28 Apr 2025 12:23:17 -0400
From: Stephen Smalley <stephen.smalley.work@...il.com>
To: Casey Schaufler <casey@...aufler-ca.com>
Cc: paul@...l-moore.com, Trond Myklebust <trondmy@...nel.org>, 
	Anna Schumaker <anna@...nel.org>, Alexander Viro <viro@...iv.linux.org.uk>, 
	Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, James Morris <jmorris@...ei.org>, 
	"Serge E. Hallyn" <serge@...lyn.com>, Eric Dumazet <edumazet@...gle.com>, 
	Kuniyuki Iwashima <kuniyu@...zon.com>, Paolo Abeni <pabeni@...hat.com>, 
	Willem de Bruijn <willemb@...gle.com>, "David S. Miller" <davem@...emloft.net>, 
	Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>, 
	Ondrej Mosnacek <omosnace@...hat.com>, linux-nfs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	linux-security-module@...r.kernel.org, netdev@...r.kernel.org, 
	selinux@...r.kernel.org
Subject: Re: [PATCH] security,fs,nfs,net: update security_inode_listsecurity() interface

On Mon, Apr 28, 2025 at 12:17 PM Casey Schaufler <casey@...aufler-ca.com> wrote:
>
> On 4/28/2025 8:55 AM, Stephen Smalley wrote:
> > Update the security_inode_listsecurity() interface to allow
> > use of the xattr_list_one() helper and update the hook
> > implementations.
> >
> > Link: https://lore.kernel.org/selinux/20250424152822.2719-1-stephen.smalley.work@gmail.com/
> >
> > Signed-off-by: Stephen Smalley <stephen.smalley.work@...il.com>
> > ---
> > This patch is relative to the one linked above, which in theory is on
> > vfs.fixes but doesn't appear to have been pushed when I looked.
>
> > diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
> > index bf3bbac4e02a..3c3919dcdebc 100644
> > --- a/include/linux/lsm_hook_defs.h
> > +++ b/include/linux/lsm_hook_defs.h
> > @@ -174,8 +174,8 @@ LSM_HOOK(int, -EOPNOTSUPP, inode_getsecurity, struct mnt_idmap *idmap,
> >        struct inode *inode, const char *name, void **buffer, bool alloc)
> >  LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode,
> >        const char *name, const void *value, size_t size, int flags)
> > -LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer,
> > -      size_t buffer_size)
> > +LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char **buffer,
> > +      ssize_t *remaining_size)
>
> How about "rem", "rsize" or some other name instead of the overly long
> "remaining_size_"?

I don't especially care either way but was just being consistent with
the xattr_list_one() code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ