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: 10081243 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 15853602DC for ; Wed, 29 Nov 2017 00:13:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 042F1297A5 for ; Wed, 29 Nov 2017 00:13:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED580297AA; Wed, 29 Nov 2017 00:13:58 +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 68132297A5 for ; Wed, 29 Nov 2017 00:13:58 +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=q0Yb8Sd2plvxneXgjDAXUD4rcG3z4PmSiUipmWObmXQ=; b=CEck7pqvYKY3m4ujWLiUP3mAXo qnaiwInNyi3Xk2zjJTbZkBqpaP29mNc4oK9n+BmISj8dlybRIfjQl9kmRtk9TLVE+sduMn9xeVsZ3 qH2c7X2qw8ul30aApeeKTBMXWIIpwEPduhuet+IQ73A5K+dNY35w6fNp8lmBJl5LBhOMUGKhKdevN +vaFPMMctklwkcKjRODIIbujimL1WO2Wg/81soAXoS3EjnIjnJXqw7NpFIUvkAYT1heW7u4YDUV1X qGhVaZv0NU/OrTGXvZcaq8nee2HHH0Oqu7Y1JxSvg29dUubQOJe6S891bU/Y0+9hzVkoREopHDUpF a7TyoNSQ==; 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 1eJq0j-00033Q-Np; Wed, 29 Nov 2017 00:13:57 +0000 Received: from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eJpnz-0006Kp-A2 for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2017 00:00:49 +0000 Received: by mail-io0-x244.google.com with SMTP id g1so1811934ioc.8 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=Se7Hz4ZwVcuSAdRduOxjYFGtD4luwEYwzY6VJcBHdlrTgyL/ebYpAGTjqvkvIpgJpl GljOe9VARGd4HKUFGmM5TM35TKIbGUaPGMQOjuk2TJGxspHD/9FV8hSY8GRpdtoxerXW Wn8RaPOtT69NssDtcL3kUl2Tov7f1uz94Q/MrKjNjMgyOTzTtAgp4amp7SRiTEiC4Cve w2AGEV1xk2HQEl5kbGX13lNVxOai9bhiKMSzkSuMZ2xbVP/IZvqrhZ/029QYxLrac9/8 UUICXWnUciLD2+5PjCWhJ/3JYoFu+xE6YoYjJMJ8mp0O7QTwJXSHr3wkf9xEYgSDn87l Eq2g== X-Gm-Message-State: AJaThX4TPE1U0uBiTSrVehf+0Cs6RC//9znYBHUDr7t7l1U6tELTi3UF gEpI4kfOpUdKoaBpscEz4yZNHg== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171128_160047_407789_3D351195 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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)