diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2024-09-01 19:40:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2024-09-13 17:28:35 +0200 |
commit | bb10ffe01bf2d2436190958c7eae694515e1ebb7 (patch) | |
tree | 65b72a5b0fc68b7e8417f96defa37541b2a8be9b /arch | |
parent | ecb8bd70d51ccf9009219a6097cef293deada65b (diff) |
selftests: vDSO: also test counter in vdso_test_chacha
The chacha vDSO selftest doesn't check the way the counter is handled by
__arch_chacha20_blocks_nostack(). It indirectly checks that the counter
is writen on exit and read back on new entry, but it doesn't check that
the format is correct. When implementing this function on powerpc, I
missed a case where the counter was writen and read in wrong byte order.
Also, the counter uses two words, but the tests with a zero counter and
uses a small amount of blocks, so at the end the upper part of the
counter is always 0, so it is not checked.
Add a verification of counter's content in addition to the verification
of the output.
Also add two tests where the counter crosses the u32 upper limit. The
first test verifies that the function properly writes back the upper
word, the second test verifies that the function properly reads back the
upper word.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions