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] [day] [month] [year] [list]
Message-ID: <aSDBpKUe_nJq3h21@derry.ads.avm.de>
Date: Fri, 21 Nov 2025 20:46:44 +0100
From: Nicolas Schier <nsc@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@...ia.com>,
	linux-kbuild@...r.kernel.org,
	Masahiro Yamada <masahiroy@...nel.org>,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Rob Herring <robh@...nel.org>
Subject: Re: [PATCH] kbuild: fix compilation of dtb specified on command-line
 without make rule

On Thu, Nov 20, 2025 at 11:42:56PM -0700, Nathan Chancellor wrote:
> + Rob, as he reviewed e7e2941300d2
> 
> On Thu, Nov 20, 2025 at 03:06:43PM +0100, Thomas De Schampheleire wrote:
> > Since commit e7e2941300d2 ("kbuild: split device tree build rules into
> > scripts/Makefile.dtbs"), it is no longer possible to compile a device tree
> > blob that is not specified in a make rule
> > like:
> >     dtb-$(CONFIG_FOO) += foo.dtb
> > 
> > Before the mentioned commit, one could copy a dts file to e.g.
> > arch/arm64/boot/dts/ (or a new subdirectory) and then convert it to a dtb
> > file using:
> >     make ARCH=arm64 foo.dtb
> > 
> > In this scenario, both 'dtb-y' and 'dtb-' are empty, and the inclusion of
> > scripts/Makefile.dtbs relies on 'targets' to contain the MAKECMDGOALS. The
> > value of 'targets', however, is only final later in the code.
> > 
> > Move the conditional include of scripts/Makefile.dtbs down to where the
> > value of 'targets' is final.
> > 
> > Fixes: e7e2941300d2 ("kbuild: split device tree build rules into scripts/Makefile.dtbs")
> > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@...ia.com>
> 
> Huh, TIL that .c and .S files can be built in the same way...
> 
>   $ touch init/foo.c init/bar.S
>   $ make init/foo.o init/bar.o
>   $ ls init/.foo.o.cmd init/.bar.o.cmd
>   init/.bar.o.cmd
>   init/.foo.o.cmd
> 
> I do not necessarily love splitting up the conditional includes from
> each other but I am not sure it can be avoided... Nicolas, are you okay
> with me taking this as a fix or do you want to take it via kbuild-next?
> If the latter:
> 
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>

I am ok with you taking it via kbuild-fixed, thanks.

Kind regards,
Nicolas

PS: If I combine this here with [1], [1] does not work any more.
[1]: https://lore.kernel.org/linux-kbuild/20251120204812.1983452-4-robh@kernel.org

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ