diff options
author | 2025-05-13 07:31:29 -0700 | |
---|---|---|
committer | 2025-05-14 06:40:09 -0400 | |
commit | fe3aebf27dc1875b2a0d13431e2e8cf3cf350cca (patch) | |
tree | e0740e9efa463c75dad4dab4c554bd4571ae2deb /security | |
parent | ima: measure kexec load and exec events as critical data (diff) | |
download | linux-rng-fe3aebf27dc1875b2a0d13431e2e8cf3cf350cca.tar.xz linux-rng-fe3aebf27dc1875b2a0d13431e2e8cf3cf350cca.zip |
ima: do not copy measurement list to kdump kernel
Kdump kernel doesn't need IMA to do integrity measurement.
Hence the measurement list in 1st kernel doesn't need to be copied to
kdump kernel.
Here skip allocating buffer for measurement list copying if loading
kdump kernel. Then there won't be the later handling related to
ima_kexec_buffer.
Signed-off-by: Steven Chen <chenste@linux.microsoft.com>
Tested-by: Baoquan He <bhe@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_kexec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c index 38cb2500f4c3..7362f68f2d8b 100644 --- a/security/integrity/ima/ima_kexec.c +++ b/security/integrity/ima/ima_kexec.c @@ -146,6 +146,9 @@ void ima_add_kexec_buffer(struct kimage *image) void *kexec_buffer = NULL; int ret; + if (image->type == KEXEC_TYPE_CRASH) + return; + /* * Reserve extra memory for measurements added during kexec. */ |