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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0907051735030.3210@localhost.localdomain>
Date:	Sun, 5 Jul 2009 17:40:25 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ulrich Drepper <drepper@...il.com>
cc:	Miklos Szeredi <miklos@...redi.hu>, dhowells@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	hch@...radead.org, viro@...iv.linux.org.uk, adilger@....com,
	alan@...rguk.ukuu.org.uk, akpm@...ux-foundation.org,
	mtk.manpages@...il.com
Subject: Re: [RFC PATCH] vfs: new open(2) flag to open filesystem node



On Sun, 5 Jul 2009, Ulrich Drepper wrote:
> 
> I am still not sure whether this shouldn't rather be an implementation
> of POSIX's O_SEARCH or whether it is already an O_SEARCH
> implementation.

Umm. That makes no sense at all.

O_SEARCH is only meaningful for directories. For anything else, it's not 
at all POSIX - it's expressly defined to be "undefined".

So clearly, O_SEARCH is absolutely the _wrong_ thing to do. Claiming that 
"it is POSIX" is pure and utter garbage, because it is _not_ POSIX in any 
relevant way. Sure, POSIX allows us to have flying monkeys out of our 
butts when you specify O_SEARCH, but where's the advantage? Undefined 
behavior is undefined behavior. 

It would be clearly and unambiguously _better_ to have another O_xyz flag, 
that people can then do

	#ifdef O_xyz
		.. get some well-defined Linux extension behavior ..
	#endif

in their source code, rather than overlead an undefined case with random 
crap.

			Linus
--
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