lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXxmIuU9PKJiDs7n@gondor.apana.org.au>
Date: Fri, 30 Jan 2026 16:04:50 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Qingfang Deng <dqfext@...il.com>
Cc: Christian Marangi <ansuelsmth@...il.com>,
	Antoine Tenart <atenart@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Richard van Schagen <vschagen@...oud.com>,
	linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mieczyslaw Nalewaj <namiltd@...oo.com>,
	Aleksander Jan Bajkowski <olek2@...pl>
Subject: Re: [PATCH] crypto: eip93: fix sleep inside atomic

On Tue, Jan 20, 2026 at 10:54:00AM +0800, Qingfang Deng wrote:
> A crypto request is allowed to sleep only if CRYPTO_TFM_REQ_MAY_SLEEP is
> set. Avoid GFP_KERNEL and usleep_range() if the flag is absent.
> 
> Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
> Signed-off-by: Qingfang Deng <dqfext@...il.com>
> ---
>  .../crypto/inside-secure/eip93/eip93-aead.c   |  2 +-
>  .../crypto/inside-secure/eip93/eip93-cipher.c |  2 +-
>  .../crypto/inside-secure/eip93/eip93-cipher.h |  3 +-
>  .../crypto/inside-secure/eip93/eip93-common.c | 36 ++++++++++++-------
>  .../crypto/inside-secure/eip93/eip93-hash.c   |  9 +++--
>  5 files changed, 35 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/crypto/inside-secure/eip93/eip93-aead.c b/drivers/crypto/inside-secure/eip93/eip93-aead.c
> index 18dd8a9a5165..b5a47b583397 100644
> --- a/drivers/crypto/inside-secure/eip93/eip93-aead.c
> +++ b/drivers/crypto/inside-secure/eip93/eip93-aead.c
> @@ -46,7 +46,7 @@ static int eip93_aead_send_req(struct crypto_async_request *async)
>  	struct eip93_cipher_reqctx *rctx = aead_request_ctx(req);
>  	int err;
>  
> -	err = check_valid_request(rctx);
> +	err = check_valid_request(async, rctx);
>  	if (err) {
>  		aead_request_complete(req, err);

The aead_request_complete call is buggy too as you cannot call it
unless you're in the async path, which this clearly is not since
you're still checking the request flags.

I think a better solution is to add crypto_engine to this driver
which would guarantee a sleepable context for the driver.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ