diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2016-01-15 04:59:14 +0300 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2016-02-21 17:06:14 +0300 |
commit | b804defe4297157a9ff45863769efe9a01953398 (patch) | |
tree | 562c479b3b93e922ac99a0afe94d09015e3cf11d /include/linux/fs.h | |
parent | c6af8efe97d87fa308eb1bbd0cf4feb820a4d622 (diff) | |
download | linux-b804defe4297157a9ff45863769efe9a01953398.tar.xz |
kexec: replace call to copy_file_from_fd() with kernel version
Replace copy_file_from_fd() with kernel_read_file_from_fd().
Two new identifiers named READING_KEXEC_IMAGE and READING_KEXEC_INITRAMFS
are defined for measuring, appraising or auditing the kexec image and
initramfs.
Changelog v3:
- return -EBADF, not -ENOEXEC
- identifier change
- split patch, moving copy_file_from_fd() to a separate patch
- split patch, moving IMA changes to a separate patch
v0:
- use kstat file size type loff_t, not size_t
- Calculate the file hash from the in memory buffer - Dave Young
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Acked-by: Dave Young <dyoung@redhat.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index fb08b668c37a..52567252288e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2579,6 +2579,8 @@ extern int do_pipe_flags(int *, int); enum kernel_read_file_id { READING_FIRMWARE = 1, READING_MODULE, + READING_KEXEC_IMAGE, + READING_KEXEC_INITRAMFS, READING_MAX_ID }; |