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: <Ytd28d36kwdYWkVZ@magnolia>
Date:   Tue, 19 Jul 2022 20:30:57 -0700
From:   "Darrick J. Wong" <djwong@...nel.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Jeremy Bongio <bongiojp@...il.com>, Ted Tso <tytso@....edu>,
        linux-ext4@...r.kernel.org, linux-api@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v4] Add ioctls to get/set the ext4 superblock uuid.

On Wed, Jul 20, 2022 at 04:18:51AM +0100, Matthew Wilcox wrote:
> On Tue, Jul 19, 2022 at 04:41:31PM -0700, Jeremy Bongio wrote:
> > +/*
> > + * Structure for EXT4_IOC_GETFSUUID/EXT4_IOC_SETFSUUID
> > + */
> > +struct fsuuid {
> > +	__u32       fsu_len;
> > +	__u32       fsu_flags;
> > +	__u8        fsu_uuid[];
> > +};
> 
> A UUID has a defined size (128 bits):
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> Why are we defining flags and len?

@flags because XFS actually need to add a superblock feature bit
(meta_uuid) to change the UUID while the fs is mounted.  That kind of
change can break backwards compatiblity, so we might want to make
*absolutely sure* that the sysadmin is aware of this:

# xfs_io -c 'setfsuuid 42f3d4d6-d5bb-4e91-a187-2ed0f3c080b2 --to-hell-with-backwards-compatibility' /mnt

@len because some filesystems like vfat have volume identifiers that
aren't actually UUIDs (they're u32); some day someone might want to port
vfat to implement at least the GETFSUUID part (they already have
FAT_IOCTL_GET_VOLUME_ID); and given the amount of confusion that results
when buffer lengths are implied (see [GS]ETFSLABEL) I'd rather this pair
of ioctls be explicit about the buffer length now rather than deal with
the fallout of omitting it now and regretting it later.

--D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ