From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82E78C04E53 for ; Wed, 15 May 2019 11:56:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51F4220657 for ; Wed, 15 May 2019 11:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557921363; bh=ZdlgUYYrg5Dgeru0jn3XYz+piIt2uQk0pzg45Hi95yc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GPRE+ZcMWb23sP0ymaWqxwzqeh9i4WST5z/fHryV+RBAGTAsLxSiimdVjkkDXqH5B O39ICkEwnDFfEfi2mq0YwfnTvLd2jdPF/w7pAnLAF8MsQhYhuDb+dV+LJWnRm5bhUd hgX1U43/vkIYc6RM/e2oEVUYh1Amj7LvAsffcRew= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731030AbfEOL4C (ORCPT ); Wed, 15 May 2019 07:56:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:55604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730581AbfEOLSL (ORCPT ); Wed, 15 May 2019 07:18:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EFC22206BF; Wed, 15 May 2019 11:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919090; bh=ZdlgUYYrg5Dgeru0jn3XYz+piIt2uQk0pzg45Hi95yc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x+zTDlQDopXdr5btLbspE7MhYiaKPFSR9tFa/5PpNw8kZtVzi09so1YNwQ8kETH1X y0JWwCeEN4JONeTImR2AvFNg7+bJpDplFllp71rVTFeK3IiNujVeeoTiCodoxZTx6d NnzQ9oxjWBku6nCX1s9eTgZjGZNRjazis4eHjxjA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Weimer , Carlos ODonell , "H. J. Lu" , Alistair Strachan , Borislav Petkov , Laura Abbott , Andy Lutomirski , "H. Peter Anvin" , Ingo Molnar , Joel Fernandes , kernel-team@android.com, Thomas Gleixner , X86 ML , Sasha Levin Subject: [PATCH 4.14 064/115] x86/vdso: Pass --eh-frame-hdr to the linker Date: Wed, 15 May 2019 12:55:44 +0200 Message-Id: <20190515090704.175034368@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090659.123121100@linuxfoundation.org> References: <20190515090659.123121100@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit cd01544a268ad8ee5b1dfe42c4393f1095f86879 ] Commit 379d98ddf413 ("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: 379d98ddf413 ("x86: vdso: Use $LD instead of $CC to link") Reported-by: Florian Weimer Reported-by: Carlos O'Donell Reported-by: "H. J. Lu" Signed-off-by: Alistair Strachan Signed-off-by: Borislav Petkov Tested-by: Laura Abbott Cc: Andy Lutomirski Cc: Carlos O'Donell Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joel Fernandes Cc: kernel-team@android.com Cc: Laura Abbott Cc: stable Cc: Thomas Gleixner Cc: X86 ML Link: https://lkml.kernel.org/r/20181214223637.35954-1-astrachan@google.com Signed-off-by: Sasha Levin --- arch/x86/entry/vdso/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 839015f1b0de0..ab7f730cf7f22 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -182,7 +182,8 @@ quiet_cmd_vdso = VDSO $@ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \ - $(call ld-option, --build-id) -Bsymbolic + $(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \ + -Bsymbolic GCOV_PROFILE := n # -- 2.20.1