Re: [PATCH v2 1/6] x86: Avoid indirect includes through linux/module.h -> linux/elf.h
From: Borislav Petkov
Date: Tue Sep 22 2026 - 14:21:58 EST
On Fri, Sep 11, 2026 at 04:40:31PM +0200, Petr Pavlu wrote:
> Several x86 files use ELF-related declarations and currently rely on them
> being provided indirectly through linux/module.h -> linux/elf.h:
>
> * arch/x86/entry/entry_fred.c: ia32_enabled() -> asm/ia32.h,
> * arch/x86/entry/syscall_32.c: vdso32_image -> asm/vdso.h,
> * arch/x86/kernel/cpu/intel.c: ELF_HWCAP2 -> asm/elf.h,
> * arch/x86/kernel/fpu/xstate.c: elf_coredump_extra_notes_write(),
> elf_coredump_extra_notes_size(), NT_X86_XSAVE_LAYOUT, elf_note ->
> linux/elf.h,
> * arch/x86/kernel/process.c: mmap_is_ia32() -> asm/elf.h,
> * arch/x86/kernel/signal.c: get_sigframe_size() -> asm/elf.h.
>
> Add the missing includes to these files in preparation for removing the
> linux/elf.h include from linux/module.h.
>
> Signed-off-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
> ---
> arch/x86/entry/entry_fred.c | 1 +
> arch/x86/entry/syscall_32.c | 1 +
> arch/x86/kernel/cpu/intel.c | 1 +
> arch/x86/kernel/fpu/xstate.c | 2 +-
> arch/x86/kernel/process.c | 1 +
> arch/x86/kernel/signal.c | 1 +
> 6 files changed, 6 insertions(+), 1 deletion(-)
Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette