From: Petr Vorel <pvorel@suse.cz>
To: Eric Biggers <ebiggers@kernel.org>
Cc: ltp@lists.linux.it, linux-crypto@vger.kernel.org
Subject: Re: [LTP] [LTP PATCH 0/2] ltp: fix af_alg02 to specify control data
Date: Fri, 21 Aug 2020 08:50:24 +0200 [thread overview]
Message-ID: <20200821065024.GA11908@dell5510> (raw)
In-Reply-To: <20200820181918.404758-1-ebiggers@kernel.org>
Hi Eric,
> It isn't clearly defined what happens if you read from an AF_ALG request
> socket without previously sending the control data to begin an
> encryption or decryption operation. On some kernels the read will
> return 0, while on others it will block.
> Testing this corner case isn't the purpose of af_alg02; it just wants to
> try to encrypt a zero-length message. So, change it to explicitly send
> a zero-length message with control data.
> This fixes the test failure reported at
> https://lkml.kernel.org/r/CA+G9fYtebf78TH-XpqArunHc1L6s9mHdLEbpY1EY9tSyDjp=sg@mail.gmail.com
> Fixing the test in this way was also previously suggested at
> https://lkml.kernel.org/r/20200702033221.GA19367@gondor.apana.org.au
> Note, this patch doesn't change the fact that the read() still blocks on
> pre-4.14 kernels (which is a kernel bug), and thus the timeout logic in
> the test is still needed.
Thanks for the fix, merged!
Kind regards,
Petr
WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [LTP PATCH 0/2] ltp: fix af_alg02 to specify control data
Date: Fri, 21 Aug 2020 08:50:24 +0200 [thread overview]
Message-ID: <20200821065024.GA11908@dell5510> (raw)
In-Reply-To: <20200820181918.404758-1-ebiggers@kernel.org>
Hi Eric,
> It isn't clearly defined what happens if you read from an AF_ALG request
> socket without previously sending the control data to begin an
> encryption or decryption operation. On some kernels the read will
> return 0, while on others it will block.
> Testing this corner case isn't the purpose of af_alg02; it just wants to
> try to encrypt a zero-length message. So, change it to explicitly send
> a zero-length message with control data.
> This fixes the test failure reported at
> https://lkml.kernel.org/r/CA+G9fYtebf78TH-XpqArunHc1L6s9mHdLEbpY1EY9tSyDjp=sg@mail.gmail.com
> Fixing the test in this way was also previously suggested at
> https://lkml.kernel.org/r/20200702033221.GA19367@gondor.apana.org.au
> Note, this patch doesn't change the fact that the read() still blocks on
> pre-4.14 kernels (which is a kernel bug), and thus the timeout logic in
> the test is still needed.
Thanks for the fix, merged!
Kind regards,
Petr
next prev parent reply other threads:[~2020-08-21 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 18:19 [LTP PATCH 0/2] ltp: fix af_alg02 to specify control data Eric Biggers
2020-08-20 18:19 ` [LTP] " Eric Biggers
2020-08-20 18:19 ` [LTP PATCH 1/2] lib/tst_af_alg: add tst_alg_sendmsg() Eric Biggers
2020-08-20 18:19 ` [LTP] " Eric Biggers
2020-08-20 18:19 ` [LTP PATCH 2/2] crypto/af_alg02: send message with control data before reading Eric Biggers
2020-08-20 18:19 ` [LTP] " Eric Biggers
2020-08-21 6:50 ` Petr Vorel [this message]
2020-08-21 6:50 ` [LTP] [LTP PATCH 0/2] ltp: fix af_alg02 to specify control data Petr Vorel
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=20200821065024.GA11908@dell5510 \
--to=pvorel@suse.cz \
--cc=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=ltp@lists.linux.it \
/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.