From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933601AbdKCRM6 (ORCPT ); Fri, 3 Nov 2017 13:12:58 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:43972 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933537AbdKCRMz (ORCPT ); Fri, 3 Nov 2017 13:12:55 -0400 X-Google-Smtp-Source: ABhQp+Qnjz1cqHQsB7GrI1cc+pGvz99Zv6jcZTZXQ5JeDoMPiK0Z0kpsszfan9oQelJxQ5Yqj50+PQ== From: Sami Tolvanen To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Greg Hackmann , Kees Cook , Matthias Kaehlcke , Nick Desaulniers , Sami Tolvanen Subject: [PATCH 10/15] arm64: disable ARM64_ERRATUM_843419 for clang LTO Date: Fri, 3 Nov 2017 10:11:55 -0700 Message-Id: <20171103171203.107569-12-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.403.gc27cc4dac6-goog In-Reply-To: <20171103171203.107569-1-samitolvanen@google.com> References: <20171103171203.107569-1-samitolvanen@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CONFIG_CLANG_LTO depends on GNU gold, which can generate ADR_PREL_PG_HI21 relocations even with --fix-cortex-a53-843419. Since ARM64_ERRATUM_843419 disables kernel support for these relocations, disable the erratum when LTO is used. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 0df64a6a56d4..43ccddb7c8ec 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -433,6 +433,7 @@ config ARM64_ERRATUM_845719 config ARM64_ERRATUM_843419 bool "Cortex-A53: 843419: A load or store might access an incorrect address" + depends on !CLANG_LTO default y select ARM64_MODULE_CMODEL_LARGE if MODULES help -- 2.15.0.403.gc27cc4dac6-goog From mboxrd@z Thu Jan 1 00:00:00 1970 From: samitolvanen@google.com (Sami Tolvanen) Date: Fri, 3 Nov 2017 10:11:55 -0700 Subject: [PATCH 10/15] arm64: disable ARM64_ERRATUM_843419 for clang LTO In-Reply-To: <20171103171203.107569-1-samitolvanen@google.com> References: <20171103171203.107569-1-samitolvanen@google.com> Message-ID: <20171103171203.107569-12-samitolvanen@google.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org CONFIG_CLANG_LTO depends on GNU gold, which can generate ADR_PREL_PG_HI21 relocations even with --fix-cortex-a53-843419. Since ARM64_ERRATUM_843419 disables kernel support for these relocations, disable the erratum when LTO is used. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 0df64a6a56d4..43ccddb7c8ec 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -433,6 +433,7 @@ config ARM64_ERRATUM_845719 config ARM64_ERRATUM_843419 bool "Cortex-A53: 843419: A load or store might access an incorrect address" + depends on !CLANG_LTO default y select ARM64_MODULE_CMODEL_LARGE if MODULES help -- 2.15.0.403.gc27cc4dac6-goog