DescriptionAvoid string instructions in x86_64 memset
We want to avoid revealing the sandbox base address in newlib code; memset
currently uses stos, (which leaves the full 64 bits in rdi) and does not clear
it before returning to user code. Instead of just clearing it, we remove
the stos instructions because if we want to implement a validator
check in the future, it will be easier to just ban them.
Also:
* Optimize the unrolled loop for large aligned buffers by using rbp
as a base register.
* Remove non-temporal store instructions (and the fence that separated them
from the subsequent stores).
R=jvoung@chromium.org, mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4088
Committed: https://git.chromium.org/gitweb?p=native_client/nacl-newlib.git;a=commit;h=8c4da477c5348743d900307ce8443da4cc2fcdb8
Patch Set 1 #
Total comments: 2
Patch Set 2 : #Messages
Total messages: 6 (1 generated)
|