Date: Mon, 8 Mar 2010 08:54:40 -0500 From: Andrew Duane <aduane@juniper.net> To: Patrick Lamaiziere <patfbsd@davenulle.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: RE: Dead store elimination in the kernel? Message-ID: <AC6674AB7BC78549BB231821ABF7A9AE9037B67A37@EMBX01-WF.jnpr.net> In-Reply-To: <20100307232146.6b57f610@davenulle.org> References: <20100307232146.6b57f610@davenulle.org>
next in thread | previous in thread | raw e-mail | index | archive | help
owner-freebsd-hackers@freebsd.org wrote: > Hello, > > I'm asking if FreeBSD is safe regarding dead store elimination made > by gcc? > > By example, in crypto drivers, sensitive datas are cleared by a > bzero() after use to avoid potential leakages. But the bzero() by > itself is useless, is it removed by gcc? > > Thanks, regards. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" I would think the "correct" way to handle this is to make sure all appropriate items are declared volatile. This would eliminate dead store elimination, as the compiler can tell they are not dead. Unfortunately, the history of drivers (or any code) correctly using volatile declarations is intermittent at best. /Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC6674AB7BC78549BB231821ABF7A9AE9037B67A37>
