x86: vdso: Wire up getrandom() vDSO implementation
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 18 Nov 2022 16:38:23 +0000 (17:38 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 19 Jul 2024 18:22:12 +0000 (20:22 +0200)
commit33385150ac456f6f95a58647583d0a3887620729
treea1143f237d7f687825935bb496dcb0d39026e6be
parent4ad10a5f5f78a5b3e525a63bd075a4eb1139dde1
x86: vdso: Wire up getrandom() vDSO implementation

Hook up the generic vDSO implementation to the x86 vDSO data page. Since
the existing vDSO infrastructure is heavily based on the timekeeping
functionality, which works over arrays of bases, a new macro is
introduced for vvars that are not arrays.

The vDSO function requires a ChaCha20 implementation that does not write
to the stack, yet can still do an entire ChaCha20 permutation, so
provide this using SSE2, since this is userland code that must work on
all x86-64 processors.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Samuel Neves <sneves@dei.uc.pt> # for vgetrandom-chacha.S
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
MAINTAINERS
arch/x86/Kconfig
arch/x86/entry/vdso/Makefile
arch/x86/entry/vdso/vdso.lds.S
arch/x86/entry/vdso/vgetrandom-chacha.S [new file with mode: 0644]
arch/x86/entry/vdso/vgetrandom.c [new file with mode: 0644]
arch/x86/include/asm/vdso/getrandom.h [new file with mode: 0644]
arch/x86/include/asm/vdso/vsyscall.h
arch/x86/include/asm/vvar.h