[PATCH] arm64: vdso: disable .eh_frame_hdr via /DISCARD/ instead of --no-eh-frame-hdr

Catalin Marinas catalin.marinas at arm.com
Wed Jan 6 05:59:05 EST 2021


On Wed, 30 Dec 2020 14:19:54 -0800, Peter Collingbourne wrote:
> Currently with ld.lld we emit an empty .eh_frame_hdr section (and a
> corresponding program header) into the vDSO. With ld.bfd the section
> is not emitted but the program header is, with p_vaddr set to 0. This
> can lead to unwinders attempting to interpret the data at whichever
> location the program header happens to point to as an unwind info
> header. This happens to be mostly harmless as long as the byte at
> that location (interpreted as a version number) has a value other
> than 1, causing both libgcc and LLVM libunwind to ignore the section
> (in libunwind's case, after printing an error message to stderr),
> but it could lead to worse problems if the byte happened to be 1 or
> the program header points to non-readable memory (e.g. if the empty
> section was placed at a page boundary).
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: vdso: disable .eh_frame_hdr via /DISCARD/ instead of --no-eh-frame-hdr
      https://git.kernel.org/arm64/c/e2bba5f92354

-- 
Catalin




More information about the linux-arm-kernel mailing list