[PATCH v5 14/17] elf: Introduce elf64_phdr_size() helper
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Fri Sep 18 03:25:26 PDT 2026
> Add a common helper to compute the total size of an ELF64 header
> (Ehdr + program headers) from the number of program headers.
> Replace open-coded calculations in powerpc, x86, vmcore,
> and crash_core.
>
> On ppc64, struct elfhdr maps to elf64_hdr, so the powerpc change
> is a pure cleanup.
>
> No functional change intended.
>
> Cc: Madhavan Srinivasan <maddy at linux.ibm.com>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Nicholas Piggin <npiggin at gmail.com>
> Cc: "Christophe Leroy (CS GROUP)" <chleroy at kernel.org>
> Cc: Thomas Gleixner <tglx at kernel.org>
> Cc: Ingo Molnar <mingo at redhat.com>
> Cc: Borislav Petkov <bp at alien8.de>
> Cc: Dave Hansen <dave.hansen at linux.intel.com>
> Cc: "H. Peter Anvin" <hpa at zytor.com>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Baoquan He <baoquan.he at linux.dev>
> Cc: Mike Rapoport <rppt at kernel.org>
> Cc: Pasha Tatashin <pasha.tatashin at soleen.com>
> Cc: Pratyush Yadav <pratyush at kernel.org>
> Cc: Dave Young <ruirui.yang at linux.dev>
> Cc: Kees Cook <kees at kernel.org>
> Cc: Sourabh Jain <sourabhjain at linux.ibm.com>
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918100442.3841135-1-ruanjinjie@huawei.com?part=14
More information about the kexec
mailing list