Re: [PATCH 05/36] usercopy: WARN() on slab cache usercopy region violations

2018-01-10 Thread Kees Cook
On Wed, Jan 10, 2018 at 10:31 AM, Christopher Lameter 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

Re: [PATCH 05/36] usercopy: WARN() on slab cache usercopy region violations

2018-01-10 Thread Christopher Lameter
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

[PATCH 05/36] usercopy: WARN() on slab cache usercopy region violations

2018-01-09 Thread Kees Cook
From: David Windsor This patch adds checking of usercopy cache whitelisting, and is modified from Brad Spengler/PaX Team's PAX_USERCOPY whitelisting code in the last public patch of grsecurity/PaX based on my understanding of the code. Changes or omissions from the original