Re: [PATCH v8 3/3] x86: vdso: Wire up getrandom() vDSO implementation
From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2022-11-28 19:19:24
Also in:
linux-crypto, linux-patches, lkml
From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2022-11-28 19:19:24
Also in:
linux-crypto, linux-patches, lkml
On Mon, Nov 28, 2022, at 12:18, Jason A. Donenfeld wrote:
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. Also enable the vgetrandom_alloc() syscall, which the vDSO implementation relies on. 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: Samuel Neves <redacted> # for vgetrandom-chacha.S Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- arch/x86/Kconfig | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 +
I see that this enables the syscall in x86-64, while patch 1
adds it to the eight architecures that use
include/uapi/asm-generic/unistd.h (with the __ARCH_WANT_*
guard at the moment, but you already said that will be removed)
I think ideally the syscall.tbl and unistd.h changes should be done
in one patch for all architectures that doesn't mix it with
any other changes. In particular I think it should be separate
from the vdso changes, but could be in the patch that implements
the syscall.
Arnd