[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100301222716.GC29531@one.firstfloor.org>
Date: Mon, 1 Mar 2010 23:27:16 +0100
From: Andi Kleen <andi@...stfloor.org>
To: Arjan van de Ven <arjan@...radead.org>
Cc: Roel Kluin <roel.kluin@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Mikael Pettersson <mikpe@...uu.se>, penberg@...helsinki.fi,
Brian Gerst <brgerst@...il.com>, andi@...stfloor.org,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-crypto@...r.kernel.org, Herbert@...dor.apana.org.au
Subject: Re: [PATCH v1] compiler: prevent dead store elimination
On Sun, Feb 28, 2010 at 09:15:11PM -0800, Arjan van de Ven wrote:
> On Sat, 27 Feb 2010 21:47:42 +0100
> Roel Kluin <roel.kluin@...il.com> wrote:
> > +void secure_bzero(void *p, size_t n)
> > +{
> > + memset(p, 0, n);
> > + ARRAY_PREVENT_DSE(p, n);
> > +}
> > +EXPORT_SYMBOL(secure_bzero);
>
>
> please don't introduce bzero again to the kernel;
>
> make it secure_memset() please.
Would there ever be any reason to set the key to something
else than 0?
IMHO bzero is less error prone. With memset there are regular
bugs when the two end arguments get exchanged.
You could call it differently if you have a problem with old BSD
names, but inherently there's nothing wrong with them. One possibility
would be the same name as VC++ uses.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists