Thread (37 messages) 37 messages, 7 authors, 8d ago

Re: [PATCH v2] random: vDSO: Avoid call to memset() when zeroing reserved in __cvdso_getrandom_data()

flat view

From: LEROY Christophe <hidden>
Date: 2026-10-02 11:02:04
Also in: linux-arm-kernel, linux-riscv, linux-s390, lkml, llvm, loongarch


Le 02/10/2026 à 12:58, Jason A. Donenfeld a écrit :
On Fri, Oct 2, 2026 at 12:57 PM Christophe Leroy (CS GROUP)
[off-list ref] wrote:
quoted

On Fri, 25 Sep 2026 22:46:32 +0100, Nathan Chancellor wrote:
quoted
After a recent change in LLVM [1], builds with the random vDSO
implementation, such as PowerPC and RISC-V, fail when checking the vDSO:

   arch/powerpc/kernel/vdso/vdso32.so.dbg: dynamic relocations are not supported
   arch/riscv/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported

memset() is now generated when zeroing params->reserved for some builds
because LLVM has an optimization (now run in more instances) that can
recognize at compile time when it is assigning a static value to a
contiguous area of memory and turn that into a call to memset(). Both
clang and GCC assume memset() is always available [2].

[...]
Applied, thanks!

[1/1] random: vDSO: Avoid call to memset() when zeroing reserved in __cvdso_getrandom_data()
       (no commit info)
That's not for you to apply. I'm sending this through my random tree,
along with a handful of other things I need to fix. But I wanted to
let this cook a bit more. I can add your reviewed-by line, though.
Sorry I messed up with 'b4 ty', I do not intent to take this patch in my 
tree.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help