[linux-cifs] Re: [PATCH] Use memzero_explicit to clear local buffers


  • Previous message:
  • Re: [linux-cifs-client] [PATCH] cifs: hard mount option behaviour implementation
  • Next message:
  • [PATCH RESEND] cifs: use memzero_explicit to clear stack buffer
  • Subject:
  • Re: [PATCH] Use memzero_explicit to clear local buffers
  • From:
  • Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q <at> public.gmane.org>
  • To:
  • Giel van Schijndel <me-sZ9Uef1cvPWHXe+LvDLADg <at> public.gmane.org>
  • Cc:
  • linux-kernel-u79uwXL29TY76Z2rM5mHXA <at> public.gmane.org, "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q <at> public.gmane.org>, Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ <at> public.gmane.org>, Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA <at> public.gmane.org>, "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w <at> public.gmane.org>, "maintainer:X86 ARCHITECTURE..." <x86-DgEjT+Ai2ygdnm+yROfE0A <at> public.gmane.org>, Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r <at> public.gmane.org>, Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg <at> public.gmane.org>, Rahul Bedarkar <rahulbedarkar89-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>, Thomas Pugliese <thomas.pugliese-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>, Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ <at> public.gmane.org>, Julia Lawall <Julia.Lawall-L2FTfq7BK8M <at> public.gmane.org>, "open list:CRYPTO API" <linux-crypto-u79uwXL29TY76Z2rM5mHXA <at> public.gmane.org>, "open list:CERTIFIED WIRELES..." <linux-usb-u79uwXL29TY76Z2rM5mHXA <at> public.gmane.org>, "open list:COMMON INTERNET F..." <linux-cifs-u79uwXL29TY76Z2rM5mHXA <at> public.gmane.org>, "moderated list:COMMON INTERNET F..." <samba-technical-w/Ol4Ecudpl8XjKLYN78aQ <at> public.gmane.org>, Daniel Borkmann <dborkman-H+wXaHxf7aLQT0dZR+AlfA <at> public.gmane.org>
  • Date:
  • 2015-01-06 20:54:54
On Tue, Jan 06, 2015 at 08:42:26PM +0100, Giel van Schijndel wrote:
> 
> Question: are you sure the compiler won't optimize the call to memset(0)
> way if it's immediately followed by kfree()?

Yes it won't be optimised away.  However, you could use kzfree.

> Another actually does change a stack-allocated buffer, I'll split that
> one off right away.

OK.

Thanks,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

This message from: http://www.mailbrowse.com/linux-cifs/10395.html
Previous message: Re: [linux-cifs-client] [PATCH] cifs: hard mount option behaviour implementation
Next message:[PATCH RESEND] cifs: use memzero_explicit to clear stack buffer