linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Fruhwirth Clemens <clemens@endorphin.org>
Cc: James Morris <jmorris@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	cryptoapi@lists.logix.cz, linux-crypto@vger.kernel.org
Subject: [9/*] [CRYPTO] Remap when walk_out crosses page in crypt()
Date: Tue, 22 Mar 2005 22:25:04 +1100	[thread overview]
Message-ID: <20050322112504.GC7224@gondor.apana.org.au> (raw)
In-Reply-To: <20050322112416.GB7224@gondor.apana.org.au>

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

Hi:

This is needed so that we can keep the in_place assignment outside the
inner loop.  Without this in pathalogical situations we can start out
having walk_out being different from walk_in, but when walk_out crosses
a page it may converge with walk_in.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: sg-9 --]
[-- Type: text/plain, Size: 509 bytes --]

===== cipher.c 1.26 vs edited =====
--- 1.26/crypto/cipher.c	2005-03-22 21:56:21 +11:00
+++ edited/cipher.c	2005-03-22 21:59:53 +11:00
@@ -129,7 +129,9 @@
 			complete_dst(&walk_out, bsize, dst_p, in_place);
 
 			nbytes -= bsize;
-		} while (nbytes && !scatterwalk_across_pages(&walk_in, bsize));
+		} while (nbytes &&
+			 !scatterwalk_across_pages(&walk_in, bsize) &&
+			 !scatterwalk_across_pages(&walk_out, bsize));
 
 		scatterwalk_done(&walk_in, 0, nbytes);
 		scatterwalk_done(&walk_out, 1, nbytes);

  reply	other threads:[~2005-03-22 11:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21  9:40 [0/5] [CRYPTO] Speed up crypt() Herbert Xu
2005-03-21  9:48 ` [1/5] [CRYPTO] Do scatterwalk_whichbuf inline Herbert Xu
2005-03-21  9:49   ` [2/5] [CRYPTO] Handle in_place flag in crypt() Herbert Xu
2005-03-21  9:50     ` [3/5] [CRYPTO] Split src/dst handling out from crypt() Herbert Xu
2005-03-21  9:52       ` [4/5] [CRYPTO] Eliminate most calls to scatterwalk_copychunks " Herbert Xu
2005-03-21  9:53         ` [5/5] [CRYPTO] Optimise kmap calls in crypt() Herbert Xu
2005-03-21 11:30           ` Fruhwirth Clemens
2005-03-22  1:13             ` Herbert Xu
2005-03-22 10:24               ` Fruhwirth Clemens
2005-03-22 11:22 ` [7/*] [CRYPTO] Kill obsolete iv check in cbc_process() Herbert Xu
2005-03-22 11:24   ` [8/*] [CRYPTO] Split cbc_process into encrypt/decrypt Herbert Xu
2005-03-22 11:25     ` Herbert Xu [this message]
2005-03-23 20:17       ` [9/*] [CRYPTO] Remap when walk_out crosses page in crypt() David S. Miller

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=20050322112504.GC7224@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=clemens@endorphin.org \
    --cc=cryptoapi@lists.logix.cz \
    --cc=jmorris@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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).