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: <200712181807.53907.nickpiggin@yahoo.com.au>
Date:	Tue, 18 Dec 2007 18:07:53 +1100
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	David Howells <dhowells@...hat.com>
Cc:	viro@....linux.org.uk, hch@...radead.org,
	Trond.Myklebust@...app.com, sds@...ho.nsa.gov,
	casey@...aufler-ca.com, linux-kernel@...r.kernel.org,
	selinux@...ho.nsa.gov, linux-security-module@...r.kernel.org
Subject: Re: [PATCH 24/28] AFS: Add a function to excise a rejected write from the pagecache [try #2]

On Tuesday 18 December 2007 09:54, David Howells wrote:
> Nick Piggin <nickpiggin@...oo.com.au> wrote:
> > This reintroduces the fault vs truncate race window, which must be fixed.
>
> Hmmm...  perhaps.

What do you mean by perhaps?


> I remember that cropped up in NFS, but I'm doing things 
> a bit differently to NFS.  Remind me again how that worked please.

How what worked? NFS is using invalidate inode pages quite frequently
so it ran into the race more often.


> > Also, it is adding a fair bit of complexity in an area where we should
> > instead be reducing it. I think your filesystem should not be doing
> > writeback caching of dirty data in the cases where it is so problematic
> > (or at least, disallow mmap and read on the dirty data until it has been
> > written back or failed).
>
> Eh?  It's a stateless network filesystem.  There's a gap between writing to
> a file (perhaps though an mmap) and the pagecache pages being written back
> in which someone may change the security on a file and block the writeback.
> There's nothing I can do to prevent it, so I have to instead deal with the
> consequences should they arise.  See the description of patch 25 for
> examples.
>
> So you say I shouldn't do any writeback caching at all?

No, you could do writeback caching but disallow read of dirty data. But
yeah, a coherent mmap isn't possible then, I guess.


> > But otherwise I guess if you really want to discard the dirty data after
> > a failed writeback attempt, what's wrong with just
> > invalidate_inode_pages2?
>
> Erm...  Because it deadlocks?

Why don't you call it after calling end_page_writeback?
--
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