Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-10-01 Thread Hyeonggon Yoo
On Fri, Sep 23, 2022 at 01:28:07PM -0700, Kees Cook wrote: > The __malloc attribute should not be applied to "realloc" functions, as > the returned pointer may alias the storage of the prior pointer. Instead > of splitting __malloc from __alloc_size, which would be a huge amount of > churn, just cr

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-29 Thread Geert Uytterhoeven
Hi Michael, On Thu, Sep 29, 2022 at 10:36 AM Michael Ellerman wrote: > Kees Cook writes: > > On Wed, Sep 28, 2022 at 09:26:15AM +0200, Geert Uytterhoeven wrote: > >> On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: > >> > The __malloc attribute should not be applied to "realloc" functions, as

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-29 Thread Michael Ellerman
Kees Cook writes: > On Wed, Sep 28, 2022 at 09:26:15AM +0200, Geert Uytterhoeven wrote: >> On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: >> > The __malloc attribute should not be applied to "realloc" functions, as >> > the returned pointer may alias the storage of the prior pointer. Instead >

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-28 Thread Vlastimil Babka
On 9/28/22 19:13, Kees Cook wrote: On Wed, Sep 28, 2022 at 09:26:15AM +0200, Geert Uytterhoeven wrote: Hi Kees, On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: The __malloc attribute should not be applied to "realloc" functions, as the returned pointer may alias the storage of the prior poi

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-28 Thread Kees Cook
On Wed, Sep 28, 2022 at 09:26:15AM +0200, Geert Uytterhoeven wrote: > Hi Kees, > > On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: > > The __malloc attribute should not be applied to "realloc" functions, as > > the returned pointer may alias the storage of the prior pointer. Instead > > of spli

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-28 Thread Vlastimil Babka
On 9/28/22 09:26, Geert Uytterhoeven wrote: Hi Kees, On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: The __malloc attribute should not be applied to "realloc" functions, as the returned pointer may alias the storage of the prior pointer. Instead of splitting __malloc from __alloc_size, which

Re: [PATCH v2 01/16] slab: Remove __malloc attribute from realloc functions

2022-09-28 Thread Geert Uytterhoeven
Hi Kees, On Fri, Sep 23, 2022 at 10:35 PM Kees Cook wrote: > The __malloc attribute should not be applied to "realloc" functions, as > the returned pointer may alias the storage of the prior pointer. Instead > of splitting __malloc from __alloc_size, which would be a huge amount of > churn, just