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]
Message-ID: <ZyaUoGqu6bXDX26s@fjasle.eu>
Date: Sat, 2 Nov 2024 22:07:44 +0100
From: Nicolas Schier <nicolas@...sle.eu>
To: Vegard Nossum <vegard.nossum@...cle.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>, linux-kbuild@...r.kernel.org,
 Nathan Chancellor <nathan@...nel.org>,
 Michael Ellerman <mpe@...erman.id.au>,
 Morten Linderud <morten@...derud.pw>,
 Haelwenn Monnier <contact@...odan.eu>, Jann Horn <jannh@...gle.com>,
 Kees Cook <kees@...nel.org>,
 James Bottomley <James.Bottomley@...senpartnership.com>,
 Theodore Ts'o <tytso@....edu>, linux-hardening@...r.kernel.org
Subject: Re: [RFC PATCH 02/11] kbuild: document some prerequisites

On Mon, Aug 19, 2024 at 06:02:59PM +0200 Vegard Nossum wrote:
> When running 'make --dry-run', make will invoke itself recursively for
> recipes using $(MAKE), but otherwise not execute the other commands in
> a recipe.
> 
> However, if a prerequisite is missing and 'make' does not how to create it
> (which will be the case when running 'make -n'), it will complain with an
> error message like this:
> 
>   $ make -n
>   ...
>   make -f ./scripts/Makefile.modpost
>   make[1]: *** No rule to make target 'modules.order', needed by 'modules-only.symvers'.  Stop.
>   make: *** [Makefile:1868: modpost] Error 2
> 
> In this case, the top-level makefile has reached a recipe that ran 'make'
> recursively on scripts/Makefile.modpost, which itself has a rule with
> modules.order as a prerequisite. Since the file doesn't exist, and make
> doesn't know how to create it, it errors out.
> 
> We can document such prerequisites (which are expected to be created by
> the parent Makefile) by adding them to the PHONY list of each respective
> Makefile.
> 
> Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
> ---
>  arch/x86/boot/compressed/Makefile | 6 ++++++
>  scripts/Makefile.modfinal         | 5 +++++
>  scripts/Makefile.modpost          | 4 ++++
>  scripts/Makefile.vmlinux          | 7 +++++++
>  scripts/Makefile.vmlinux_o        | 3 +++
>  5 files changed, 25 insertions(+)
> 
> diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
> index f2051644de943..ccef6f0e04bc7 100644
> --- a/arch/x86/boot/compressed/Makefile
> +++ b/arch/x86/boot/compressed/Makefile
> @@ -80,6 +80,9 @@ quiet_cmd_voffset = VOFFSET $@
>  
>  targets += ../voffset.h
>  
> +# We don't know how to build this

A comment for documentation is a good idea, but I think this one is not very
helpful to those who don't know the patch description.  What about something
like this?

# Provided by a recursive-make predecessor


Kind regards
Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ