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: <20080219112731.GV25098@mit.edu>
Date:	Tue, 19 Feb 2008 06:27:31 -0500
From:	Theodore Tso <tytso@....edu>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH e2fsprogs] - detect LVM2 PVs in libblkid

On Wed, Jan 30, 2008 at 05:25:03PM -0600, Eric Sandeen wrote:
> The anaconda folks are now using blkid instead of hand-rolled
> tests for filesystem type at install time, but they had one
> more request:
> 
> Bugzilla Bug 409321: RFE: information on blkdevs "formatted" as PVs
> https://bugzilla.redhat.com/show_bug.cgi?id=409321
> 
> The attached patch does the right thing for me on my sample
> set of exactly 1 PV...
> 
> Any issues with reporting back something which is not actually
> a filesystem ("lvm2pv") ?
> 
> [root@...t]# misc/blkid -c /dev/null /dev/sda2
> /dev/sda2: UUID="guOQGdcOE3IafCm0190XkPZTy5fCEanQ" TYPE="lvm2pv" 
> [root@...t]# pvs -o pv_name,pv_uuid
>   PV         PV UUID                               
>   /dev/sda2  guOQGd-cOE3-IafC-m019-0XkP-ZTy5-fCEanQ

The patch works for me, but it would seem the right thing would be
print the UUID without the hyphens, i.e.:

        guOQGdcOE3IafCm0190XkPZTy5fCEanQ

instead of

	guOQGd-cOE3-IafC-m019-0XkP-ZTy5-fCEanQ

After all, pvscan prints it with the hyphens, and blkid returns uuid's
with the hyphens for other filesystems as well.  And removing the
hyphens aren't hard; "tr -d -" will do it.

It's not that hard to convert from one to the other; this will do it:

	for (i=0, b=1, p=uuid, q=label->pv_uuid; i <= 32; i++, b = b << 1) {
		if (b & 0x4444440)
			*p++ = '-';
		*p++ = *q++;
	}

This shouldn't screw up the anaconda folks, since they just need to
know the filesystem type, right?  That's all vol_id seems to return in
any case.

						- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ