Re: [PATCH 03/12] net: ipa: Proactively round up to kmalloc bucket size

2022-09-22 Thread Kees Cook
On Thu, Sep 22, 2022 at 08:45:19AM -0500, Alex Elder wrote: > On 9/21/22 10:10 PM, Kees Cook wrote: > > Instead of discovering the kmalloc bucket size _after_ allocation, round > > up proactively so the allocation is explicitly made for the full size, > > allowing the compiler to correctly reason a

Re: [PATCH 03/12] net: ipa: Proactively round up to kmalloc bucket size

2022-09-22 Thread Alex Elder
On 9/21/22 10:10 PM, Kees Cook wrote: Instead of discovering the kmalloc bucket size _after_ allocation, 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 through the existing __alloc_size(

[PATCH 03/12] net: ipa: Proactively round up to kmalloc bucket size

2022-09-21 Thread Kees Cook
Instead of discovering the kmalloc bucket size _after_ allocation, 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 through the existing __alloc_size() hint. Cc: Alex Elder Cc: "David S. M