[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD009ACE3@AcuExch.aculab.com>
Date: Wed, 18 Oct 2017 12:58:43 +0000
From: David Laight <David.Laight@...LAB.COM>
To: '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>
CC: 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?
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.
David
Powered by blists - more mailing lists