[RFC RESEND v3] binfmt_elf: preserve original ELF e_flags for core dumps

Kees Cook kees at kernel.org
Wed Sep 3 20:52:40 PDT 2025


On Mon, 01 Sep 2025 20:53:50 +0700, Svetlana Parfenova wrote:
> Some architectures, such as RISC-V, use the ELF e_flags field to encode
> ABI-specific information (e.g., ISA extensions, fpu support). Debuggers
> like GDB rely on these flags in core dumps to correctly interpret
> optional register sets. If the flags are missing or incorrect, GDB may
> warn and ignore valid data, for example:
> 
>     warning: Unexpected size of section '.reg2/213' in core file.
> 
> [...]

Applied to for-next/execve, thanks!

[1/1] binfmt_elf: preserve original ELF e_flags for core dumps
      https://git.kernel.org/kees/c/8c94db0ae97c

Take care,

-- 
Kees Cook




More information about the linux-riscv mailing list