Received: by 10.213.65.68 with SMTP id h4csp656579imn; Fri, 6 Apr 2018 06:52:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YmN+X1uqXEjYNIyyLhJztUYEB6FVGzMePKVALbMq22ex0D7p6YK60IB4KbpAe4zEzKZDG X-Received: by 2002:a17:902:a508:: with SMTP id s8-v6mr28004363plq.216.1523022778255; Fri, 06 Apr 2018 06:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022778; cv=none; d=google.com; s=arc-20160816; b=Nc4/kmG3+WKAPAGKVxVo/bprcOf9xAiHn+o1JwP/fttFDXjd3zow1VEcM+l2sx+Uji Rkk2+hx6DKvvEU52+zOgA55YCpvSI66oSM3csW3CpCM3eHDPsJgGDHwe6esqekaOsg4I RnT+oORaUG8uqWlW7x6WOBj6e3ITrxdYOprAIC8gNagXv0sxp8w3s0MKhPFQeyAKDzgP f2e3SDaWJ3liThrQ589JaS5gggtz2QvbHwehdDJYiFBIIgU5Z88YV7jWa4Q2cp2PW7tz MVvq0asilp78QRuPAZ4HJI9uPCdePxV6yHFK1hX0f4VyupIk+Ba+CfFYPdeSz7t76iqe uZoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KYCSfmdnJ8QgEZDE98OmS1svufEPbHxjnZa2MKrzVHw=; b=nwJ9gNrh84axz9Xi+nV1NlkdX+g7VWrB8WurOSVbEZSmi94nNgwNgVZPWOQUVmFaEQ SX9tkTJbpdR0mkx8oNUIoOhITCdOBuzwJ1mnoiuNUsD44WOHBl5L5tJ7SNv8OcGkZzIy sdUnB3mhDlumlMeyE9hrFapYX17XJqt/2E7rk+AmdIz2BjVc5vXbhCmTviMknneMRCmv yz4Ylk+BBRSRaxxQVcE79ixaGqXCI1A89zJaSZkRCdzmNKqZiUHiiPJXmz7IovwucR5W i1OQhTSJ73jH7YoMrV9/33DufbKhHs4b9vako6h77tAWkmrOABLuEOL/PPJ1wodGtHDF qnSg== 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 b9si7344645pgn.191.2018.04.06.06.52.44; Fri, 06 Apr 2018 06:52:58 -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 S1756816AbeDFNvJ (ORCPT + 99 others); Fri, 6 Apr 2018 09:51:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37854 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756950AbeDFNom (ORCPT ); Fri, 6 Apr 2018 09:44:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6477FE0E; Fri, 6 Apr 2018 13:44:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leonard Crestez , Masahiro Yamada , Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.16 19/31] crypto: arm,arm64 - Fix random regeneration of S_shipped Date: Fri, 6 Apr 2018 15:24:44 +0200 Message-Id: <20180406084343.595788923@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084340.999820380@linuxfoundation.org> References: <20180406084340.999820380@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Leonard Crestez commit 6aaf49b495b446ff6eec0ac983f781ca0dc56a73 upstream. The decision to rebuild .S_shipped is made based on the relative timestamps of .S_shipped and .pl files but git makes this essentially random. This means that the perl script might run anyway (usually at most once per checkout), defeating the whole purpose of _shipped. Fix by skipping the rule unless explicit make variables are provided: REGENERATE_ARM_CRYPTO or REGENERATE_ARM64_CRYPTO. This can produce nasty occasional build failures downstream, for example for toolchains with broken perl. The solution is minimally intrusive to make it easier to push into stable. Another report on a similar issue here: https://lkml.org/lkml/2018/3/8/1379 Signed-off-by: Leonard Crestez Cc: Reviewed-by: Masahiro Yamada Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- arch/arm/crypto/Makefile | 2 ++ arch/arm64/crypto/Makefile | 2 ++ 2 files changed, 4 insertions(+) --- a/arch/arm/crypto/Makefile +++ b/arch/arm/crypto/Makefile @@ -54,6 +54,7 @@ crct10dif-arm-ce-y := crct10dif-ce-core. crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o +ifdef REGENERATE_ARM_CRYPTO quiet_cmd_perl = PERL $@ cmd_perl = $(PERL) $(<) > $(@) @@ -62,5 +63,6 @@ $(src)/sha256-core.S_shipped: $(src)/sha $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl $(call cmd,perl) +endif .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S --- a/arch/arm64/crypto/Makefile +++ b/arch/arm64/crypto/Makefile @@ -67,6 +67,7 @@ CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_ $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE $(call if_changed_rule,cc_o_c) +ifdef REGENERATE_ARM64_CRYPTO quiet_cmd_perlasm = PERLASM $@ cmd_perlasm = $(PERL) $(<) void $(@) @@ -75,5 +76,6 @@ $(src)/sha256-core.S_shipped: $(src)/sha $(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl $(call cmd,perlasm) +endif .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S