BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Breno Leitao" <leitao@debian.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v5 3/7] bootconfig: render embedded bootconfig as a kernel cmdline at build time
Date: Wed, 17 Jun 2026 11:37:00 +0000	[thread overview]
Message-ID: <20260617113701.0405E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260617-bootconfig_using_tools-v5-3-fd589a9cc5e3@debian.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unquoted `CC=$(HOSTCC)` in the top-level Makefile breaks the build when `HOSTCC` contains spaces (e.g., `HOSTCC="ccache gcc"`).
--

commit 9679f5db7f804f330ff90fdcd19d5b8a66732ef3
Author: Breno Leitao <leitao@debian.org>

bootconfig: render embedded bootconfig as a kernel cmdline at build time

This commit adds a build-time pipeline that renders the "kernel" subtree of
CONFIG_BOOT_CONFIG_EMBED_FILE into a flat cmdline string. It wires up
tools/bootconfig in the Makefile's prepare target to generate the
embedded_kernel_cmdline array.

> diff --git a/Makefile b/Makefile
> index 7a9385dab39ab..6cb2bec7bfe78 100644
> --- a/Makefile
> +++ b/Makefile

[ ... ]

> @@ -1549,6 +1549,21 @@ prepare: tools/bpf/resolve_btfids
>  endif
>  endif
>  
> +# tools/bootconfig renders the embedded bootconfig into a cmdline at build time.
> +ifdef CONFIG_BOOT_CONFIG_EMBED_CMDLINE
> +prepare: tools/bootconfig
> +endif
> +
> +# tools/bootconfig is run on the build host during prepare, so force a host
> +# binary here; its own Makefile keeps $(CC) for standalone and cross builds.
> +# CROSS_COMPILE= is cleared so tools/scripts/Makefile.include does not inject
> +# the target's --target=/--sysroot= flags into the host clang invocation under
> +# LLVM=1 cross builds (which would produce a target binary that fails to exec).
> +tools/bootconfig: FORCE
> +	$(Q)mkdir -p $(objtree)/tools
> +	$(Q)$(MAKE) O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ \
> +		bootconfig CC=$(HOSTCC) CROSS_COMPILE=

[Severity: Low]
Will this break the build if HOSTCC contains spaces, such as when using a
compiler cache wrapper like HOSTCC="ccache gcc"?

If $(HOSTCC) is unquoted, Make might interpret the space-separated words as
separate command-line arguments to the sub-make. This could result in the
sub-make setting CC=ccache and attempting to build a target named 'gcc'.

Could we quote the variable like CC="$(HOSTCC)" to prevent this?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260617-bootconfig_using_tools-v5-0-fd589a9cc5e3@debian.org?part=3

  reply	other threads:[~2026-06-17 11:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 11:23 [PATCH v5 0/7] bootconfig: embed kernel.* cmdline at build time Breno Leitao
2026-06-17 11:23 ` [PATCH v5 1/7] bootconfig: fix NULL-pointer arithmetic in xbc_snprint_cmdline() Breno Leitao
2026-06-17 11:23 ` [PATCH v5 2/7] bootconfig: render descendant keys when xbc_snprint_cmdline() root has a value Breno Leitao
2026-06-17 11:23 ` [PATCH v5 3/7] bootconfig: render embedded bootconfig as a kernel cmdline at build time Breno Leitao
2026-06-17 11:37   ` sashiko-bot [this message]
2026-06-17 13:30   ` Nicolas Schier
2026-06-17 11:23 ` [PATCH v5 4/7] bootconfig: clean build-time tools/bootconfig from make clean Breno Leitao
2026-06-17 13:45   ` Nicolas Schier
2026-06-17 11:23 ` [PATCH v5 5/7] bootconfig: add xbc_prepend_embedded_cmdline() helper Breno Leitao
2026-06-17 11:23 ` [PATCH v5 6/7] Documentation: bootconfig: document build-time cmdline rendering Breno Leitao
2026-06-17 11:23 ` [PATCH v5 7/7] x86/setup: prepend embedded bootconfig cmdline before parse_early_param Breno Leitao
2026-06-17 11:43   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260617113701.0405E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=leitao@debian.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox