From patchwork Wed Nov 29 00:00:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10081233 Return-Path: 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 90DBB60311 for ; Wed, 29 Nov 2017 00:00:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FBF1297A1 for ; Wed, 29 Nov 2017 00:00:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72AE02979C; Wed, 29 Nov 2017 00:00:57 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EFAE2979C for ; Wed, 29 Nov 2017 00:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbdK2AAn (ORCPT ); Tue, 28 Nov 2017 19:00:43 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:44936 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753293AbdK2AA1 (ORCPT ); Tue, 28 Nov 2017 19:00:27 -0500 Received: by mail-io0-f195.google.com with SMTP id w127so1812850iow.11 for ; Tue, 28 Nov 2017 16:00:26 -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=uCbD59R2fnVoBxRiACHSM/vdfKDQfGn3AV+z5j3lH/A=; b=TuglJNneAUzFzXX3uRpib/eRkaBVjgjZXRbgMy+gTnrzQQfhT2m8KwnO+vqiNyu/3G UGK/SLU+7NVLa3ZbUDT6LjbPWEzrUlRy0frIjl3HvoKKnRL7PbnGWwbwEATuYIjcZcZ8 mXqpz6WsRyBg+EaQWvxdX3mWT252s5W7phxNUJ8+3oLvkZHHSe8fu7EsNYH3EahkZHzk GNJiUpxi7uVAfqeXa7iby0V6vprrrL+VONAlCD7S0WHv0ij8n3OFroDT/zlxWL0qSzpp na0oQk+GWYLfNSEB7EU8mH1C3aHCGoo70/f+v/ysZsk0SF3PKfRBYdTk+uIK6Yp97Jrp oA5A== 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=uCbD59R2fnVoBxRiACHSM/vdfKDQfGn3AV+z5j3lH/A=; b=ljO4LavYesOnA4lPugFUYX5+Rr6ikntZLYlDlRYXu1Go2rbM0ryzNTgiAmscwMhwNK 2XPvQA4Ec0gxAaJqqfx1mCW2n/EXvPyeE69HyORvHLrmxQsTnQN5hU+dLKSuDHz0n/ri zT4wG+GhgOxkLeBurMNc6x3FLiOlAGaQkoq+w/EnZkggzBHtbhMlpa3wjMUAaOeWuf+j JP82F9S+pCfXxHPsABpO6zazDLIPerIyqrCVmm6zsBuSj6C60CRAtmsqhxNcvpDfg2fq 2Sewf4WEqUuwM2zsdEfI1z4qc4yMLLurxKdyd5/SBvJb2kmv2CdsujbJhS2/+1iRGaw8 9CrA== X-Gm-Message-State: AJaThX6hrheHsPWFyckFoGOXVrTWilqfdc1Z+FKhZVp7R/vyf6eH3NQq jUS/uEgXqoYPMoVg7idKC+BQxA== X-Google-Smtp-Source: AGs4zMY4vd1Xa6c12BmSmGKIAylbxIWsIOzqWYsa0NFVzk7yX3KAh4Tv7p44ur/97FLzXLXdKSQvPA== X-Received: by 10.107.178.71 with SMTP id b68mr1314744iof.196.1511913625624; Tue, 28 Nov 2017 16:00:25 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id w68sm204836iow.18.2017.11.28.16.00.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 16:00:25 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke Cc: Sami Tolvanen Subject: [PATCH 3/3] arm64: use -mno-implicit-float instead of -mgeneral-regs-only Date: Tue, 28 Nov 2017 16:00:11 -0800 Message-Id: <20171129000011.55235-4-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.417.g466bffb3ac-goog In-Reply-To: <20171129000011.55235-1-samitolvanen@google.com> References: <20171129000011.55235-1-samitolvanen@google.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Greg Hackmann LLVM bug 30792 causes clang's AArch64 backend to crash compiling arch/arm64/crypto/aes-ce-cipher.c. Replacing -mgeneral-regs-only with -mno-implicit-float is the suggested workaround. Signed-off-by: Greg Hackmann Cc: Matthias Kaehlcke [added clang-ifversion to enable the workaround only for clang <6.0] Signed-off-by: Sami Tolvanen --- arch/arm64/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b35788c909f1..d2efb5a0212f 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -49,7 +49,10 @@ $(warning Detected assembler with broken .inst; disassembly will be unreliable) endif endif -KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst) +# This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=30792. +KBUILD_CFLAGS += $(call clang-ifversion, -lt, 0600, -mno-implicit-float, -mgeneral-regs-only) + +KBUILD_CFLAGS += $(lseinstr) $(brokengasinst) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_AFLAGS += $(lseinstr) $(brokengasinst)