Re: [PATCH 07/12] igb: Proactively round up to kmalloc bucket size

2022-09-22 Thread Kees Cook
On Thu, Sep 22, 2022 at 03:56:54PM +, Ruhl, Michael J wrote: > >From: dri-devel On Behalf Of Kees > >Cook > [...] > >diff --git a/drivers/net/ethernet/intel/igb/igb_main.c > >b/drivers/net/ethernet/intel/igb/igb_main.c > >index 2796e81d2726..4d70ee5b0f79 100644 > >---

RE: [PATCH 07/12] igb: Proactively round up to kmalloc bucket size

2022-09-22 Thread Ruhl, Michael J
>fsde...@vger.kernel.org; Andrew Morton ; >Christian König ; linux-bt...@vger.kernel.org >Subject: [PATCH 07/12] igb: Proactively round up to kmalloc bucket size > >Instead of having a mismatch between the requested allocation size and >the actual kmalloc bucket size, which is ex

[PATCH 07/12] igb: Proactively round up to kmalloc bucket size

2022-09-21 Thread Kees Cook
Instead of having a mismatch between the requested allocation size and the actual kmalloc bucket size, which is examined later via ksize(), round up proactively so the allocation is explicitly made for the full size, allowing the compiler to correctly reason about the resulting size of the buffer