All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests: vDSO: Also test counter in vdso_test_chacha
Date: Mon, 2 Sep 2024 03:25:10 +0200	[thread overview]
Message-ID: <ZtUT9t_wr96S2mJe@zx2c4.com> (raw)
In-Reply-To: <ZtStjU_3K9yIJsmp@zx2c4.com>

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."


  reply	other threads:[~2024-09-02  1:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01 17:40 [PATCH] selftests: vDSO: Also test counter in vdso_test_chacha Christophe Leroy
2024-09-01 18:08 ` Jason A. Donenfeld
2024-09-02  1:25   ` Jason A. Donenfeld [this message]
2024-09-02  1:31   ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZtUT9t_wr96S2mJe@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.