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:	Wed, 15 Jan 2014 18:31:50 -0500
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux-Fsdevel <linux-fsdevel@...r.kernel.org>,
	Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Zach Brown <zab@...hat.com>, Jan Kara <jack@...e.cz>,
	Andy Lutomirski <luto@...capital.net>,
	"mszeredi@...e.cz" <mszeredi@...e.cz>
Subject: Re: [PATCH 05/11] vfs: add RENAME_NOREPLACE flag

On Wed, Jan 15, 2014 at 07:35:04PM +0100, Miklos Szeredi wrote:
> On Wed, Jan 15, 2014 at 7:19 PM, J. Bruce Fields <bfields@...ldses.org> wrote:
> > On Wed, Jan 08, 2014 at 11:10:09PM +0100, Miklos Szeredi wrote:
> >> From: Miklos Szeredi <mszeredi@...e.cz>
> >>
> >> If this flag is specified and the target of the rename exists then the
> >> rename syscall fails with EEXIST.
> >
> > Why is this useful?
> >
> > (I'm sure it is, it'd just be useful to have the reasons recorded
> > someplace.)
> >
> >> The VFS does the existence checking, so it is trivial to enable for most
> >> local filesystems.  This patch only enables it in ext4.
> >>
> >> For network filesystems the VFS check is not enough as there may be a race
> >> between a remote create and the rename, so these filesystems need to handle
> >> this flag in their ->rename() implementations to ensure atomicity.
> >
> > Till that's done this should probably result in -EOPNOTSUPP on those
> > filesystems?
> >
> > I think this would need new protocol in the NFS case.
> 
> Yes, it needs to be enabled on a case-by-case basis.

Oh, right, I missed all those

	if (flags)
		return -EOPNOTSUPP;

added with "vfs: add renameat2 syscall".  Apologies.

> Only enabled for
> ext4 now, but trivial to do for most fs.

Got it, thanks!

--b.
--
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