selftests/vDSO: don't #include sodium header in chacha test
Subsystems (2)
PATCH 1/1 selftests/vDSO: don't #include sodium header in chacha test
With changes in various kernel headers, there's a clash if we include the libsodium header. This is especially hard to fix with build flags, because we're compiling the assembly together with the C file, for testing. Instead, just add the single library prototype we're using in the file and don't bother including the real header.
Signed-off-by Jason A. Donenfeld <[email protected]>
--- tools/testing/selftests/vDSO/vdso_test_chacha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vDSO/vdso_test_chacha.c +1 -1
@@ -3,13 +3,13 @@* Copyright (C) 2022-2024 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */ -#include <sodium/crypto_stream_chacha20.h> #include <sys/random.h> #include <string.h> #include <stdint.h> #include "../kselftest.h" extern void __arch_chacha20_blocks_nostack (uint8_t *dst_bytes,const uint8_t *key,uint32_t *counter,size_t nblocks); +extern int crypto_stream_chacha20 (uint8_t *dst_bytes,uint64_t dst_len,const uint8_t *nonce,const uint8_t *key);int main (int argc,char *argv[]) {
Signature · 1 line
2.45.2