linux/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 eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c eCryptfs: Handle NULL nameidata pointers 2011-02-21 14:45:57 -06:00
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 eCryptfs: Remove Kconfig NET dependency and select MD5 2009-10-08 11:31:36 -05:00
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 eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c ecryptfs: properly mark init functions 2010-08-27 10:50:52 -05:00
miscdev.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
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