[tor-bugs] #7419 [Tor]: Choose a faster memwipe implementation
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue May 21 16:06:20 UTC 2013
#7419: Choose a faster memwipe implementation
-------------------------+--------------------------------------------------
Reporter: nickm | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Tor: unspecified
Component: Tor | Version:
Keywords: tor-relay | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by nickm):
The volatile-based thing is actually pretty sure to work, assuming that
the compiler isn't busted. It turns out that it's pretty slow in
practice, though. Another way to use volatile is:
{{{
void * (* volatile memset_volatile)(void *, int, size_t) = memset;
...
memset_volatile(p, c, n);
}}}
(via a NetBSD mailing list at http://netbsd.2816.n7.nabble.com/Adding-
memset-s-function-td43349.html .)
Another option is the memset_s() function added in the the C11 standard.
Other than MS, though, I don't think any of the libcs we use support it
yet.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7419#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list