Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Przemek Kitszel
On 7/10/24 01:28, Kees Cook wrote: On Tue, Jul 09, 2024 at 11:02:55PM +0200, Marco Elver wrote: On Tue, 9 Jul 2024 at 22:28, Kees Cook wrote: On Tue, Jul 09, 2024 at 10:26:32AM -0700, Christoph Lameter (Ampere) wrote: On Mon, 8 Jul 2024, Kees Cook wrote: obj = kmalloc(obj, gfp

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Kees Cook
On Tue, Jul 09, 2024 at 11:02:55PM +0200, Marco Elver wrote: > On Tue, 9 Jul 2024 at 22:28, Kees Cook wrote: > > > > On Tue, Jul 09, 2024 at 10:26:32AM -0700, Christoph Lameter (Ampere) wrote: > > > On Mon, 8 Jul 2024, Kees Cook wrote: > > > > > > > > > > >obj = kmalloc(obj, gfp); > >

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Marco Elver
On Tue, 9 Jul 2024 at 22:28, Kees Cook wrote: > > On Tue, Jul 09, 2024 at 10:26:32AM -0700, Christoph Lameter (Ampere) wrote: > > On Mon, 8 Jul 2024, Kees Cook wrote: > > > > > > > >obj = kmalloc(obj, gfp); > > > > Could we avoid repeating "obj" in this pattern? > > > > F.e. > > > >

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Kees Cook
On Tue, Jul 09, 2024 at 10:26:32AM -0700, Christoph Lameter (Ampere) wrote: > On Mon, 8 Jul 2024, Kees Cook wrote: > > > > >obj = kmalloc(obj, gfp); > > Could we avoid repeating "obj" in this pattern? > > F.e. > > KMALLOC(obj, gfp); This appears to be the common feedback, wh

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Kees Cook
On Tue, Jul 09, 2024 at 04:57:38PM +, Roman Gushchin wrote: > On Mon, Jul 08, 2024 at 12:18:34PM -0700, Kees Cook wrote: > > Hi, > > > > This is an RFC for some changes I'd like to make to the kernel's > > allocators (starting with slab) that allow for type introspection, which > > has been a

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Christoph Lameter (Ampere)
On Mon, 8 Jul 2024, Kees Cook wrote: obj = kmalloc(obj, gfp); Could we avoid repeating "obj" in this pattern? F.e. KMALLOC(obj, gfp); instead?

Re: [RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-09 Thread Roman Gushchin
On Mon, Jul 08, 2024 at 12:18:34PM -0700, Kees Cook wrote: > Hi, > > This is an RFC for some changes I'd like to make to the kernel's > allocators (starting with slab) that allow for type introspection, which > has been a long-time gap in potential analysis capabilities available > at compile-time

[RFC][PATCH 0/4] slab: Allow for type introspection during allocation

2024-07-08 Thread Kees Cook
Hi, This is an RFC for some changes I'd like to make to the kernel's allocators (starting with slab) that allow for type introspection, which has been a long-time gap in potential analysis capabilities available at compile-time. The changes here are just a "first step" example that updates kmalloc