lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Jul 2014 19:00:17 +0200
From:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Andreas Schwab <schwab@...e.de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm64/crypto: fix makefile rule for aes-glue-%.o

On 27 July 2014 20:40, Sam Ravnborg <sam@...nborg.org> wrote:
>>
>> > Btw. the current solution is already faulty - even with the fix.
>> > There are no support for make C=2 arch/.../crypto/
>> >
>>
>> So can you elaborate on how it is faulty?
>
> When you run "make C=2 arch/.../crypto/" then sparse shall be run
> for all .c files also if they are already built.
> But due to the re-implementation of some parts of the kbuild logic
> in the makefile this does not happen with the -glue file.
>
> A minor detail - but this may not be the only wreckage we see over time.
>

I agree. Any suggestions for a generic way to solve this? Perhaps
something like this in scripts/Makefile.build

template_rule = $(obj)/$(tmpl)%.c: $(src)/$(tmpl).c ; @cp $$(^) $$(@)
$(eval $(foreach tmpl,$(TEMPLATES),$(template_rule)))

so that arch/arm64/crypto/Makefile only has to define

TEMPLATES += aes-glue

so that all dependencies on aes-glueXXX.c are satisfied by aes-glue.c?

BTW, while looking into this issue, I noticed something else that is strange:
after touch'ing sha1-ce-glue.c in arch/arm64/crypto and re-executing
'make V=2', this is what I get

make[1]: Entering directory `/home/ard/linux-arm64-build'
  CHK     include/config/kernel.release
  Using /home/ard/linux-2.6 as source for kernel
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    /home/ard/linux-2.6/scripts/checksyscalls.sh - due to target missing
  CHK     include/generated/compile.h
  CC      arch/arm64/crypto/sha1-ce-glue.o - due to:
/home/ard/linux-2.6/arch/arm64/crypto/sha1-ce-glue.c
  LD      arch/arm64/crypto/sha1-ce.o - due to: arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/sha2-ce.o - due to: arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/ghash-ce.o - due to:
arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/aes-ce-ccm.o - due to:
arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/built-in.o - due to:
arch/arm64/crypto/sha1-ce.o arch/arm64/crypto/sha2-ce.o
arch/arm64/crypto/ghash-ce.o arch/arm64/crypto/aes-ce-ccm.o
  CHK     kernel/config_data.h
  LINK    vmlinux - due to: arch/arm64/crypto/built-in.o

IOW, unrelated object files are detected as being out of date. (This
is after running make mrproper, and with the aes-glue-% related rules
and definitions commented out, just to make sure this is not related
to the issue you have identified)

Any ideas?

-- 
Ard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ