All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	LTP List <ltp@lists.linux.it>,
	open list <linux-kernel@vger.kernel.org>,
	linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
	lkft-triage@lists.linaro.org, linux-crypto@vger.kernel.org,
	Jan Stancek <jstancek@redhat.com>, chrubis <chrubis@suse.cz>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	James Morris <jmorris@namei.org>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: LTP: crypto: af_alg02 regression on linux-next 20200621 tag
Date: Tue, 23 Jun 2020 10:02:17 -0700	[thread overview]
Message-ID: <20200623170217.GB150582@gmail.com> (raw)
In-Reply-To: <20200623064056.GA8121@gondor.apana.org.au>

On Tue, Jun 23, 2020 at 04:40:56PM +1000, Herbert Xu wrote:
> On Tue, Jun 23, 2020 at 11:53:43AM +0530, Naresh Kamboju wrote:
> >
> > Thanks for the investigation.
> > After reverting, two test cases got PASS out of four reported failure cases.
> >  ltp-crypto-tests:
> >      * af_alg02 - still failing - Hung and time out
> >      * af_alg05 - still failing - Hung and time out
> >   ltp-syscalls-tests:
> >      * keyctl07 - PASS
> >      * request_key03 - PASS
> > 
> > Please suggest the way to debug / fix the af_alg02 and af_alg05 failures.
> 
> Did you clear the MSG_MORE flag in the final send(2) call before
> you call recv(2)?
> 

The source code for the two failing AF_ALG tests is here:

https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg02.c
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg05.c

They use read() and write(), not send() and recv().

af_alg02 uses read() to read from a "salsa20" request socket without writing
anything to it.  It is expected that this returns 0, i.e. that behaves like
encrypting an empty message.

af_alg05 uses write() to write 15 bytes to a "cbc(aes-generic)" request socket,
then read() to read 15 bytes.  It is expected that this fails with EINVAL, since
the length is not aligned to the AES block size (16 bytes).

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	LTP List <ltp@lists.linux.it>,
	open list <linux-kernel@vger.kernel.org>,
	linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
	lkft-triage@lists.linaro.org, linux-crypto@vger.kernel.org,
	Jan Stancek <jstancek@redhat.com>, chrubis <chrubis@suse.cz>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	James Morris <jmorris@namei.org>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: LTP: crypto: af_alg02 regression on linux-next 20200621 tag
Date: Tue, 23 Jun 2020 17:02:17 +0000	[thread overview]
Message-ID: <20200623170217.GB150582@gmail.com> (raw)
In-Reply-To: <20200623064056.GA8121@gondor.apana.org.au>

On Tue, Jun 23, 2020 at 04:40:56PM +1000, Herbert Xu wrote:
> On Tue, Jun 23, 2020 at 11:53:43AM +0530, Naresh Kamboju wrote:
> >
> > Thanks for the investigation.
> > After reverting, two test cases got PASS out of four reported failure cases.
> >  ltp-crypto-tests:
> >      * af_alg02 - still failing - Hung and time out
> >      * af_alg05 - still failing - Hung and time out
> >   ltp-syscalls-tests:
> >      * keyctl07 - PASS
> >      * request_key03 - PASS
> > 
> > Please suggest the way to debug / fix the af_alg02 and af_alg05 failures.
> 
> Did you clear the MSG_MORE flag in the final send(2) call before
> you call recv(2)?
> 

The source code for the two failing AF_ALG tests is here:

https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg02.c
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg05.c

They use read() and write(), not send() and recv().

af_alg02 uses read() to read from a "salsa20" request socket without writing
anything to it.  It is expected that this returns 0, i.e. that behaves like
encrypting an empty message.

af_alg05 uses write() to write 15 bytes to a "cbc(aes-generic)" request socket,
then read() to read 15 bytes.  It is expected that this fails with EINVAL, since
the length is not aligned to the AES block size (16 bytes).

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: ltp@lists.linux.it
Subject: [LTP] LTP: crypto: af_alg02 regression on linux-next 20200621 tag
Date: Tue, 23 Jun 2020 10:02:17 -0700	[thread overview]
Message-ID: <20200623170217.GB150582@gmail.com> (raw)
In-Reply-To: <20200623064056.GA8121@gondor.apana.org.au>

On Tue, Jun 23, 2020 at 04:40:56PM +1000, Herbert Xu wrote:
> On Tue, Jun 23, 2020 at 11:53:43AM +0530, Naresh Kamboju wrote:
> >
> > Thanks for the investigation.
> > After reverting, two test cases got PASS out of four reported failure cases.
> >  ltp-crypto-tests:
> >      * af_alg02 - still failing - Hung and time out
> >      * af_alg05 - still failing - Hung and time out
> >   ltp-syscalls-tests:
> >      * keyctl07 - PASS
> >      * request_key03 - PASS
> > 
> > Please suggest the way to debug / fix the af_alg02 and af_alg05 failures.
> 
> Did you clear the MSG_MORE flag in the final send(2) call before
> you call recv(2)?
> 

The source code for the two failing AF_ALG tests is here:

https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg02.c
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg05.c

They use read() and write(), not send() and recv().

af_alg02 uses read() to read from a "salsa20" request socket without writing
anything to it.  It is expected that this returns 0, i.e. that behaves like
encrypting an empty message.

af_alg05 uses write() to write 15 bytes to a "cbc(aes-generic)" request socket,
then read() to read 15 bytes.  It is expected that this fails with EINVAL, since
the length is not aligned to the AES block size (16 bytes).

- Eric

  reply	other threads:[~2020-06-23 17:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 18:34 LTP: crypto: af_alg02 regression on linux-next 20200621 tag Naresh Kamboju
2020-06-22 18:46 ` Naresh Kamboju
2020-06-22 18:34 ` [LTP] " Naresh Kamboju
2020-06-22 22:49 ` Luis Chamberlain
2020-06-22 22:49   ` [LTP] " Luis Chamberlain
2020-06-23  6:23   ` Naresh Kamboju
2020-06-23  6:35     ` Naresh Kamboju
2020-06-23  6:23     ` [LTP] " Naresh Kamboju
2020-06-23  6:40     ` Herbert Xu
2020-06-23  6:40       ` [LTP] " Herbert Xu
2020-06-23  6:40       ` Herbert Xu
2020-06-23 17:02       ` Eric Biggers [this message]
2020-06-23 17:02         ` [LTP] " Eric Biggers
2020-06-23 17:02         ` Eric Biggers
2020-06-24  0:23         ` Herbert Xu
2020-06-24  0:23           ` [LTP] " Herbert Xu
2020-06-24  0:23           ` Herbert Xu
2020-06-26  6:29         ` [PATCH] crypto: af_alg - Fix regression on empty requests Herbert Xu
2020-06-26  6:29           ` [LTP] " Herbert Xu
2020-06-26  6:29           ` Herbert Xu
2020-06-26  6:29           ` Herbert Xu
2020-06-27  8:31           ` Herbert Xu
2020-06-27  8:31             ` Herbert Xu
2020-06-27  8:31             ` [LTP] " Herbert Xu
2020-06-29  8:53             ` [LKP] " Naresh Kamboju
2020-06-29  8:53               ` Naresh Kamboju
2020-06-29  8:53               ` [LTP] [LKP] " Naresh Kamboju
2020-06-30  8:48           ` Naresh Kamboju
2020-06-30  8:48             ` Naresh Kamboju
2020-06-30  8:48             ` [LTP] " Naresh Kamboju
2020-06-30  8:48             ` Naresh Kamboju
2020-07-02  3:32             ` [v2 PATCH] " Herbert Xu
2020-07-02  3:32               ` [LTP] " Herbert Xu
2020-07-02  3:32               ` Herbert Xu
2020-07-02  3:32               ` Herbert Xu
2020-07-03 13:35               ` Luis Chamberlain
2020-07-03 13:35                 ` [LTP] " Luis Chamberlain
2020-07-03 13:35                 ` Luis Chamberlain
2020-07-03 13:35                 ` Luis Chamberlain

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=20200623170217.GB150582@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=chrubis@suse.cz \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jmorris@namei.org \
    --cc=jstancek@redhat.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=ltp@lists.linux.it \
    --cc=mcgrof@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=serge@hallyn.com \
    /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.