tmp_suning_uos_patched/crypto
J. Bruce Fields f70ee5ec8f [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist
In the loop in scatterwalk_copychunks(), if walk->offset is zero,
then scatterwalk_pagedone rounds that up to the nearest page boundary:

		walk->offset += PAGE_SIZE - 1;
		walk->offset &= PAGE_MASK;

which is a no-op in this case, so we don't advance to the next element
of the scatterlist array:

		if (walk->offset >= walk->sg->offset + walk->sg->length)
			scatterwalk_start(walk, sg_next(walk->sg));

and we end up copying the same data twice.

It appears that other callers of scatterwalk_{page}done first advance
walk->offset, so I believe that's the correct thing to do here.

This caused a bug in NFS when run with krb5p security, which would
cause some writes to fail with permissions errors--for example, writes
of less than 8 bytes (the des blocksize) at the start of a file.

A git-bisect shows the bug was originally introduced by
5c64097aa0, first in 2.6.19-rc1.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-03-21 08:50:12 +11:00
..
aes.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
algapi.c [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
anubis.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
api.c [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
arc4.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
blkcipher.c [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
blowfish.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
camellia.c [CRYPTO] camellia: added the code of Camellia cipher algorithm. 2007-02-07 09:21:03 +11:00
cast5.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cast6.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cbc.c [CRYPTO] api: Add type-safe spawns 2007-02-07 09:21:01 +11:00
cipher.c [CRYPTO] api: Remove deprecated interface 2007-02-07 09:21:00 +11:00
compress.c [CRYPTO] api: Remove deprecated interface 2007-02-07 09:21:00 +11:00
crc32c.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
crypto_null.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cryptomgr.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
deflate.c [CRYPTO] api: Added cra_init/cra_exit 2006-06-26 17:34:40 +10:00
des.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
digest.c [CRYPTO] api: Remove deprecated interface 2007-02-07 09:21:00 +11:00
ecb.c [CRYPTO] api: Add type-safe spawns 2007-02-07 09:21:01 +11:00
fcrypt.c [CRYPTO] fcrypt: Add FCrypt from RxRPC 2007-02-07 09:20:59 +11:00
gf128mul.c [CRYPTO] lib: table driven multiplications in GF(2^128) 2006-12-06 18:38:55 -08:00
hash.c [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
hmac.c [CRYPTO] api: Add type-safe spawns 2007-02-07 09:21:01 +11:00
internal.h [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
Kconfig Merge branch 'HEAD' of master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6 2007-02-08 15:25:18 -08:00
khazad.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
lrw.c [CRYPTO] api: Add type-safe spawns 2007-02-07 09:21:01 +11:00
Makefile [CRYPTO] camellia: added the code of Camellia cipher algorithm. 2007-02-07 09:21:03 +11:00
md4.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
md5.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
michael_mic.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
pcbc.c [CRYPTO] api: Add type-safe spawns 2007-02-07 09:21:01 +11:00
proc.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
scatterwalk.c [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist 2007-03-21 08:50:12 +11:00
scatterwalk.h [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
serpent.c [PATCH] serpent: fix endian warnings 2006-10-10 16:15:33 -07:00
sha1.c [CRYPTO] sha: Add module aliases for sha1 / sha256 2006-09-21 11:40:20 +10:00
sha256.c [CRYPTO] sha: Add module aliases for sha1 / sha256 2006-09-21 11:40:20 +10:00
sha512.c [CRYPTO] sha512: Fix sha384 block size 2006-12-11 14:34:33 -08:00
tcrypt.c [CRYPTO] camellia: added the testing code of Camellia cipher 2007-02-07 09:21:04 +11:00
tcrypt.h [CRYPTO] camellia: added the testing code of Camellia cipher 2007-02-07 09:21:04 +11:00
tea.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
tgr192.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
twofish_common.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
twofish.c [CRYPTO] twofish: Fix the priority 2006-09-21 11:16:28 +10:00
wp512.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
xcbc.c [CRYPTO] xcbc: Use new cipher interface 2007-02-07 09:21:01 +11:00