selftests/vDSO: add tests for vgetrandom
This adds two tests for vgetrandom. The first one, vdso_test_chacha,
simply checks that the assembly implementation of chacha20 matches that
of libsodium, a basic sanity check that should catch most errors. The
second, vdso_test_getrandom, is a full "libc-like" implementation of the
userspace side of vgetrandom() support. It's meant to be used also as
example code for libcs that might be integrating this.
Cc: linux-kselftest@vger.kernel.org
Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com>
Showing
- tools/include/asm/rwonce.h 0 additions, 0 deletionstools/include/asm/rwonce.h
- tools/testing/selftests/vDSO/.gitignore 2 additions, 0 deletionstools/testing/selftests/vDSO/.gitignore
- tools/testing/selftests/vDSO/Makefile 18 additions, 0 deletionstools/testing/selftests/vDSO/Makefile
- tools/testing/selftests/vDSO/vdso_test_chacha.c 43 additions, 0 deletionstools/testing/selftests/vDSO/vdso_test_chacha.c
- tools/testing/selftests/vDSO/vdso_test_getrandom.c 288 additions, 0 deletionstools/testing/selftests/vDSO/vdso_test_getrandom.c
Please register or sign in to comment