Re: [PATCH] tools build: Fix quiet cmd indentation

From: Kees Cook
Date: Fri Apr 23 2021 - 15:06:25 EST


On Fri, Apr 23, 2021 at 03:54:15PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Apr 21, 2021 at 11:58:48AM -0700, Kees Cook escreveu:
> > The tools quiet cmd output has mismatched indentation (and extra space
> > character between cmd name and target name) compared to the rest of
> > kbuild out:
> >
> > HOSTCC scripts/insert-sys-cert
> > LD /srv/code/tools/objtool/arch/x86/objtool-in.o
> > LD /srv/code/tools/objtool/libsubcmd-in.o
> > AR /srv/code/tools/objtool/libsubcmd.a
> > HOSTLD scripts/genksyms/genksyms
> > CC scripts/mod/empty.o
> > HOSTCC scripts/mod/mk_elfconfig
> > CC scripts/mod/devicetable-offsets.s
> > MKELF scripts/mod/elfconfig.h
> > HOSTCC scripts/mod/modpost.o
> > HOSTCC scripts/mod/file2alias.o
> > HOSTCC scripts/mod/sumversion.o
> > LD /srv/code/tools/objtool/objtool-in.o
> > LINK /srv/code/tools/objtool/objtool
> > HOSTLD scripts/mod/modpost
> > CC kernel/bounds.s
> >
> > Adjust to match the rest of kbuild.
>
> Is this some recent regression? I never noticed this when build perf,
> with what I have in perf/urgent:
> [...]
> It seems nicely aligned:
> [...]
> GEN /tmp/build/perf/common-cmds.h
> CC /tmp/build/perf/perf-read-vdso32
> CC /tmp/build/perf/exec-cmd.o
> MKDIR /tmp/build/perf/fd/

This is a "tools only" build. I wasn't clear enough in my commit log
(sorry, I can fix that if needed): it's mismatched with regard to the
rest of the kernel's kbuild output. (And since objtool is built out of
tools/, I see intermixed indentation on parallelized x86 builds.)

And, in fact, you can see it just in our combined email reply
quotations. The first line is a build target from the main kernel (from
my email), and the second is a build target from tools/ (from your email,
with additional email-quote-prefixing added for comparison):

> > CC scripts/mod/empty.o
> > CC /tmp/build/perf/exec-cmd.o
--------------^

(I haven't looked into what's needed to strip $(obj) from the tools/
target output, but that isn't as jarring for me as the extra space.)

I also nominate myself for "most trivial patch this week" award.

-Kees

--
Kees Cook