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: Tue, 16 Mar 2021 23:32:44 +0000 From: Matthew Wilcox <willy@...radead.org> To: David Howells <dhowells@...hat.com> Cc: Trond Myklebust <trondmy@...merspace.com>, Anna Schumaker <anna.schumaker@...app.com>, Steve French <sfrench@...ba.org>, Dominique Martinet <asmadeus@...ewreck.org>, Linus Torvalds <torvalds@...ux-foundation.org>, Christoph Hellwig <hch@....de>, Alexander Viro <viro@...iv.linux.org.uk>, linux-mm@...ck.org, linux-cachefs@...hat.com, 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, Jeff Layton <jlayton@...hat.com>, David Wysochanski <dwysocha@...hat.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH v4 02/28] mm: Add an unlock function for PG_private_2/PG_fscache On Tue, Mar 16, 2021 at 08:38:00PM +0000, David Howells wrote: > Matthew Wilcox <willy@...radead.org> wrote: > > > So ... a page with both flags cleared should have a refcount of N. > > A page with one or both flags set should have a refcount of N+1. > > ... > > How is a poor filesystem supposed to make that true? Also btrfs has this > > problem since it uses private_2 for its own purposes. > > It's simpler if it's N+2 for both patches set. Btw, patch 13 adds that - and > possibly that should be merged into an earlier patch. So ... static inline int page_has_private(struct page *page) { unsigned long flags = page->flags; return ((flags >> PG_private) & 1) + ((flags >> PG_private_2) & 1); } perhaps?
Powered by blists - more mailing lists