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]
Date:	Thu, 27 Jul 2006 11:03:42 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Pekka J Enberg <penberg@...Helsinki.FI>,
	Ulrich Drepper <drepper@...il.com>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	akpm@...l.org, viro@...iv.linux.org.uk, tytso@....edu,
	tigran@...itas.com
Subject: Re: O_CAREFUL flag to disable open() side effects

Alan Cox wrote:
> Ar Iau, 2006-07-27 am 10:33 -0700, ysgrifennodd H. Peter Anvin:
>> For a conventional file, directory, or block device O_CAREFUL is a 
>> no-op.  For ttys it would typically behave similar to O_NONBLOCK 
>> followed immediately by a fcntl to clear the nonblock flag.
> 
> Linus long ago suggested O_NONE to go with RO/RW/WO. Its not that hard
> to do with the current file op stuff but you have to work out what the
> access permission semantics of it are and what it means for ioctl etc

O_NONE might be a good thing to do with that, but I think the "careful" 
semantics should be a separate flag (we shouldn't have different side 
effects depending on the individual mode.)

O_NONE would be a useful complement to O_CAREFUL though; for some 
devices O_CAREFUL with anything *other than* O_NONE might be an invalid 
operation.

The semantics would obviously be device dependent, but the basic idea 
should be that opening with O_CAREFUL should not disturb the global 
state of the device; it should only create a handle.

	-hpa

-
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