x86/vdso: Pass --eh-frame-hdr to the linker
Alistair Strachan authored
[ Upstream commit cd01544a ]

Commit

  379d98dd ("x86: vdso: Use $LD instead of $CC to link")

accidentally broke unwinding from userspace, because ld would strip the
.eh_frame sections when linking.

Originally, the compiler would implicitly add --eh-frame-hdr when
invoking the linker, but when this Makefile was converted from invoking
ld via the compiler, to invoking it directly (like vmlinux does),
the flag was missed. (The EH_FRAME section is important for the VDSO
shared libraries, but not for vmlinux.)

Fix the problem by explicitly specifying --eh-frame-hdr, which restores
parity with the old method.

See relevant bug reports for additional info:

  https://bugzilla.kernel.org/show_bug.cgi?id=201741
  https://bugzilla.redhat.com/show_bug.cgi?id=1659295

Fixes: 379d98dd

 ("x86: vdso: Use $LD instead of $CC to link")
Reported-by: default avatarFlorian Weimer <fweimer@redhat.com>
Reported-by: default avatarCarlos O'Donell <carlos@redhat.com>
Reported-by: default avatar"H. J. Lu" <hjl.tools@gmail.com>
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Tested-by: default avatarLaura Abbott <labbott@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: kernel-team@android.com
Cc: Laura Abbott <labbott@redhat.com>
Cc: stable <stable@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: X86 ML <x86@kernel.org>
Link: https://lkml.kernel.org/r/20181214223637.35954-1-astrachan@google.com

Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
b66f198b
Name Last commit Last update
Documentation x86/speculation/mds: Fix documentation typo
arch x86/vdso: Pass --eh-frame-hdr to the linker
block block: do not leak memory in bio_copy_user_iov()
certs Replace magic for trusting the secondary keyring with #define
crypto crypto: x86/poly1305 - fix overflow during partial reduction
drivers net: stmmac: Move debugfs init/exit to ->probe()/->remove()
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license
fs Btrfs: fix missing delayed iputs on unmount
include media: cec: make cec_get_edid_spa_location() an inline function
init init: initialize jump labels before command line option parsing
ipc ipc/sem.c: prevent queue.status tearing in semop
kernel tracing/fgraph: Fix set_graph_function from showing interrupts
lib ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
mm mm: fix inactive list balancing between NUMA nodes and cgroups
net net: don't keep lonely packets forever in the gro hash
samples samples: mei: use /dev/mei0 instead of /dev/mei
scripts kconfig/[mn]conf: handle backspace (^H) key
security ima: open a new file instance if no read permissions
sound ASoC: Intel: avoid Oops if DMA setup fails
tools selftests/net: correct the return value for run_netsocktests
usr initramfs: fix initramfs rebuilds w/ compression after disabling
virt KVM: arm/arm64: Ensure only THP is candidate for adjustment
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address
COPYING [PATCH] update FSF address in COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license
MAINTAINERS MAINTAINERS: Add Sasha as a stable branch maintainer
Makefile Linux 4.14.119
README README: add a new README file, pointing to the Documentation/
Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.