From: Herbert Xu <herbert@gondor.apana.org.au>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Eric Biggers <ebiggers@google.com>, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: pcrypt - forbid recursive instantiation
Date: Tue, 19 Nov 2019 20:53:33 +0800 [thread overview]
Message-ID: <20191119125333.xzfvclo2aiycvjsn@gondor.apana.org.au> (raw)
In-Reply-To: <20190920043556.GP2879@gauss3.secunet.de>
On Fri, Sep 20, 2019 at 06:35:56AM +0200, Steffen Klassert wrote:
>
> Fix this by making pcrypt forbid instantiation if pcrypt appears in the
> underlying ->cra_driver_name or if an underlying algorithm needs a
> fallback. This is somewhat of a hack, but it's a simple fix that should
> be sufficient to prevent the deadlock.
This still doesn't resolve the case where pcrypt is used in a
non-transparent fashion, e.g., through a fallback. Note that
even adding a NEED_FALLBACK flag won't fix this as you can construct
an instance on top of a NEED_FALLBACK algorithm that itself does
not need a fallback.
Anyway I decided to change pcrypt to use a set of queues per
instance rather than globally and it should resolve the problem.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2019-11-19 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 4:35 [PATCH] crypto: pcrypt - forbid recursive instantiation Steffen Klassert
2019-11-19 12:53 ` Herbert Xu [this message]
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=20191119125333.xzfvclo2aiycvjsn@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=steffen.klassert@secunet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).