aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kexec_file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-20 15:24:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-20 15:24:32 -0800
commit3eb86259eca6a363ed7bb13ecea5cda809f7b97d (patch)
tree39ad92d0c5496d4eab67741e6d5b61f3b9b0a370 /kernel/kexec_file.c
parentMerge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration (diff)
parentprintk: fix typo in CONSOLE_LOGLEVEL_DEFAULT help text (diff)
downloadlinux-dev-3eb86259eca6a363ed7bb13ecea5cda809f7b97d.tar.xz
linux-dev-3eb86259eca6a363ed7bb13ecea5cda809f7b97d.zip
Merge branch 'akpm' (patches from Andrew)
Merge final set of updates from Andrew Morton: - a series to make IMA play better across kexec - a handful of random fixes * emailed patches from Andrew Morton <akpm@linux-foundation.org>: printk: fix typo in CONSOLE_LOGLEVEL_DEFAULT help text ratelimit: fix WARN_ON_RATELIMIT return value kcov: make kcov work properly with KASLR enabled arm64: setup: introduce kaslr_offset() mm: fadvise: avoid expensive remote LRU cache draining after FADV_DONTNEED ima: platform-independent hash value ima: define a canonical binary_runtime_measurements list format ima: support restoring multiple template formats ima: store the builtin/custom template definitions in a list ima: on soft reboot, save the measurement list powerpc: ima: send the kexec buffer to the next kernel ima: maintain memory size needed for serializing the measurement list ima: permit duplicate measurement list entries ima: on soft reboot, restore the measurement list powerpc: ima: get the kexec buffer passed by the previous kernel
Diffstat (limited to 'kernel/kexec_file.c')
-rw-r--r--kernel/kexec_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 0c2df7f73792..b56a558e406d 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -19,6 +19,7 @@
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/fs.h>
+#include <linux/ima.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <linux/syscalls.h>
@@ -132,6 +133,9 @@ kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd,
return ret;
image->kernel_buf_len = size;
+ /* IMA needs to pass the measurement list to the next kernel. */
+ ima_add_kexec_buffer(image);
+
/* Call arch image probe handlers */
ret = arch_kexec_kernel_image_probe(image, image->kernel_buf,
image->kernel_buf_len);