Re: [PATCH RFC v1] random: implement getrandom() in vDSO

From: Peter Zijlstra
Date: Wed Aug 17 2022 - 04:20:46 EST


On Wed, Aug 03, 2022 at 12:27:43AM +0200, Thomas Gleixner wrote:
> Assumed that there is a sensible usecase, there is a way out and that's
> exactly the library part. You can make that VDSO interface versioned and
> provide a library in tools/random/ which goes in lockstep with the VDSO
> changes.

Well.... there is still the old idea of making a genuine libkernel.so
which is part of the kernel and provided as a virtual file (say in
/sys/lib/).

Since that's perfectly in lock-step with the kerne image, it can be
used to avoid the vdso data layout compat issues. Only the actual
symbols provided by the library are ABI constrained, not their
implementation.