* [PATCH V2] ima: do not copy measurement list to kdump kernel
@ 2025-05-13 14:31 steven chen
2025-05-14 12:40 ` Mimi Zohar
0 siblings, 1 reply; 3+ messages in thread
From: steven chen @ 2025-05-13 14:31 UTC (permalink / raw)
To: zohar, stefanb, roberto.sassu, roberto.sassu, eric.snowberg,
ebiederm, paul, code, bauermann, linux-integrity, kexec,
linux-security-module, linux-kernel
Cc: madvenka, nramas, James.Bottomley, bhe
From: Steven Chen <chenste@linux.microsoft.com>
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>
---
V1 - https://lore.kernel.org/all/20250502200337.6293-1-chenste@linux.microsoft.com/
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(+)
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.
*/
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] ima: do not copy measurement list to kdump kernel
2025-05-13 14:31 [PATCH V2] ima: do not copy measurement list to kdump kernel steven chen
@ 2025-05-14 12:40 ` Mimi Zohar
2025-05-16 3:27 ` Baoquan He
0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2025-05-14 12:40 UTC (permalink / raw)
To: steven chen, stefanb, roberto.sassu, roberto.sassu, eric.snowberg,
ebiederm, paul, code, bauermann, linux-integrity, kexec,
linux-security-module, linux-kernel
Cc: madvenka, nramas, James.Bottomley, bhe
On Tue, 2025-05-13 at 07:31 -0700, steven chen wrote:
> From: Steven Chen <chenste@linux.microsoft.com>
>
> 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>
Thanks, Boaquan, Steven.
This patch is now queued in next-integrity and next-integrity-testing.
Mimi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] ima: do not copy measurement list to kdump kernel
2025-05-14 12:40 ` Mimi Zohar
@ 2025-05-16 3:27 ` Baoquan He
0 siblings, 0 replies; 3+ messages in thread
From: Baoquan He @ 2025-05-16 3:27 UTC (permalink / raw)
To: Mimi Zohar
Cc: steven chen, stefanb, roberto.sassu, roberto.sassu, eric.snowberg,
ebiederm, paul, code, bauermann, linux-integrity, kexec,
linux-security-module, linux-kernel, madvenka, nramas,
James.Bottomley
On 05/14/25 at 08:40am, Mimi Zohar wrote:
> On Tue, 2025-05-13 at 07:31 -0700, steven chen wrote:
> > From: Steven Chen <chenste@linux.microsoft.com>
> >
> > 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>
>
> Thanks, Boaquan, Steven.
>
> This patch is now queued in next-integrity and next-integrity-testing.
Thanks for taking care of this.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-16 3:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 14:31 [PATCH V2] ima: do not copy measurement list to kdump kernel steven chen
2025-05-14 12:40 ` Mimi Zohar
2025-05-16 3:27 ` Baoquan He
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).