public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
	qat-linux@intel.com, stable@vger.kernel.org,
	Mikulas Patocka <mpatocka@redhat.com>,
	Marco Chiappero <marco.chiappero@intel.com>,
	Wojciech Ziemba <wojciech.ziemba@intel.com>,
	dm-devel@redhat.com
Subject: Re: [PATCH v3 1/3] crypto: qat - use pre-allocated buffers in datapath
Date: Tue, 19 Apr 2022 11:31:50 +0100	[thread overview]
Message-ID: <Yl6PlqyucVLCzwF5@silpixa00400314> (raw)
In-Reply-To: <YlRnVBYl1eJ+zvM5@gmail.com>

Belated response on this - I was out last week.

On Mon, Apr 11, 2022 at 05:37:24PM +0000, Eric Biggers wrote:
> On Sun, Apr 10, 2022 at 08:47:05PM +0100, Giovanni Cabiddu wrote:
> > If requests exceed 4 entries buffers, memory is allocated dynamically.
> > 
> > In addition, remove the CRYPTO_ALG_ALLOCATES_MEMORY flag from both aead
> > and skcipher alg structures.
> > 
> 
> There is nothing that says that algorithms can ignore
> !CRYPTO_ALG_ALLOCATES_MEMORY if there are too many scatterlist entries.  See the
> comment above the definition of CRYPTO_ALG_ALLOCATES_MEMORY.
From the conversation in [1], I assumed that a cap on the number of
pre-allocated entries in the scatterlists was already agreed.

> If you need to introduce this constraint, then you will need to audit the users
> of !CRYPTO_ALG_ALLOCATES_MEMORY to verify that none of them are issuing requests
> that violate this constraint, then add this to the documentation comment for
> CRYPTO_ALG_ALLOCATES_MEMORY.
Makes sense. I see that the only users of !CRYPTO_ALG_ALLOCATES_MEMORY
are dm-crypt and dm-integrity but I haven't done an audit on those yet
to understand if they use more than 4 entries.

Regards,

[1] https://lore.kernel.org/linux-crypto/20200722072932.GA27544@gondor.apana.org.au/

-- 
Giovanni

  reply	other threads:[~2022-04-19 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 19:47 [PATCH v3 0/3] crypto: qat - fix dm-crypt related issues Giovanni Cabiddu
2022-04-10 19:47 ` [PATCH v3 1/3] crypto: qat - use pre-allocated buffers in datapath Giovanni Cabiddu
2022-04-11 17:37   ` Eric Biggers
2022-04-19 10:31     ` Giovanni Cabiddu [this message]
2022-07-11 14:21     ` Giovanni Cabiddu
2022-07-11 15:09       ` Lucas Segarra
2022-04-10 19:47 ` [PATCH v3 2/3] crypto: qat - refactor submission logic Giovanni Cabiddu
2022-04-10 19:47 ` [PATCH v3 3/3] crypto: qat - add backlog mechanism Giovanni Cabiddu

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=Yl6PlqyucVLCzwF5@silpixa00400314 \
    --to=giovanni.cabiddu@intel.com \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=marco.chiappero@intel.com \
    --cc=mpatocka@redhat.com \
    --cc=qat-linux@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=wojciech.ziemba@intel.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