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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200912010450.nB14oDPc030851@agora.fsl.cs.sunysb.edu>
Date:	Mon, 30 Nov 2009 23:50:13 -0500
From:	Erez Zadok <ezk@...sunysb.edu>
To:	Valerie Aurora <vaurora@...hat.com>
Cc:	Jan Blunck <jblunck@...e.de>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	Andy Whitcroft <apw@...onical.com>,
	Scott James Remnant <scott@...onical.com>,
	Sandu Popa Marius <sandupopamarius@...il.com>,
	Jan Rekorajski <baggins@...h.mimuw.edu.pl>,
	"J. R. Okajima" <hooanon05@...oo.co.jp>,
	Arnd Bergmann <arnd@...db.de>,
	Vladimir Dronnikov <dronnikov@...il.com>,
	Felix Fietkau <nbd@...nwrt.org>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 40/41] union-mount: Make truncate work in all its glorious UNIX variations 

In message <1256152779-10054-41-git-send-email-vaurora@...hat.com>, Valerie Aurora writes:
> Implement truncate(), ftruncate(), and open(O_TRUNC) for union mounts.
> 
> This moves the union_copyup() in do_filp_open() down below may_open()
> - this way you don't copy up a file you don't even have permission to
> open.
> 
> may_open() now takes a nameidata * because it may have to do a
> union_copyup() internally if O_TRUNC is specified.  It's a trivial
> change, all callers were just doing "may_open(&nd.path, ...)" anyway.
> It kinda sucks, but may_open() auto-magically doing a truncate also
> sucks (may open? may truncate, too!).

Hmmm, perhaps may_open needs to be renamed then? (may_rename_and_truncate?)

> XXX - Only copy up the bytes that won't be truncated.
> XXX - Re-organize code. may_open() especially blah.
> XXX - truncate() implemented as in-kernel file open and ftruncate()
> XXX - Split up into smaller pieces
[...]

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