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] [day] [month] [year] [list]
Message-ID: <6194.1282091256@jrobl>
Date:	Wed, 18 Aug 2010 09:27:36 +0900
From:	"J. R. Okajima" <hooanon05@...oo.co.jp>
To:	Valerie Aurora <vaurora@...hat.com>
Cc:	"J. Bruce Fields" <bfields@...ldses.org>,
	Neil Brown <neilb@...e.de>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Miklos Szeredi <miklos@...redi.hu>,
	Jan Blunck <jblunck@...e.de>,
	Christoph Hellwig <hch@...radead.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: Union mounts and file locks (was Re: [PATCH 14/39] union-mount: Union mounts documentation)


Valerie Aurora:
> Union mounts behaves this way with locks for the same reason as
> fchmod(), etc. on O_RDONLY file descriptors fails.  In-kernel copyup
> only happens before a file descriptor is open.  Once it is open, it is
> very difficult to switch the open file with the newly copied up file
> ("very difficult" meaning "Al Viro refuses to even discuss it").

Laugh, laugh, laugh.
But this is one of the major difference between "union in VFS" and
"union as FS". By the union implemented as FS, the file object will be a
virtual one in a virtual FS, and you can switch two real files on the
layers in the virtual object.


> However, fcntl(F_SETLK) on a file opened read-write will behave
> exactly as expected.  The question is how many applications call
> fcntl(F_SETLK) on a read-only file descriptor as the first lock
> operation on a file?  Of those applications, how many could easily be
> rewritten to open that file descriptor with write permissions?

I don't know.
If users never use such AP or never meet the problem, then there will be
no actual problem.


J. R. Okajima
--
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