fscrypt: Let fs select encryption index/tweak
authorDavid Gstir <david@sigma-star.at>
Sun, 13 Nov 2016 21:20:48 +0000 (22:20 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Nov 2016 01:18:16 +0000 (20:18 -0500)
commit9c4bb8a3a9b4de21753053d667310c2b7cb39916
treef384bbd76dfc293f2cc66c770c5ccfdbc42c43c8
parent0b93e1b94b86f826d18a2aaf219a53e271274d49
fscrypt: Let fs select encryption index/tweak

Avoid re-use of page index as tweak for AES-XTS when multiple parts of
same page are encrypted. This will happen on multiple (partial) calls of
fscrypt_encrypt_page on same page.
page->index is only valid for writeback pages.

Signed-off-by: David Gstir <david@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/crypto.c
fs/ext4/inode.c
fs/ext4/page-io.c
fs/f2fs/data.c
include/linux/fscrypto.h