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:	Mon, 14 May 2012 22:42:58 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Tejun Heo <tj@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <axboe@...nel.dk>, NeilBrown <neilb@...e.de>,
	linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] floppy: remove floppy-specific O_EXCL handling

On Mon, 14 May 2012, Tejun Heo wrote:

> > Block layer now handles O_EXCL in a generic way for block devices.
> > 
> > The semantics is however different for floppy and all other block devices,
> > as floppy driver contains its own O_EXCL handling.
> > 
> > The semantics for all-but-floppy bdevs is "there can be at most one O_EXCL 
> > open of this file", while for floppy bdev the semantics is "if someone has 
> > the bdev open with O_EXCL, noone else can open it".
> > 
> > Remove the floppy-specific handling and let the generic bdev code O_EXCL
> > handling take over.
> > 
> > Signed-off-by: Jiri Kosina <jkosina@...e.cz>
> 
> Patch looks good to me 

Thanks.

> but why do we want to change this at this point?

Because since

	commit e525fd89d380c4a94c0d63913a1dd1a593ed25e7
	Author: Tejun Heo <tj@...nel.org>
	Date:   Sat Nov 13 11:55:17 2010 +0100

	    block: make blkdev_get/put() handle exclusive access

mount of /dev/fd0 actually causes the fd0 block device be claimed with 
_EXCL. Before this commit, you are able to mount /dev/fd0 and then open() 
it afterward. After this commit you can't any more, because mounting 
/dev/fd0 already passes O_EXCL to floppy_open(), and thus noone else can 
open(/dev/fd0) any more.

My commit brings things back into shape, i.e. you can, equally to other 
block devices, both mount it and open() it afterwards.

-- 
Jiri Kosina
SUSE Labs
--
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