Received: by 10.213.65.68 with SMTP id h4csp658691imn; Fri, 6 Apr 2018 06:55:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx49uhL/yTcg3k/2IIqK8MgAtGq/hpXdnZnu8C0KNQfn2BNbkmvOhJ8gcbrm7xJN5yoRX4cC0 X-Received: by 10.101.99.66 with SMTP id p2mr2281157pgv.396.1523022903156; Fri, 06 Apr 2018 06:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022903; cv=none; d=google.com; s=arc-20160816; b=wGS2qNyeKjW1ebYcZvRkxjku//+eOKCUIXLAKEWYU515AvZW6NoVCk5QVfleMx/Mcp iaRrcVCL2bawJXeSg4CPsQ5NocP67P6hX3CcL6eKOr75KwIw6qV+KdmFMJlluCDlyYn2 1B145ZjTppO41/Oi4Aq0CutlkHYM0DrG3e9ybCAtX+BDuBC7fBh0a7GJcLb4PfpxjNyS sKIlKKSD3ozFhxfXVrruUfHcSOq5QMGaIPQ/zB3wqY86gv2VsgFjzyEdlufg2bF0vJxL iGReZkEWDIbW9NuG8pG+jW70YymWneqBoZ0h74EeYIzSpb13iAnQ8UH7MAH0Cy7FJ//O ZBig== 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=SyrrKe6+ZO2hrXLIkcRcCsufgLBTUByUUU4mu/hTKPM=; b=MzqSTr0eByK8esbNDoTDlCR1dTQzhDbDUY6FGjdtdPFT7/y7Jr6ICv6fuP25upmZt8 D9g0b7chQa1tg52AUF8rpXQ11TGPj9+v04jCe8Y1fuy5p8z8ky17H2GAdnoDUbdcJd4C NJZ9xRCkNxjmP2IzUCAP3Rafp9RUgp/6LmVCl98xlY4Fck7mq2SKCtUpqUXldVBFhfVc lENKTt0IwiKls9x/T40W7vApb1+CFyh46ehXg8fOK7ab6Zpkl7zAAqMxqoNbUwEeHGC0 f49Vv4oQfdGsJIAeyABRStHVJXtJlEsZVnKO7GzOVSUJOVPXdCbOFiIu9pyOHF546K1y y31Q== 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 e7-v6si8470866plk.397.2018.04.06.06.54.49; Fri, 06 Apr 2018 06:55: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 S1756869AbeDFNoI (ORCPT + 99 others); Fri, 6 Apr 2018 09:44:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37540 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbeDFNoE (ORCPT ); Fri, 6 Apr 2018 09:44:04 -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 BEDF0E04; Fri, 6 Apr 2018 13:44:03 +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.15 57/72] crypto: arm,arm64 - Fix random regeneration of S_shipped Date: Fri, 6 Apr 2018 15:24:32 +0200 Message-Id: <20180406084353.304522312@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@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.15-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