Re: [PATCH] selftests: vDSO: Also test counter in vdso_test_chacha

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 01, 2024 at 08:08:13PM +0200, Jason A. Donenfeld wrote:
> > +	reference_chacha20_blocks(output1, key, counter1, BLOCKS);
> > +	__arch_chacha20_blocks_nostack(output2, key, counter2, BLOCKS);
> > +	if (memcmp(output1, output2, sizeof(output1)) ||
> > +	    memcmp(counter2, counter2, sizeof(counter1)))
> > +		return KSFT_FAIL;
> > +
> > +	reference_chacha20_blocks(output1, key, counter1, BLOCKS);
> > +	__arch_chacha20_blocks_nostack(output2, key, counter2, BLOCKS);
> > +	if (memcmp(output1, output2, sizeof(output1)) ||
> > +	    memcmp(counter2, counter2, sizeof(counter1)))
> > +		return KSFT_FAIL;
> > +
> 
> Why repeat these two stanzas? 

Ah, from your commit message:

"The first test verifies that the function properly writes back the
upper word, the second test verifies that the function properly reads
back the upper word."





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux