Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2019 23:59:14 +0000 (16:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2019 23:59:14 +0000 (16:59 -0700)
Pull fs-verity support from Eric Biggers:
 "fs-verity is a filesystem feature that provides Merkle tree based
  hashing (similar to dm-verity) for individual readonly files, mainly
  for the purpose of efficient authenticity verification.

  This pull request includes:

   (a) The fs/verity/ support layer and documentation.

   (b) fs-verity support for ext4 and f2fs.

  Compared to the original fs-verity patchset from last year, the UAPI
  to enable fs-verity on a file has been greatly simplified. Lots of
  other things were cleaned up too.

  fs-verity is planned to be used by two different projects on Android;
  most of the userspace code is in place already. Another userspace tool
  ("fsverity-utils"), and xfstests, are also available. e2fsprogs and
  f2fs-tools already have fs-verity support. Other people have shown
  interest in using fs-verity too.

  I've tested this on ext4 and f2fs with xfstests, both the existing
  tests and the new fs-verity tests. This has also been in linux-next
  since July 30 with no reported issues except a couple minor ones I
  found myself and folded in fixes for.

  Ted and I will be co-maintaining fs-verity"

* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
  f2fs: add fs-verity support
  ext4: update on-disk format documentation for fs-verity
  ext4: add fs-verity read support
  ext4: add basic fs-verity support
  fs-verity: support builtin file signatures
  fs-verity: add SHA-512 support
  fs-verity: implement FS_IOC_MEASURE_VERITY ioctl
  fs-verity: implement FS_IOC_ENABLE_VERITY ioctl
  fs-verity: add data verification hooks for ->readpages()
  fs-verity: add the hook for file ->setattr()
  fs-verity: add the hook for file ->open()
  fs-verity: add inode and superblock fields
  fs-verity: add Kconfig and the helper functions for hashing
  fs: uapi: define verity bit for FS_IOC_GETFLAGS
  fs-verity: add UAPI header
  fs-verity: add MAINTAINERS file entry
  fs-verity: add a documentation file

1  2 
Documentation/filesystems/index.rst
MAINTAINERS
fs/Kconfig
fs/Makefile
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/super.c
fs/f2fs/file.c
fs/f2fs/super.c
include/linux/fs.h
include/uapi/linux/fs.h

Simple merge
diff --cc MAINTAINERS
Simple merge
diff --cc fs/Kconfig
Simple merge
diff --cc fs/Makefile
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/ext4/ioctl.c
@@@ -1258,13 -1242,10 +1269,15 @@@ long ext4_compat_ioctl(struct file *fil
        case EXT4_IOC_SET_ENCRYPTION_POLICY:
        case EXT4_IOC_GET_ENCRYPTION_PWSALT:
        case EXT4_IOC_GET_ENCRYPTION_POLICY:
 +      case FS_IOC_GET_ENCRYPTION_POLICY_EX:
 +      case FS_IOC_ADD_ENCRYPTION_KEY:
 +      case FS_IOC_REMOVE_ENCRYPTION_KEY:
 +      case FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS:
 +      case FS_IOC_GET_ENCRYPTION_KEY_STATUS:
        case EXT4_IOC_SHUTDOWN:
        case FS_IOC_GETFSMAP:
+       case FS_IOC_ENABLE_VERITY:
+       case FS_IOC_MEASURE_VERITY:
                break;
        default:
                return -ENOIOCTLCMD;
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/f2fs/file.c
Simple merge
diff --cc fs/f2fs/super.c
Simple merge
@@@ -1427,7 -1433,9 +1433,10 @@@ struct super_block 
        const struct xattr_handler **s_xattr;
  #ifdef CONFIG_FS_ENCRYPTION
        const struct fscrypt_operations *s_cop;
 +      struct key              *s_master_keys; /* master crypto keys in use */
+ #endif
+ #ifdef CONFIG_FS_VERITY
+       const struct fsverity_operations *s_vop;
  #endif
        struct hlist_bl_head    s_roots;        /* alternate root dentries for NFS */
        struct list_head        s_mounts;       /* list of mounts; _not_ for fs use */
Simple merge