Message ID | 20171130233905.130602-7-samitolvanen@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86448605D2 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 1 Dec 2017 00:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76B612A447 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 1 Dec 2017 00:11:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69E112A449; Fri, 1 Dec 2017 00:11:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4ED72A447 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 1 Dec 2017 00:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jyL4U1b8KUrWAcWnVd+5QMXE1PSirizXdvYAYu7MiyQ=; b=AnRUIXxqEqaLyYr+zQ8J9JKgTo pJmNFyWa2n/P6pXH3MUS6vnnP4BSCnQUTWVJgUkywJr1gAzf/SJCzfH5L667ncJdZ83iNkNerE68G o9HYF5EjKbIU9JmbIC5jH7iB7iGM96JSLqTfEOnY2G96t2UUj9v/FvAhPdfZg2kUqsTMcgwwvJS0n AsyXTtf6uyJWBQeQcJ93UO8maWsZ0JG5Xxqsuqf7Ng4KKhsqwknPEOwlQAisfkABpH+U24ZTAW8ww yslu0VQLy4s2fNu4nazkjLnyb4jaF8p+8OdtcUFxaea24n5Io2QuT2lmQFsRkNY0VMHJYopwg/zsl F+bRUn2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKYux-0004Ut-9V; Fri, 01 Dec 2017 00:10:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKYuv-0002yD-7t for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Dec 2017 00:10:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bpO8qxqQyluljw7SZYTW+L23pGovHvZXaNZkTCrVQ5A=; b=Oz08rAShim56w52klrOhS2g89 K9N8L4Fo34Tk3c6nPiHcneDNICeP8oTBrw0nrwouKQ4W3lShyWARi13R3IhiQmKqPZuW2ARF8aGbj HTHLCPJR2PIoqqv+pGXdTnId7LlNbXdynIEtJ3hPx9u9AlesujPBcxTlwer1wRZ6ZrCu3o8jfTZv2 oSYCCMFaDWt+AgkMjPf6mY89dm4j65FuSzjx9PKf5ak93zy233dl4K1Ibl66+5uhhY9MtMaHjZ0wv N4SQVhcQSTWt5UGK4rxRAr9hRPqElIHMkU8A/GzSpHzwTF+9SkPGwe3W1aVcjE+uEXSWppFP6z84E YVn311YVQ==; Received: from mail-it0-x243.google.com ([2607:f8b0:4001:c0b::243]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKYQe-0005Vi-Km for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2017 23:39:44 +0000 Received: by mail-it0-x243.google.com with SMTP id x28so534825ita.0 for <linux-arm-kernel@lists.infradead.org>; Thu, 30 Nov 2017 15:39:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bpO8qxqQyluljw7SZYTW+L23pGovHvZXaNZkTCrVQ5A=; b=jDFPEu6c3HIf6zelR78n0BLbhwpbTvZOl1T4Gxuo6w61bdyp252bQjghATFQ5D8mr8 Sb+bGbtoabxgjsTi5l/+GgB1zoKxduNjBOQbumMejPbumVZX2xGSYMrGowbKCq0ES1Ip 5iBzo84jZqG+f9hmoerzBglC9Wi0w0nNrvyBk0IE7rqwSA3qLgoMALH5L7OfL16WO6SJ Y6mqcgEk41oRl8p7w8rEgld0kOd2YBJ5lGlzKjaDHcCPWkvBaIxDo9PU+Mgad5VNBiRP 9Ni/zkmO0/SY76VpCSZ635sCoQtGwg9csYRGIjiP1lg21hOX22sXcluqBOEH5XKtHO+m i4wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bpO8qxqQyluljw7SZYTW+L23pGovHvZXaNZkTCrVQ5A=; b=HHW/+hNuzIKsYbEa1S43eewoh3ahXYnQrfgIhEyF0BTgwlY0nHD9VrMqbTTIu0b9so rcbVrvZcHo02n5SmBQMWLkCq9kNU6U/ZuujFh+9qfPFS1ZRALM7iYggLxdYyaNesYdob hsx/5rjPVvohuEFwtwIIrYOGwUmU7GYLrdev0z446Utr5L9w5WXaooHtDh4tmjcn82PP o/kiO4vAi4Z+u0p5QuRogJV332wuo1wvo//mjRzVOmC5k8OmATKLmOqirN7+2doYt8WF ZMWpVfhKZT1BZUB3BxLkc/xPq+oRbYpeo45TFO77cq8yMR6MfuuL3uO9fn1xlW/eMlQR WJgA== X-Gm-Message-State: AJaThX5si0yNVh19N64ZKOFVal7xgLCuIYfgtApaXXfS78VZjrBve4P4 u6MS2X9rb3haHdQ4OaWE5Qc2bQ== X-Google-Smtp-Source: AGs4zMZeua7ZgpzGS2270Zb9eS8FpNGXycTS/InKp7xVAJ75H+x2EI2UCRpVDkFQJVm+hNt5M5E0vA== X-Received: by 10.36.51.67 with SMTP id k64mr5255250itk.12.1512085158741; Thu, 30 Nov 2017 15:39:18 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id h73sm2896676itb.21.2017.11.30.15.39.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 15:39:17 -0800 (PST) From: Sami Tolvanen <samitolvanen@google.com> To: Alex Matveev <alxmtvv@gmail.com>, Andi Kleen <ak@linux.intel.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Greg Hackmann <ghackmann@google.com>, Kees Cook <keescook@chromium.org>, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Michal Marek <michal.lkml@markovi.net>, Nick Desaulniers <ndesaulniers@google.com>, Yury Norov <ynorov@caviumnetworks.com>, Matthias Kaehlcke <mka@chromium.org>, Nicholas Piggin <npiggin@gmail.com> Subject: [PATCH v2 6/7] arm64: explicitly pass --no-fix-cortex-a53-843419 to GNU gold Date: Thu, 30 Nov 2017 15:39:04 -0800 Message-Id: <20171130233905.130602-7-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171130233905.130602-1-samitolvanen@google.com> References: <20171129234442.655-1-samitolvanen@google.com> <20171130233905.130602-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171130_233940_846704_2C1A7E68 X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Sami Tolvanen <samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 82a0df6e865e..68eed687e468 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -26,8 +26,17 @@ ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) ifeq ($(call ld-option, --fix-cortex-a53-843419),) $(warning ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum) else + ifeq ($(call gold-ifversion, -lt, 114000000, y), y) +$(warning This version of GNU gold may generate incorrect code with --fix-cortex-a53-843419;\ + see https://sourceware.org/bugzilla/show_bug.cgi?id=21491) + endif LDFLAGS_vmlinux += --fix-cortex-a53-843419 endif +else + ifeq ($(ld-name),gold) +# Pass --no-fix-cortex-a53-843419 to ensure the erratum fix is disabled +LDFLAGS += --no-fix-cortex-a53-843419 + endif endif KBUILD_DEFCONFIG := defconfig
Some versions of GNU gold are known to produce broken code with --fix-cortex-a53-843419 as explained in this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21491 If ARM64_ERRATUM_843419 is disabled and we're using GNU gold, pass --no-fix-cortex-a53-843419 to the linker to ensure the erratum fix is not used even if the linker is configured to enable it by default. This change also adds a warning if the erratum fix is enabled and gold version <1.14 is used. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> --- arch/arm64/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)