From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AIpwx49EX/TLg/V66A4d2Q+nsQCjxTFSpgpjqDfdnXWFPHsJhJ1aCSMn3QInghGxuv4lOzFayJ4N ARC-Seal: i=1; a=rsa-sha256; t=1523021971; cv=none; d=google.com; s=arc-20160816; b=kC2+V+UQryrru+iWMtkjkm9+ZwjwZbmb2cvaYnUXooJeImtirArv4rkeGVvc7Ifqwi 7hCkAEbVKMtQksx4AyOcwcaBtTMDIKl0iEko8AM0WX0moBhn9slhgm3qFWTsrlOhwEie QEc9aPeDJZxWMfFS9vi0TNk6lhboIbSfQoVBAFXeERki6iU9jVxIVbQ8r79RXzLIrlpE eyVmzDtUFquALwEzBhDlWctmcMITkUtiGAyp0+CA43ALL2cQHQjbMAOLL4A2/R2vorta T7A8BlAQ/OfjLwuT8ZcAdXf6Aonm/2wdm1PlU6rXBl/iBcqR3GND65mBOoEGYduEY5th 83Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WEPl3P1qsgBeEbLgrMOk3XS7Pe7JAV3Ltm7KkJjq5Xk=; b=BVMAbSDZ4HpJA3ObtK6YZVEq8m/wmy5HkxIzarP8RHwJs+78+CZDk5Xn8VAFHvc2ur 3XKbBx6dwZXXt4FTBs3V9KC4GhTuFCeVSVIJgIV5ZifI8nx+CXR7XqozQZTvxjs/zW+S nM+t2suXmtQdJFpgY3Mq4PhhqXGwrW9tbgP7rbRnLHvxATEsZ9Xvf3VjorbNt5zoWWlx 60jD5xilbLI/op5ly855fmw4feKko4A/zihEiuZDkp8G03xEdntYv2xdMH2FsASX5jaG 5A3i+rJZg98EoS1sLsA2PBLSFZxVSea+wONsEn+BRs7h/nnWAbSXvlC4CpYWq18kCVlK qjJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.61.202 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1597004287599299415?= X-GMAIL-MSGID: =?utf-8?q?1597004287599299415?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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