From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 25 Jan 2019 11:30:04 -0800 From: Matthew Wilcox Subject: Re: [PATCH] mm: Prevent mapping slab pages to userspace Message-ID: <20190125193004.GA21155@bombadil.infradead.org> References: <20190125173827.2658-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Kees Cook Cc: Andrew Morton , Linux-MM , LKML , Rik van Riel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Kernel Hardening , Michael Ellerman List-ID: On Sat, Jan 26, 2019 at 07:44:40AM +1300, Kees Cook wrote: > > - if (PageAnon(page)) > > + if (PageAnon(page) || PageSlab(page)) > > Are there other types that should not get mapped? (Or better yet, is > there a whitelist of those that are okay to be mapped?) Funny you should ask; I think the next patch in this series looks like this: - if (PageAnon(page) || PageSlab(page)) + if (PageAnon(page) || PageSlab(page) || page_has_type(page)) but let's see if there's something I've overlooked with this patch.