linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-crypto@vger.kernel.org
Subject: Re: crypto: skcipher - Unmap pages after an external error
Date: Fri, 6 Sep 2019 12:15:50 +1000	[thread overview]
Message-ID: <20190906021550.GA17115@gondor.apana.org.au> (raw)
In-Reply-To: <20190906015753.GA803@sol.localdomain>

On Thu, Sep 05, 2019 at 06:57:53PM -0700, Eric Biggers wrote:
>
> That's not what I'm talking about.  I'm talking about flushing the page, in
> scatterwalk_done().  It assumes the page that was just processed was:
> 
> 	sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT)
> 
> But if no bytes were processed, this is invalid.  Notably, if no bytes were
> processed then walk->offset can be 0, causing a crash.

You're right.  What's worse is that my patch doesn't even unmap
the pages anyway.  Let me do this again.

Thanks,
-- 
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

  reply	other threads:[~2019-09-06  2:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 14:32 [PATCH 00/17] crypto: arm/aes - XTS ciphertext stealing and other updates Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 01/17] crypto: arm/aes - fix round key prototypes Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 02/17] crypto: arm/aes-ce - yield the SIMD unit between scatterwalk steps Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 03/17] crypto: arm/aes-ce - switch to 4x interleave Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 04/17] crypto: arm/aes-ce - replace tweak mask literal with composition Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 05/17] crypto: arm/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 06/17] crypto: arm64/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 07/17] crypto: arm64/aes-neon - limit exposed routines if faster driver is enabled Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 08/17] crypto: skcipher - add the ability to abort a skcipher walk Ard Biesheuvel
2019-08-30  8:03   ` Herbert Xu
2019-08-31 18:01     ` Ard Biesheuvel
2019-09-03  6:54       ` crypto: skcipher - Unmap pages after an external error Herbert Xu
2019-09-03  7:05         ` crypto: ablkcipher " Herbert Xu
2019-09-03  7:09           ` crypto: blkcipher " Herbert Xu
2019-09-03 13:50         ` crypto: skcipher " Eric Biggers
2019-09-03 22:36           ` Herbert Xu
2019-09-05  5:22             ` Eric Biggers
2019-09-05  5:40               ` Herbert Xu
2019-09-06  1:57                 ` Eric Biggers
2019-09-06  2:15                   ` Herbert Xu [this message]
2019-09-06  3:13                     ` [v2 PATCH] " Herbert Xu
2019-09-07  0:52                       ` Ard Biesheuvel
2019-09-07  1:19                         ` Herbert Xu
2019-09-07  1:32                           ` Ard Biesheuvel
2019-09-07  1:56                             ` Herbert Xu
2019-09-07  2:14                               ` Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 09/17] crypto: arm64/aes-cts-cbc-ce - performance tweak Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 10/17] crypto: arm64/aes-cts-cbc - move request context data to the stack Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 11/17] crypto: arm64/aes - implement support for XTS ciphertext stealing Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 12/17] crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 13/17] crypto: arm/aes-ce " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 14/17] crypto: arm/aes-neonbs " Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 15/17] crypto: arm/aes-ce - implement ciphertext stealing for CBC Ard Biesheuvel
2019-09-30 16:32   ` Guenter Roeck
2019-09-30 18:19     ` Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 16/17] crypto: testmgr - add test vectors for XTS ciphertext stealing Ard Biesheuvel
2019-08-21 14:32 ` [PATCH 17/17] crypto: testmgr - Add additional AES-XTS vectors for covering CTS Ard Biesheuvel

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=20190906021550.GA17115@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ard.biesheuvel@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    /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).