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: <49FD47D0.2070802@msgid.tls.msk.ru>
Date:	Sun, 03 May 2009 11:29:20 +0400
From:	Michael Tokarev <mjt@....msk.ru>
To:	Alan Jenkins <sourcejedi.lkml@...glemail.com>
CC:	Kay Sievers <kay.sievers@...y.org>,
	Christoph Hellwig <hch@...radead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>, Jan Blunck <jblunck@...e.de>,
	linux-arch@...r.kernel.org, viro@...iv.linux.org.uk,
	torvalds@...l.org, akpm@...l.org, adam@...drasil.com
Subject: Re: [PATCH] driver-core: devtmpfs - driver core maintained /dev tmpfs

Alan Jenkins wrote:
> On 5/2/09, Kay Sievers <kay.sievers@...y.org> wrote:
[]
>>> And it
>>> gives a nice clean way for new initramfs' to test for this feature -
>>> when they try to mount it, it fails.  It would seem to make for a
>>> rather smoother migration path.
>> I think that is all covered just fine.
> 
> Oh, I see.
> 
> grep "/dev" /proc/mounts > /dev/null

Oh no.  This one will match all your /dev/sda1 etc too :)
What yo want to do is either

   grep -w /dev /proc/mount

or

  awk '$2 == "/dev" { exit 0; } END { exit 1; }' /proc/mounts

or something similar.  To distinguish between the following
two cases:

/dev/sda1 / ext3 rw,noatime,data=ordered 0 0
devfs /dev tmpfs rw,nosuid,size=512k,mode=755 0 0

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ