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] [day] [month] [year] [list]
Date:   Wed, 12 Jul 2023 22:54:33 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "Darrick J. Wong" <djwong@...nel.org>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Carlos Maiolino <cem@...nel.org>,
        Dave Chinner <david@...morbit.com>,
        Jeff Layton <jlayton@...nel.org>,
        Eric Biggers <ebiggers@...nel.org>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        linux-xfs@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] libxfs: Redefine 1-element arrays as flexible arrays

On Wed, Jul 12, 2023 at 10:44:50PM -0700, Darrick J. Wong wrote:
> /*
>  * List the names and sizes of the values of all the attributes of an object.
>  * "Cursor" must be allocated and zeroed before the first call, it is used
>  * to maintain context between system calls if all the attribute names won't
>  * fit into the buffer on the first system call.
>  * The return value is -1 on error (w/errno set appropriately), 0 on success.
>  */
> extern int attr_list(const char *__path, char *__buffer, const int __buffersize,
> 		int __flags, attrlist_cursor_t *__cursor)
> 	__attribute__ ((deprecated ("Use listxattr or llistxattr instead")));
> extern int attr_listf(int __fd, char *__buffer, const int __buffersize,
> 		int __flags, attrlist_cursor_t *__cursor)
> 	__attribute__ ((deprecated ("Use flistxattr instead")));
> 
> I take that as a sign that they could drop all these xfs-specific APIs
> one day, which means we ought to keep them in xfs_fs.h.

Well...

These APIs you quoted are in fact internally mapped to the normal
xattr syscalls by libattr, and have been since the Linux xattr syscalls
were created.  The only thing that actually uses the definitions in
Linux is the magic attrlist by handle ioctl that exists only in
XFS and which is exported through libhandle in xfsprogs.  But the
libhandle API is based on the attrlist_cursor from libattr and
doesn't use the xfs_ kernel definitions.

(that struct attrlist/attrlist_ent in libattr have the same 1-sized
array problem, but fortunately we don't need to solve that here..)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ