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 18:43:07 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	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

On Thu, Jul 27, 2006 at 10:33:23AM -0700, H. Peter Anvin wrote:
> Dumb thought: would it make sense to add an O_CAREFUL flag to open(), to 
> disable side effects?  It seems that a number of devices have this issue 
> and one have to jump through weird hoops to configure them.  Obviously, 
> a file descriptor obtained with O_CAREFUL may not be fully functional, 
> at the device driver's option.
> 
> For a conventional file, directory, or block device O_CAREFUL is a 
> no-op.

What about door locking on block devices?  That might be an undesirable
side effect in some circumstances, so you might not want it to be a no-op
on blockdevs.

> For ttys it would typically behave similar to O_NONBLOCK 
> followed immediately by a fcntl to clear the nonblock flag.

What about, eg, raising DTR and RTS ?  You'd want to avoid raising
those if you're not actually going to be using the port.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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