|
Message-ID: <CAGXu5jLZ_SVrN6XNSQQFm7W9giD7zh-gmz7Q5HmMnuPMbkES8g@mail.gmail.com> Date: Wed, 10 Jan 2018 12:14:07 -0800 From: Kees Cook <keescook@...omium.org> To: Christopher Lameter <cl@...ux.com> Cc: LKML <linux-kernel@...r.kernel.org>, David Windsor <dave@...lcore.net>, Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton <akpm@...ux-foundation.org>, Laura Abbott <labbott@...hat.com>, Ingo Molnar <mingo@...nel.org>, Mark Rutland <mark.rutland@....com>, Linux-MM <linux-mm@...ck.org>, linux-xfs@...r.kernel.org, Linus Torvalds <torvalds@...ux-foundation.org>, Alexander Viro <viro@...iv.linux.org.uk>, Andy Lutomirski <luto@...nel.org>, Christoph Hellwig <hch@...radead.org>, "David S. Miller" <davem@...emloft.net>, "Martin K. Petersen" <martin.petersen@...cle.com>, Paolo Bonzini <pbonzini@...hat.com>, Christian Borntraeger <borntraeger@...ibm.com>, Christoffer Dall <christoffer.dall@...aro.org>, Dave Kleikamp <dave.kleikamp@...cle.com>, Jan Kara <jack@...e.cz>, Luis de Bethencourt <luisbg@...nel.org>, Marc Zyngier <marc.zyngier@....com>, Rik van Riel <riel@...hat.com>, Matthew Garrett <mjg59@...gle.com>, "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>, linux-arch <linux-arch@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH 05/36] usercopy: WARN() on slab cache usercopy region violations On Wed, Jan 10, 2018 at 10:31 AM, Christopher Lameter <cl@...ux.com> wrote: > On Tue, 9 Jan 2018, Kees Cook wrote: > >> @@ -3823,11 +3825,9 @@ int __check_heap_object(const void *ptr, unsigned long n, struct page *page, > > Could we do the check in mm_slab_common.c for all allocators and just have > a small function in each allocators that give you the metadata needed for > the object? That could be done, but there would still need to be some implementation-specific checks in the per-implementation side (e.g. red-zone, etc). I'll work up a patch and see if it's less ugly than what I've currently got. :) >> + * carefully audit the whitelist range). >> + */ >> int report_usercopy(const char *name, const char *detail, bool to_user, >> unsigned long offset, unsigned long len) >> { > > Should this not be added earlier? This seemed like the best place to add this since it's where the WARN is being added, so it's a bit more help for anyone looking at the code. -Kees -- Kees Cook Pixel Security
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.