mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Russell King <linux@armlinux.org.uk>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: a Heisenbug tale
Date: Sun, 11 Mar 2018 01:56:29 +0100	[thread overview]
Message-ID: <24703f21-6125-030d-e2ab-4b91cb5c25f8@rasmusvillemoes.dk> (raw)
In-Reply-To: <CAKv+Gu8z2aMeGEi5Jbi+CBpbyMAmxHnZCO+URrVFgb33tddppw@mail.gmail.com>

On 2018-03-09 10:45, Ard Biesheuvel wrote:
> On 8 March 2018 at 23:19, Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
>> On 2018-03-07 20:25, Leonard Crestez wrote:
>>> Hello,
>>>

>>
>> What we ended up doing was to explicitly set the mtime of every file in
>> the repo to the same reference time after the git checkout (find ... |
>> xargs touch --date=...). I also wanted to send a patch to change the
>> Makefile to use the filechk mechanism to avoid updating the .S_shipped
>> file when the script produced identical output, but never got around to it.
>>
> 
> I had no idea that _shipped files were causing issues like this, and
> AFAICT, this is not specific to this use case in arch/arm/crypto,
> right?
> 
> Russell, would you mind if we removed the _shipped.S file here and
> just assume that perl is available?
> 

Well, in that case I won't need to write a proper changelog for the
below, but this seems to work. It will of course still give the spurious
build failures when perl is not available and one hits the "files got
checked out at almost but not quite the same time", but it would have
prevented the spurious -dirty bug.


diff --git a/arch/arm/crypto/Makefile b/arch/arm/crypto/Makefile
index 30ef8e291271..f0cec9a92fd8 100644
--- a/arch/arm/crypto/Makefile
+++ b/arch/arm/crypto/Makefile
@@ -54,13 +54,14 @@ crct10dif-arm-ce-y	:= crct10dif-ce-core.o
crct10dif-ce-glue.o
 crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
 chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o

-quiet_cmd_perl = PERL    $@
-      cmd_perl = $(PERL) $(<) > $(@)
+define filechk_perl
+	perl $<
+endef

 $(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl
-	$(call cmd,perl)
+	$(call filechk,perl)

 $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
-	$(call cmd,perl)
+	$(call filechk,perl)

 .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S

  reply	other threads:[~2018-03-11  0:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:25 arm crypto .S_shipped files sometimes get rebuilt randomly Leonard Crestez
2018-03-08  5:00 ` Masahiro Yamada
2018-03-08  7:02   ` Ard Biesheuvel
2018-03-08 14:11     ` Leonard Crestez
2018-03-08 23:19 ` a Heisenbug tale (was: Re: arm crypto .S_shipped files sometimes get rebuilt randomly) Rasmus Villemoes
2018-03-09  9:45   ` Ard Biesheuvel
2018-03-11  0:56     ` Rasmus Villemoes [this message]
2018-03-12 16:52     ` Leonard Crestez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24703f21-6125-030d-e2ab-4b91cb5c25f8@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=ard.biesheuvel@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®