On Thu, 2016-08-18 at 20:31 +0200, Florian Weimer wrote:
I don't think we want explicit_bzero to be inlined, it's useful to have
this name in the executable. Furthermore, we might want to add
additional state clearing later, so an implementation in libc.so.6 seems
desirable anyway.
For an implementation in libc, there is currently no different between
the __glibc_read_memory kludge and a full memory barrier, so I suggest
to go with the latter. (The explicit_bzero call will serve as a rather
broad barrier anyway, but we can annotate it with __THROW.)
I suppose we just want a compiler barrier here though, and don't need a
memory barrier in the sense of something that constrains HW reordering.