lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 29 Oct 2022 09:54:15 +0200 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: Kees Cook <keescook@...omium.org> Cc: Rasmus Villemoes <rasmus.villemoes@...vas.dk>, Thomas Gleixner <tglx@...utronix.de>, Jason Gunthorpe <jgg@...pe.ca>, Nishanth Menon <nm@...com>, Michael Kelley <mikelley@...rosoft.com>, Dan Williams <dan.j.williams@...el.com>, Won Chung <wonchung@...gle.com>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org Subject: Re: [PATCH v2] driver core: Add __alloc_size hint to devm allocators On Sat, Oct 29, 2022 at 12:47:34AM -0700, Kees Cook wrote: > Mark the devm_*alloc()-family of allocations with appropriate > __alloc_size()/__realloc_size() hints so the compiler can attempt to > reason about buffer lengths from allocations. > > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org> > Cc: Rasmus Villemoes <rasmus.villemoes@...vas.dk> > Cc: Thomas Gleixner <tglx@...utronix.de> > Cc: Jason Gunthorpe <jgg@...pe.ca> > Cc: Nishanth Menon <nm@...com> > Cc: Michael Kelley <mikelley@...rosoft.com> > Cc: Dan Williams <dan.j.williams@...el.com> > Cc: Won Chung <wonchung@...gle.com> > Signed-off-by: Kees Cook <keescook@...omium.org> > --- > I'm hoping to carry this via the hardening tree so I can add a > KUnit test that depends on it... > v2: use __realloc_size instead of __alloc_size > v1: https://lore.kernel.org/linux-hardening/20221018073430.never.551-kees@kernel.org/ > --- > include/linux/device.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists