kernel_optimize_test/fs/ecryptfs
Tyler Hicks 8d08dab786 eCryptfs: Allow 2 scatterlist entries for encrypted filenames
The buffers allocated while encrypting and decrypting long filenames can
sometimes straddle two pages. In this situation, virt_to_scatterlist()
will return -ENOMEM, causing the operation to fail and the user will get
scary error messages in their logs:

kernel: ecryptfs_write_tag_70_packet: Internal error whilst attempting
to convert filename memory to scatterlist; expected rc = 1; got rc =
[-12]. block_aligned_filename_size = [272]
kernel: ecryptfs_encrypt_filename: Error attempting to generate tag 70
packet; rc = [-12]
kernel: ecryptfs_encrypt_and_encode_filename: Error attempting to
encrypt filename; rc = [-12]
kernel: ecryptfs_lookup: Error attempting to encrypt and encode
filename; rc = [-12]

The solution is to allow up to 2 scatterlist entries to be used.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
2011-05-27 11:46:14 -05:00
..
crypto.c eCryptfs: Handle failed metadata read in lookup 2011-04-25 18:45:06 -05:00
debug.c
dentry.c
ecryptfs_kernel.h eCryptfs: Handle failed metadata read in lookup 2011-04-25 18:45:06 -05:00
file.c eCryptfs: Handle failed metadata read in lookup 2011-04-25 18:45:06 -05:00
inode.c eCryptfs: Clear i_nlink in rmdir 2011-05-27 11:46:14 -05:00
Kconfig
keystore.c eCryptfs: Allow 2 scatterlist entries for encrypted filenames 2011-05-27 11:46:14 -05:00
kthread.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
main.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
Makefile
messaging.c
miscdev.c
mmap.c eCryptfs: Unlock page in write_begin error path 2011-03-28 01:47:46 -05:00
read_write.c ecryptfs: modify write path to encrypt page in writepage 2011-03-28 01:47:45 -05:00
super.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00