Re: [PATCH v2] random: vDSO: Avoid call to memset() when zeroing reserved in __cvdso_getrandom_data()
From: Nathan Chancellor
Date: Fri Oct 02 2026 - 05:54:11 EST
On Thu, Oct 01, 2026 at 01:03:10PM +0200, Nathan Chancellor wrote:
> On Thu, Oct 01, 2026 at 12:48:10PM +0200, Jason A. Donenfeld wrote:
> > Does this commit seem okay with you? I used the diff you sent below and
> > adjusted the commit message: https://git.zx2c4.com/linux-rng/commit/?id=56ff95ee85715047eb5b5220243778af657778c8
>
> Yeah, that seems fine to me, thanks for taking care of it!
Can you adjust the LLVM value by one from 4294967295 to 4294967294? ~0U
is actually a special value, so we hit an assertion in the SystemZ
backend.
https://github.com/llvm/llvm-project/blob/3f48e22a1f321d5d3341bd812803694cea588785/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L9547
https://github.com/llvm/llvm-project/blob/3f48e22a1f321d5d3341bd812803694cea588785/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp#L1470-L1471
clang: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:1471: virtual bool llvm::SystemZTargetLowering::findOptimalMemOpLowering(LLVMContext &, std::vector<EVT> &, unsigned int, const MemOp &, unsigned int, unsigned int, const AttributeList &, EVT *) const: Assertion `Limit != ~0U && "Expected EmitTargetCodeForMemXXX() to handle AlwaysInline cases."' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and dumped files.
Stack dump:
0. Program arguments: ...
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'arch/s390/kernel/vdso/vgetrandom.c'.
4. Running pass 'SystemZ DAG->DAG Pattern Instruction Selection' on function '@__kernel_getrandom'
...
--
Cheers,
Nathan