EFI fixes for v6.19 #2

- Wipe the INITRD config table upon consumption so it doesn't confuse
   kexec
 
 - Let APEI/GHES maintainers take responsibility for CPER processing
   logic
 
 - Fix wrong return value in CPER string helper routine
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCaWio5AAKCRAwbglWLn0t
 XKgSAQDFigknu/LkOwYhrY4elRRQbnH11kLwB4EPLU8cYReVXAEAy9O8m80+8zIo
 /u30MXnGZWdzC5oTrkheNJnFg2ESRA0=
 =hMLX
 -----END PGP SIGNATURE-----

Merge tag 'efi-fixes-for-v6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

 - Wipe the INITRD config table upon consumption so it doesn't confuse
   kexec

 - Let APEI/GHES maintainers take responsibility for CPER processing
   logic

 - Fix wrong return value in CPER string helper routine

* tag 'efi-fixes-for-v6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/cper: Fix cper_bits_to_str buffer handling and return value
  MAINTAINERS: add cper to APEI files
  efi: Wipe INITRD config table from memory after consumption
This commit is contained in:
Linus Torvalds 2026-01-15 11:23:24 -08:00
commit bc08b65880
3 changed files with 4 additions and 1 deletions

View file

@ -314,6 +314,7 @@ R: Mauro Carvalho Chehab <mchehab@kernel.org>
R: Shuai Xue <xueshuai@linux.alibaba.com>
L: linux-acpi@vger.kernel.org
F: drivers/acpi/apei/
F: drivers/firmware/efi/cper*
ACPI COMPONENT ARCHITECTURE (ACPICA)
M: "Rafael J. Wysocki" <rafael@kernel.org>
@ -9516,6 +9517,7 @@ F: arch/arm/boot/compressed/efi-header.S
F: arch/x86/platform/efi/
F: drivers/firmware/efi/
F: include/linux/efi*.h
X: drivers/firmware/efi/cper*
EXTERNAL CONNECTOR SUBSYSTEM (EXTCON)
M: MyungJoo Ham <myungjoo.ham@samsung.com>

View file

@ -162,7 +162,7 @@ int cper_bits_to_str(char *buf, int buf_size, unsigned long bits,
len -= size;
str += size;
}
return len - buf_size;
return buf_size - len;
}
EXPORT_SYMBOL_GPL(cper_bits_to_str);

View file

@ -819,6 +819,7 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
if (tbl) {
phys_initrd_start = tbl->base;
phys_initrd_size = tbl->size;
tbl->base = tbl->size = 0;
early_memunmap(tbl, sizeof(*tbl));
}
}