ima: do not copy measurement list to kdump kernel
Subsystems (6)
PATCH v2 1/1 ima: do not copy measurement list to kdump kernel
From: Steven Chen <[email protected]>
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.
---
V1 - https://lore.kernel.org/all/[email protected]/
V2 - Incorporated feedback from the community (Baoquan He and Mimi Zohar) on v1
security/integrity/ima/ima_kexec.c | 3 +++ 1 file changed, 3 insertions(+)
security/integrity/ima/ima_kexec.c +3 -0
@@ -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. */
Signature · 1 line
2.43.0
Mimi Zohar
maintainerQuoted 6 lines · steven chen
From: Steven Chen <[email protected]>
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.
Quoted 7 lines
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 <[email protected]>Tested-by Baoquan He <[email protected]>Acked-by Baoquan He <[email protected]>
Thanks, Boaquan, Steven.
This patch is now queued in next-integrity and next-integrity-testing.
Mimi
Quoted 11 lines · Mimi Zohar
Quoted 10 lines · steven chen
From: Steven Chen <[email protected]>
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.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Steven Chen <[email protected]>Tested-by Baoquan He <[email protected]>Acked-by Baoquan He <[email protected]>Thanks, Boaquan, Steven.
This patch is now queued in next-integrity and next-integrity-testing.
Thanks for taking care of this.