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
| ||
|
Date: Fri, 08 May 2020 15:39:48 +0100 From: David Howells <dhowells@...hat.com> To: unlisted-recipients:; (no To-header on input) Cc: dhowells@...hat.com, Matthew Wilcox <willy@...radead.org>, Trond Myklebust <trondmy@...merspace.com>, Anna Schumaker <anna.schumaker@...app.com>, Steve French <sfrench@...ba.org>, Jeff Layton <jlayton@...hat.com>, Alexander Viro <viro@...iv.linux.org.uk>, linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org, ceph-devel@...r.kernel.org, v9fs-developer@...ts.sourceforge.net, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [RFC PATCH 54/61] afs: Wait on PG_fscache before modifying/releasing a page David Howells <dhowells@...hat.com> wrote: > ITER_MAPPING relies on the mapping to maintain the pointers to the pages so > that it can find them rather than being like ITER_BVEC where there's a > separate list. > > Truncate removes the pages from the mapping - at which point ITER_MAPPING can > no longer find them. It looks like ITER_MAPPING is fine with truncate, provided the invalidation waits for the iterator to complete first: int truncate_inode_page(struct address_space *mapping, struct page *page) { VM_BUG_ON_PAGE(PageTail(page), page); if (page->mapping != mapping) return -EIO; truncate_cleanup_page(mapping, page); delete_from_page_cache(page); return 0; } In which case, ->invalidatepage() needs to wait for PG_fscache. Similarly, it looks like ->releasepage() is fine, provided it waits for PG_fscache also. If I have to use ITER_BVEC, what's the advisability of using vmalloc() to allocate the bio_vec array for a transient op? Such an array can reference up to 1MiB on a 64-bit machine with 4KiB non-compound pages if it only allocates up to a single page. I'm wondering what the teardown cost is, though, if all the corresponding PTEs have to be erased from all CPUs. David
Powered by blists - more mailing lists