[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7419 [Tor]: Choose a faster memwipe implementation
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs