f2fs crypto: add encryption policy and password salt support
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 20 Apr 2015 22:19:06 +0000 (15:19 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 28 May 2015 22:41:48 +0000 (15:41 -0700)
commitf424f664f0e8949361d268e2e91c7acc8cf63eb2
tree985ed29a13fcd37b48f261e0db3df134079df176
parentb93531dd7b9b39faace22abde2d5296e87b50499
f2fs crypto: add encryption policy and password salt support

This patch adds encryption policy and password salt support through ioctl
implementation.

It adds three ioctls:
 F2FS_IOC_SET_ENCRYPTION_POLICY,
 F2FS_IOC_GET_ENCRYPTION_POLICY,
 F2FS_IOC_GET_ENCRYPTION_PWSALT, which use xattr operations.

Note that, these definition and codes are taken from ext4 crypto support.
For f2fs, xattr operations and on-disk flags for superblock and inode were
changed.

Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Ildar Muslukhov <muslukhovi@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/Makefile
fs/f2fs/crypto_policy.c [new file with mode: 0644]
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/xattr.c