Merge tag 'integrity-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 19:06:07 +0000 (11:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 19:06:07 +0000 (11:06 -0800)
Pull integrity subsystem updates from Mimi Zohar:
 "Just three patches here. Other integrity changes are being upstreamed
  via EFI (defines a common EFI secure and trusted boot IMA policy) and
  BPF LSM (exporting the IMA file cache hash info based on inode).

  The three patches included here:

   - bug fix: fail calculating the file hash, when a file not opened for
     read and the attempt to re-open it for read fails.

   - defer processing the "ima_appraise" boot command line option to
     avoid enabling different modes (e.g. fix, log) to when the secure
     boot flag is available on arm.

   - defines "ima-buf" as the default IMA buffer measurement template in
     preparation for the builtin integrity "critical data" policy"

* tag 'integrity-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
  ima: Don't modify file descriptor mode on the fly
  ima: select ima-buf template for buffer measurement
  ima: defer arch_ima_get_secureboot() call to IMA init time

1  2 
include/linux/ima.h
security/integrity/ima/ima_main.c

index 7233a2751754b80aa73d84f93d4e0b60886fb288,ac3d82f962f2b49b31fa12e30dd4a9a22c4eee0e..7db9cca1af34fef18074189324418e38ea1c81dd
@@@ -29,9 -29,14 +29,15 @@@ extern int ima_post_read_file(struct fi
                              enum kernel_read_file_id id);
  extern void ima_post_path_mknod(struct dentry *dentry);
  extern int ima_file_hash(struct file *file, char *buf, size_t buf_size);
 +extern int ima_inode_hash(struct inode *inode, char *buf, size_t buf_size);
  extern void ima_kexec_cmdline(int kernel_fd, const void *buf, int size);
  
+ #ifdef CONFIG_IMA_APPRAISE_BOOTPARAM
+ extern void ima_appraise_parse_cmdline(void);
+ #else
+ static inline void ima_appraise_parse_cmdline(void) {}
+ #endif
  #ifdef CONFIG_IMA_KEXEC
  extern void ima_add_kexec_buffer(struct kimage *image);
  #endif
Simple merge