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  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:   Thu, 14 Jan 2021 17:07:46 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     jjohnson@...eaurora.org
Cc:     eberman@...cinc.com, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org, masahiroy@...nel.org,
        michal.lkml@...kovi.net, mkalikot@...eaurora.org,
        psodagud@...cinc.com, Sami Tolvanen <samitolvanen@...gle.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH 1/2] kbuild: simplify cmd_mod

> From: Mahesh Kumar Kalikot Veetil <mkalikot@...eaurora.org>
> 
> Modules with a large number of compilation units can exceed execv
> argument list resulting in E2BIG (Argument list too long) error.
> 
> Fix this by replacing shell 'echo > file' into a more native
> $(file op filename[,text]) option.
> 
> Signed-off-by: Mahesh Kumar Kalikot Veetil <mkalikot@...eaurora.org>
> Signed-off-by: Jeff Johnson <jjohnson@...eaurora.org>
> ---
>  scripts/Makefile.build | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 4c058f1..252b7d2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -279,10 +279,11 @@ $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE
>  	$(call if_changed_rule,cc_o_c)
>  	$(call cmd,force_checksrc)
>  
> -cmd_mod = { \
> -	echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \
> -	$(undefined_syms) echo; \
> -	} > $@
> +cmd_mod = $(file >$@,\
> +		$(if $($*-objs)$($*-y)$($*-m), \
> +			$(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), \
> +			$(@:.mod=.o))) \
> +	$(undefined_syms) echo >> $@

I find the indendation to be a readability improvement. Thanks for the
patch.

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>

>  
>  $(obj)/%.mod: $(obj)/%.o FORCE
>  	$(call if_changed,mod)
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> 

Powered by blists - more mailing lists