diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-01 23:05:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-01 23:05:43 -0700 |
commit | 699871bc943be418be13208526bc613d68017fab (patch) | |
tree | d65e584a1b7d71601a8acfae81262237c402b5e1 /arch/sparc/lib | |
parent | 7cff82f5f42a938a1b633e121a41d29c81de18bb (diff) |
sparc64: Fix bugs in unrolled 256-bit loops.
Some dm-crypt testing revealed several bugs in the 256-bit unrolled
loops.
The DECRYPT_256_2() macro had two errors:
1) Missing reload of KEY registers %f60 and %f62
2) Missing "\" in penultimate line of definition.
In aes_sparc64_ecb_decrypt_256, we were storing the second half of the
encryption result from the wrong source registers.
In aes_sparc64_ctr_crypt_256 we have to be careful when we fall out of
the 32-byte-at-a-time loop and handle a trailing 16-byte chunk. In
that case we've clobbered the final key holding registers and have to
restore them before executing the ENCRYPT_256() macro. Inside of the
32-byte-at-a-time loop things are OK, because we do this key register
restoring during the first few rounds of the ENCRYPT_256_2() macro.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/lib')
0 files changed, 0 insertions, 0 deletions