owner-freebsd-hack...@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-unsubscr...@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

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to