Thread (18 messages) 18 messages, 6 authors, 15h ago

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

From: Nathan Chancellor <nathan@kernel.org>
Date: 2026-09-26 12:39:24
Also in: linux-arm-kernel, linux-riscv, linux-s390, lkml, llvm, loongarch

On Sat, Sep 26, 2026 at 12:55:34PM +0200, Christophe Leroy (CS GROUP) wrote:
Le 26/09/2026 à 12:02, Jason A. Donenfeld a écrit :
quoted
Apparently not on RISCV, which is what prompted this patch in the first
place. So I suspect Nathan's v2 here is the way to go.

Don't you have -fno-builtin on RISCV like we have on powerpc ?

Or is it clang that is missing this option ?
Yes, clang has -fno-builtin but as I mention in the commit message, that
may not always stop the compiler from generating calls to memset(),
which it is allowed to do even with -ffreestanding (which implies
-fno-builtin) per GCC's documentation. -fno-builtin with GCC < 14 just
happens to avoid generating memset() for memset_inline() in all of my
tests, hence why I went with this approach as suggested by Jason.

-- 
Cheers,
Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help