Received: by 10.213.65.68 with SMTP id h4csp684298imn; Fri, 6 Apr 2018 07:16:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Gbnye5F7tEsglYIJh7t9skf1ye2GWKYHKlpHPa9EXw005fk45Xw852z5tzevd7Mj++aZs X-Received: by 10.98.196.83 with SMTP id y80mr20783621pff.117.1523024186827; Fri, 06 Apr 2018 07:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024186; cv=none; d=google.com; s=arc-20160816; b=Do1IP+nf1zS1L5uXg8ipRj9YmwffuS0AwWu6Gyy+oCmrujz43vatPYb9HiKgp4gfBt Ym3vV7WXaC3XbKFEWBGin73wPRXp4IAv3xJJ+zz1p6LQpAYhGl4cPnQP7MFc+2E3DGOK 7QedvgR0iogRUT2H90Ol3JNW7920fBxB+zKlzgmK1EIkaSh8foqk61fUgaj1VP3DfI2s isU57EfQ8CiCDhxIddA5fENYXh/XlrncLC8Ok5IPIEBNNf9/lIrIZ4at65zrmtPlQ4UL DKs+9rJh2Pi6v0/zxSRpdIoKmAeETNP3+l0W6oMywWhkjxIZ/u3Otutavqm3/j8PLByj rb9A== 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=WEPl3P1qsgBeEbLgrMOk3XS7Pe7JAV3Ltm7KkJjq5Xk=; b=p/vQ7Ed1S3iH/yAgpYwuPVNimoEdqQISW5LrTeM1UDg71L7JVn+SdwRjhgTCiKCdsM ELXVUGEGph0/DVxf8HDHUq3UlwAQT0maf7voz/FFwLoQc7uXYUijpfsuHt7pCddsdq+o m7G2yJ9SKxGkpYaGN+ftYJ+GvqEMgC6uuI004B1GgLipEpkX0ZkaZli/ew173Pvg/0M4 eDGg7KIARnIB++PEp8GuAHO9DZ6hOxgNLVimdpWTZCQ93zUjSZkvPThTpSpbdscvoHo1 LKtnqhcjjXuTy6OH5CC10q9tT7jpbiShenQRJpQlTVq1AzbC7UlQf21rVKTdIzHjz/IA KVhw== 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 i21si8196039pfk.34.2018.04.06.07.16.12; Fri, 06 Apr 2018 07:16:26 -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 S1756344AbeDFOPM (ORCPT + 99 others); Fri, 6 Apr 2018 10:15:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34722 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932652AbeDFNjc (ORCPT ); Fri, 6 Apr 2018 09:39:32 -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 49426D60; Fri, 6 Apr 2018 13:39:31 +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.14 52/67] crypto: arm,arm64 - Fix random regeneration of S_shipped Date: Fri, 6 Apr 2018 15:24:22 +0200 Message-Id: <20180406084347.775630194@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084341.225558262@linuxfoundation.org> References: <20180406084341.225558262@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.14-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 @@ -58,6 +58,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 $(@) @@ -66,5 +67,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