Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp556943imu; Sat, 15 Dec 2018 02:47:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/VidIIP9+vRYdmvtqqcYu6utQHZEekLaEvMfYF5lpMQvguu6EmiZINvfvzeL5L5OqvV1/wd X-Received: by 2002:a63:d34a:: with SMTP id u10mr2524726pgi.301.1544870847412; Sat, 15 Dec 2018 02:47:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544870847; cv=none; d=google.com; s=arc-20160816; b=WMHRyK6ki/IEu9QTr8n/3bEhE8PhtlCn0I7BAn76uD5Qr5eBUcBMyhN9ARB+i5+V3J AdyZ2TjMH891Si2Gj7S8kwdhomjMsnuOAhWcbZWfQdGcNZWuiJokR8LgtyJ/2jT8e9vu 14VZv/H3suTvymGV8wSiZ8cHA2frY0nsgUJ8A7ygm1Yzr6Z217z+uDx2IPqVIfN3oqt/ auD8HPwvZmiy5fC4PqXUcMjGX14o8igYQxvWFoeVfAt7dwCu5uKX98bg/J3MOSUuaVYQ lSU2Wr3iHT1khJOcYOffItbXy1sap2Tk98HKlLDC/3FgAtvnCUZKYmxauAlQ311mLqeG RSXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=MWFlhWkX3l8nnqR7hPgrpv8tTOCFoC8bFvt8Qfz/Hss=; b=U3H+cUOiOJ1KWG6VfS2TL2yAzBm9ayA7tPoP1Sc66eljd5zMHMfZX+PoVWEazVoEE/ RsZh540/x8HsFREzmpXk8qfTIp/M6BMULw8KVL2IRXJY51qYME0qTVvlQgDDyOkCw3af 6zIL2o+4Zx05NhIPEaFxFq5k5rNBDIPPIN59Y5EeFY5YgJmfrMlJ6XrFEqozkTufEaCx w9YBV9E2plEPU6exuW2xShlhMO7+DOUGkzX3vYypHVv2JodYNKVnBkMe4rY0WXu0sTiD 0hOfYWJOyTbIut3dk14KMzDhl/zPgubUinA9Atu6u3GD98WPeLtuIGBaBgOKI8z3Uqnu nsuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y188si6455934pfb.59.2018.12.15.02.47.09; Sat, 15 Dec 2018 02:47:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729859AbeLOKqP (ORCPT + 99 others); Sat, 15 Dec 2018 05:46:15 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47355 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729029AbeLOKqP (ORCPT ); Sat, 15 Dec 2018 05:46:15 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBFAjqE11717522 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 Dec 2018 02:45:52 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBFAjqqj1717519; Sat, 15 Dec 2018 02:45:52 -0800 Date: Sat, 15 Dec 2018 02:45:52 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Alistair Strachan Message-ID: Cc: hpa@zytor.com, bp@suse.de, labbott@redhat.com, luto@kernel.org, carlos@redhat.com, x86@kernel.org, mingo@kernel.org, mingo@redhat.com, stable@vger.kernel.org, joel@joelfernandes.org, astrachan@google.com, linux-kernel@vger.kernel.org, fweimer@redhat.com, hjl.tools@gmail.com, tglx@linutronix.de Reply-To: bp@suse.de, labbott@redhat.com, hpa@zytor.com, stable@vger.kernel.org, mingo@redhat.com, joel@joelfernandes.org, luto@kernel.org, carlos@redhat.com, x86@kernel.org, mingo@kernel.org, hjl.tools@gmail.com, tglx@linutronix.de, astrachan@google.com, fweimer@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <20181214223637.35954-1-astrachan@google.com> References: <20181214223637.35954-1-astrachan@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/vdso: Pass --eh-frame-hdr to the linker Git-Commit-ID: cd01544a268ad8ee5b1dfe42c4393f1095f86879 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: cd01544a268ad8ee5b1dfe42c4393f1095f86879 Gitweb: https://git.kernel.org/tip/cd01544a268ad8ee5b1dfe42c4393f1095f86879 Author: Alistair Strachan AuthorDate: Fri, 14 Dec 2018 14:36:37 -0800 Committer: Borislav Petkov CommitDate: Sat, 15 Dec 2018 11:37:51 +0100 x86/vdso: Pass --eh-frame-hdr to the linker 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 --- 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 0624bf2266fd..5bfe2243a08f 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -171,7 +171,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 #