Re: [PATCH] rijndael-riscv-zvkned: fix m4 grouping when VLEN greater than 128

Jussi Kivilinna <[email protected]> Thu, 7 May 2026 07:28:18 +0300
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <[email protected]>
Hello,

On 07/05/2026 05:30, Michael Neuling wrote:
> Jussi,
> 
>> Implementation was making wrong assumptions about m4 grouping with
>> different VLEN configurations. Implementation did work with VLEN=128
>> but broke apart with VLEN=256, etc when VLEN>128. This commit switches
>> riscv-zvkned to use vslideup/vslidedown for setting up m4 vector group
>> with 4x128-bits data from four vectors with 128-bits of data.
>>
>> Tested with "qemu-riscv64 -cpu max,vlen={128, 256, 512, 1024}".
>>
>> Reported-by: Michael Neuling <[email protected]>
>> Signed-off-by: Jussi Kivilinna <[email protected]>
> 
> Tested-by: Michael Neuling <[email protected]>
> 
> This works here. Thanks for the quick turnaround.
> 
> Mikey

Thanks to reporting and testing. I've added different vlen variants to
my qemu-riscv64 CI runs and this kind of bug should not pass anymore.

-Jussi