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: <20140430141048.GC9213@thunk.org>
Date:	Wed, 30 Apr 2014 10:10:48 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Lukáš Czerner <lczerner@...hat.com>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 6/7] mke2fs: check for pre-existing file system

On Wed, Apr 30, 2014 at 01:50:13PM +0200, Lukáš Czerner wrote:
> > +	/*
> > +	 * We should eventually replace this with a test for the
> > +	 * presence of a partition table.  Unfortunately the blkid
> > +	 * library doesn't test for partition tabels, and checking for
> > +	 * valid GPT and MBR and possibly others isn't quite trivial.
> > +	 */
> 
> That is not true. libblkid definitely can scan for partition or any
> other signature for that matter (lvm, mdraid, ...) and we should
> definitely utilize that.

libblkid scan scan for LVM and mdraid, sure.  But it doesn't scan for
GPT or MBR partition labels:

% dpkg -S /sbin/blkid
util-linux: /sbin/blkid
% fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xae7b6b2b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   167772159    83782656    7  HPFS/NTFS/exFAT
/dev/sda3       167772160   482344959   157286400   83  Linux
/dev/sda4       482344960  1953525167   735590104   8e  Linux LVM

% sudo /sbin/blkid  /dev/sda
%

Ohhh...  this may be debian's fault for having a pre-historic
util-linux.

But anyway, if util-linux does detect partition labels, then this
patch will catch the problem.



							- 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