[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1710181531130.15834@hadrien>
Date: Wed, 18 Oct 2017 15:32:00 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: David Laight <David.Laight@...LAB.COM>
cc: 'SF Markus Elfring' <elfring@...rs.sourceforge.net>,
Joe Perches <joe@...ches.com>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Stefan Berger <stefanb@...ux.vnet.ibm.com>,
Alexander Steffen <Alexander.Steffen@...ineon.com>,
Nayna Jain <nayna@...ux.vnet.ibm.com>,
Jerry Snitselaar <jsnitsel@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Julia Lawall <julia.lawall@...6.fr>,
Corentin Labbe <clabbe.montjoie@...il.com>,
Kenneth Goldman <kgold@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Peter Hüwe <PeterHuewe@....de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: RE: Adjusting further size determinations?
On Wed, 18 Oct 2017, David Laight wrote:
> From: SF Markus Elfring
> > >>>> Unpleasant consequences are possible in both cases.
> > >> How much do you care to reduce the failure probability further?
> > >
> > > Zero.
> >
> > I am interested to improve the software situation a bit more here.
>
> There are probably better places to spend your time!
>
> If you want 'security' for kmalloc() then:
>
> #define KMALLOC_TYPE(flags) (type *)kmalloc(sizeof (type), flags)
> #define KMALLOC(ptr, flags) *(ptr) = KMALLOC_TYPE(typeof *(ptr), flags)
>
> and change:
> ptr = kmalloc(sizeof *ptr, flags);
> to:
> KMALLOC(&ptr, flags);
>
> But it is all churn for churn's sake.
Please don't. Coccinelle won't find real problems with kmalloc any more
if this is done.
julia
Powered by blists - more mailing lists