Skip to content

Commit fe3aebf

Browse files
Steven Chenmimizohar
authored andcommitted
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>
1 parent 591683d commit fe3aebf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

security/integrity/ima/ima_kexec.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ void ima_add_kexec_buffer(struct kimage *image)
146146
void *kexec_buffer = NULL;
147147
int ret;
148148

149+
if (image->type == KEXEC_TYPE_CRASH)
150+
return;
151+
149152
/*
150153
* Reserve extra memory for measurements added during kexec.
151154
*/

0 commit comments

Comments
 (0)