This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] New string function explicit_bzero (from OpenBSD).


On 08/18/2016 10:53 PM, Torvald Riegel wrote:
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.

Yes, I meant an asm statement with a "memory" clobber.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]