mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Syauqi <syauqicode@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] scripts/config: fix string handling in --set-str and --state
Date: Mon, 30 Nov 2026 15:52:47 +0800	[thread overview]
Message-ID: <cover.1796024119.git.syauqicode@gmail.com> (raw)

Two operations in scripts/config can silently change a string. When
--set-str updates an existing assignment, an ampersand in the new value
expands to the old config line. When --state reads a string such as
"-n", echo consumes it as an option and the query writes no output.

The first patch fixes the escaping on the update path. The second fixes
readback and can be reproduced with a hand-written .config.

Both failures were reproduced on v7.4-rc5 in an arm64 Lima guest. With
the series applied, an out-of-tree arm64 defconfig retained the literal
CMDLINE value "a=1&b=2" and LOCALVERSION "-n" across make olddefconfig.
Chained --state queries returned both values, each on its own line.

I used OpenAI Codex to identify both bugs, draft the fixes and commit
messages, and run the tests in Lima.

Daniel Syauqi (2):
  scripts/config: preserve ampersands in string values
  scripts/config: print string values literally with --state

 scripts/config | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

             reply	other threads:[~2026-11-30  7:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  7:52 Daniel Syauqi [this message]
2026-11-30  7:52 ` [PATCH 1/2] scripts/config: preserve ampersands in string values Daniel Syauqi
2026-11-30  7:52 ` [PATCH 2/2] scripts/config: print string values literally with --state Daniel Syauqi

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=cover.1796024119.git.syauqicode@gmail.com \
    --to=syauqicode@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    /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

all inboxes | Powered by JetHome®