Re: [PATCH v2 05/10] mm, kfence: insert KFENCE hooks for SLUB

From
Alexander Potapenko <glider@google.com>
Date
2020-09-17 09:51:41
Also in
linux-doc, linux-mm, lkml
Reply to
Christopher Lameter, 2020-09-17
On Thu, Sep 17, 2020 at 11:40 AM Christopher Lameter [off-list ref] wrote:
On Tue, 15 Sep 2020, Marco Elver wrote:
quoted
 void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)
 {
-     void *ret = slab_alloc(s, gfpflags, _RET_IP_);
+     void *ret = slab_alloc(s, gfpflags, _RET_IP_, s->object_size);
The additional size parameter is a part of a struct kmem_cache that is
already passed to the function. Why does the parameter list need to be
expanded?
See my response to the similar question about the SLAB allocator:
https://lore.kernel.org/linux-arm-kernel/CAG_fn=XMc8NPZPFtUE=rdoR=XJH4F+TxZs-w5n4VuaWKTjcasw@mail.gmail.com/ (local)



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (21 messages) 21 messages, 6 authors, last reply 2020-09-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help