diff options
author | Samuel Neves <sneves@dei.uc.pt> | 2017-11-22 16:58:04 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-22 18:32:48 +0100 |
commit | 79d808f64f34c9992cf20ad057bf90f13b033600 (patch) | |
tree | efab7dc85dd820e0a95bf1fa0b5ef41344d4d4fa /src/compat | |
parent | 741f76cdb3f321edce92a316501fe54f52d87ba1 (diff) |
poly1305-x86_64: unclobber %rbp
OpenSSL's Poly1305 kernels use %rbp as a scratch register. However, the kernel
expects rbp to be a valid frame pointer at any given time in order to do
proper unwinding. Thus we need to alter the code in order to preserve it.
The most straightforward manner in which this was accomplished was by replacing
$d3 in poly1305-x86_64.pl -- formerly %r10 -- by %rdi, and replace %rbp by %r10.
Because %rdi, a pointer to the context structure, does not change and is not used
by poly1305_iteration, it is safe to use it here, and the overhead of saving and
restoring it should be minimal.
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
0 files changed, 0 insertions, 0 deletions