# Re: \[PATCH v2 04/10\] mm, kfence: insert KFENCE hooks for SLAB

- From: Christopher Lameter \<hidden\>
- Date: 2020-09-17 09:43:13 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2020/09/6108531
- Thread: https://ratatoskr.run/linux-doc/2020/09/6105579/t.md

```text


On Tue, 15 Sep 2020, Marco Elver wrote:

> @@ -3206,7 +3207,7 @@ static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags,
>  }
>
>  static __always_inline void *
> -slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
> +slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, size_t orig_size,
>  		   unsigned long caller)
>  {

The size of the object is available via a field in kmem_cache. And a
pointer to the current kmem_cache is already passed to the function. Why
is there a need to add an additional parameter?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
