* [merged mm-nonmm-stable] kexec-exclude-elfcorehdr-from-the-segment-digest.patch removed from -mm tree
@ 2023-08-24 23:25 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-24 23:25 UTC (permalink / raw)
To: mm-commits, zohar, vschneid, vgoyal, vbabka, tiwai, tglx,
sourabhjain, seanjc, rafael, osalvador, naveen.n.rao, mingo,
linux, lf32.dev, konrad.wilk, hpa, hbathini, gregkh, ebiederm,
dyoung, david, dave.hansen, corbet, bp, boris.ostrovsky, bhe,
bhelgaas, eric.devolder, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3318 bytes --]
The quilt patch titled
Subject: kexec: exclude elfcorehdr from the segment digest
has been removed from the -mm tree. Its filename was
kexec-exclude-elfcorehdr-from-the-segment-digest.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Eric DeVolder <eric.devolder@oracle.com>
Subject: kexec: exclude elfcorehdr from the segment digest
Date: Mon, 14 Aug 2023 17:44:41 -0400
When a crash kernel is loaded via the kexec_file_load() syscall, the
kernel places the various segments (ie crash kernel, crash initrd,
boot_params, elfcorehdr, purgatory, etc) in memory. For those
architectures that utilize purgatory, a hash digest of the segments is
calculated for integrity checking. The digest is embedded into the
purgatory image prior to placing in memory.
Updates to the elfcorehdr in response to CPU and memory changes would
cause the purgatory integrity checking to fail (at crash time, and no
vmcore created). Therefore, the elfcorehdr segment is explicitly excluded
from the purgatory digest, enabling updates to the elfcorehdr while also
avoiding the need to recompute the hash digest and reload purgatory.
Link: https://lkml.kernel.org/r/20230814214446.6659-4-eric.devolder@oracle.com
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
Suggested-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Akhil Raj <lf32.dev@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/kexec_file.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/kernel/kexec_file.c~kexec-exclude-elfcorehdr-from-the-segment-digest
+++ a/kernel/kexec_file.c
@@ -726,6 +726,12 @@ static int kexec_calculate_store_digests
for (j = i = 0; i < image->nr_segments; i++) {
struct kexec_segment *ksegment;
+#ifdef CONFIG_CRASH_HOTPLUG
+ /* Exclude elfcorehdr segment to allow future changes via hotplug */
+ if (j == image->elfcorehdr_index)
+ continue;
+#endif
+
ksegment = &image->segment[i];
/*
* Skip purgatory as it will be modified once we put digest
_
Patches currently in -mm which might be from eric.devolder@oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-24 23:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 23:25 [merged mm-nonmm-stable] kexec-exclude-elfcorehdr-from-the-segment-digest.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.