lkml.org 
[lkml]   [2005]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[9/*] [CRYPTO] Remap when walk_out crosses page in crypt()
From
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
===== 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);
\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.397 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site