Re: incoming

From: Kees Cook
Date: Fri Sep 10 2021 - 16:13:34 EST


On Fri, Sep 10, 2021 at 10:11:53AM -0700, Kees Cook wrote:
> On Thu, Sep 09, 2021 at 08:09:48PM -0700, Andrew Morton wrote:
> >
> > More post linux-next material.
> >
> > 9 patches, based on f154c806676ad7153c6e161f30c53a44855329d6.
> >
> > Subsystems affected by this patch series:
> >
> > mm/slab-generic
> > rapidio
> > mm/debug
> >
> > Subsystem: mm/slab-generic
> >
> > "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>:
> > mm: move kvmalloc-related functions to slab.h
> >
> > Subsystem: rapidio
> >
> > Kees Cook <keescook@xxxxxxxxxxxx>:
> > rapidio: avoid bogus __alloc_size warning
> >
> > Subsystem: mm/debug
> >
> > Kees Cook <keescook@xxxxxxxxxxxx>:
> > Patch series "Add __alloc_size() for better bounds checking", v2:
> > Compiler Attributes: add __alloc_size() for better bounds checking
> > checkpatch: add __alloc_size() to known $Attribute
> > slab: clean up function declarations
> > slab: add __alloc_size attributes for better bounds checking
> > mm/page_alloc: add __alloc_size attributes for better bounds checking
> > percpu: add __alloc_size attributes for better bounds checking
> > mm/vmalloc: add __alloc_size attributes for better bounds checking
>
> Hi,
>
> FYI, in overnight build testing I found yet another corner case in
> GCC's handling of the __alloc_size attribute. It's the gift that keeps
> on giving. The fix is here:
>
> https://lore.kernel.org/lkml/20210910165851.3296624-1-keescook@xxxxxxxxxxxx/

I'm so glad it's Friday. Here's the v2 fix... *sigh*

https://lore.kernel.org/lkml/20210910201132.3809437-1-keescook@xxxxxxxxxxxx/

-Kees

>
> >
> > Makefile | 15 +++
> > drivers/of/kexec.c | 1
> > drivers/rapidio/devices/rio_mport_cdev.c | 9 +-
> > include/linux/compiler_attributes.h | 6 +
> > include/linux/gfp.h | 2
> > include/linux/mm.h | 34 --------
> > include/linux/percpu.h | 3
> > include/linux/slab.h | 122 ++++++++++++++++++++++---------
> > include/linux/vmalloc.h | 11 ++
> > scripts/checkpatch.pl | 3
> > 10 files changed, 132 insertions(+), 74 deletions(-)
> >
>
> --
> Kees Cook

--
Kees Cook