Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4534103imm; Mon, 17 Sep 2018 16:02:03 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbx4RAoMv5BNeNjlJ4Mp0exRKlMOHdD2GsMqEIjqg4zeze4AzL1YIop5tm29vBO+wI3noFQ X-Received: by 2002:a62:41d6:: with SMTP id g83-v6mr27908558pfd.219.1537225323629; Mon, 17 Sep 2018 16:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537225323; cv=none; d=google.com; s=arc-20160816; b=bQU1FvjWt1Kst74gH3zQAaxYBkzl+Yt5wic7v0VpPsiQW5SqChlfMsiUJj4KqgA5u4 A8BO599XxNyMlzV+s8bxLrvBzbenw20OxNHZ8Ri/WzNaDuYoNNrmiXnPuKQxZMlBjx1w LcSCyxqRXJuZAA+3tohwcvLNC2UXetTRFpoaPI/8uS6JGLqgiQWFn2k2a0iK6Z7ikOf/ Ct0VKsyEHb9SIQBAhmTV2jky2DT8yFy2XdhwXJU8E6Yl3sFH9sY+rA4lGvqMVR40JdF3 zEhCaH3qZuZMsgpNccbEYc/aghia6j2u3SSUXDQRlkQ18TWNTQZsF4U/uWbAqwDuoJ3H k7Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=jLukOZZfi275WqK6bdRsQEvH0tEYDFl/TtkKLouhCpo=; b=Ml34sWL8OBi3pu5M0sNqudPhCrLIY5BA20OSwhaVmeiajM+9GscJxu8fGjq87GPQGE aacJ0hIHeoRYzdq/AXqhIrVlD3JzHww8P9tlhW3Tb2fBKRmRsPkCF3R3hAltL96dQM16 BezR8TZ6b3FPdzEOLw2XayNXTiJIAlxNuu3B3n1yTqSCW5YqtzeVvLjqewNStJdJvo7u Tsg+3EGbju1FQPp1T67DgfspQ8WCrEio+JjjOFHeYXgVoynEl3izts4eTfIqKJb1/5/C GA8FglEWaN8QkQjM8k8jbl52949GYqoX28XX1Uo8Fa5E6E5n+V0Mr4W9QHj9lOT/HDoA mQHg== 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 205-v6si16115509pgd.271.2018.09.17.16.01.47; Mon, 17 Sep 2018 16:02:03 -0700 (PDT) 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 S1729992AbeIRE34 (ORCPT + 99 others); Tue, 18 Sep 2018 00:29:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48080 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbeIRE3z (ORCPT ); Tue, 18 Sep 2018 00:29:55 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D20A4CB2; Mon, 17 Sep 2018 23:00:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Arnd Bergmann , Herbert Xu , Horia Geanta Subject: [PATCH 4.14 019/126] crypto: aes-generic - fix aes-generic regression on powerpc Date: Tue, 18 Sep 2018 00:41:07 +0200 Message-Id: <20180917211705.936630964@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180917211703.481236999@linuxfoundation.org> References: <20180917211703.481236999@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 6e36719fbe90213fbba9f50093fa2d4d69b0e93c upstream. My last bugfix added -Os on the command line, which unfortunately caused a build regression on powerpc in some configurations. I've done some more analysis of the original problem and found slightly different workaround that avoids this regression and also results in better performance on gcc-7.0: -fcode-hoisting is an optimization step that got added in gcc-7 and that for all gcc-7 versions causes worse performance. This disables -fcode-hoisting on all compilers that understand the option. For gcc-7.1 and 7.2 I found the same performance as my previous patch (using -Os), in gcc-7.0 it was even better. On gcc-8 I could see no change in performance from this patch. In theory, code hoisting should not be able make things better for the AES cipher, so leaving it disabled for gcc-8 only serves to simplify the Makefile change. Reported-by: kbuild test robot Link: https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg30418.html Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83651 Fixes: 148b974deea9 ("crypto: aes-generic - build with -Os on gcc-7+") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu Cc: Horia Geanta Signed-off-by: Greg Kroah-Hartman --- crypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/crypto/Makefile +++ b/crypto/Makefile @@ -98,7 +98,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += t obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 obj-$(CONFIG_CRYPTO_AES) += aes_generic.o -CFLAGS_aes_generic.o := $(call cc-ifversion, -ge, 0701, -Os) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 +CFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356 obj-$(CONFIG_CRYPTO_AES_TI) += aes_ti.o obj-$(CONFIG_CRYPTO_CAMELLIA) += camellia_generic.o obj-$(CONFIG_CRYPTO_CAST_COMMON) += cast_common.o