Re: [PATCH v6 4/9] mm, kfence: insert KFENCE hooks for SLAB

2020-10-30 Thread Marco Elver
On Fri, 30 Oct 2020 at 03:49, Jann Horn wrote: > On Thu, Oct 29, 2020 at 2:17 PM Marco Elver wrote: > > Inserts KFENCE hooks into the SLAB allocator. > [...] > > diff --git a/mm/slab.c b/mm/slab.c > [...] > > @@ -3416,6 +3427,11 @@ static void cache_flusharray(struct kmem_cache > > *cachep, stru

Re: [PATCH v6 4/9] mm, kfence: insert KFENCE hooks for SLAB

2020-10-29 Thread Jann Horn
On Thu, Oct 29, 2020 at 2:17 PM Marco Elver wrote: > Inserts KFENCE hooks into the SLAB allocator. [...] > diff --git a/mm/slab.c b/mm/slab.c [...] > @@ -3416,6 +3427,11 @@ static void cache_flusharray(struct kmem_cache > *cachep, struct array_cache *ac) > static __always_inline void __cache_fre

[PATCH v6 4/9] mm, kfence: insert KFENCE hooks for SLAB

2020-10-29 Thread Marco Elver
From: Alexander Potapenko Inserts KFENCE hooks into the SLAB allocator. To pass the originally requested size to KFENCE, add an argument 'orig_size' to slab_alloc*(). The additional argument is required to preserve the requested original size for kmalloc() allocations, which uses size classes (e