From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796025181; b=YCsmeqdMJlPupwamcOEE4+PgLoQjokWY4OzzBy0IhqCIhItyzO38VIwS0np5D1xG7DHE tk49B8uhFutmQApAQK/NWbWk//8d87keNxfq2exwBg0xFJAeL92ogeeQHgX72oEr6Fbcy 2cu73H50Pb2ckk4dAx00CcARcWM6nyk31JLDZjfLtIaDKqgwb9Pb8YOKXyPTMXz/mhay/ uuxi0+FslLI3kdSV7tmLN2WtoksA6S5TOvytrmIyB7aaviMCRqS/tsLEB8iVYQ9vWo6qk jzNdzpJg2T0iIuQvo1YcNavap4nNDMNWUbLizS2Ba6gYJ0lEvQelPlsLj59QRHxzYLA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796025181; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=kcMzilirh+r6uWMO21oCnUXHhtSu/YTi1er0e3ErLsw=; b=vBjZCJ092QP2HTXfTXcSdwBO9uHltMKfM4SVlXZKZKCMrAAVcWCvHWDpZONjb4rKCnOi vvFVvJbmmrLjKrfZuAa0faL//LVKffq3AGTBzfXkgFdIOpku/KccnPcyTIk5SRAxn37lm 5wOHkCB2ZGqYxjsXqLgOXTnexdk5euWLxy6XLIyiY6lD5d1BsTXCMlV6yzVAPzjDf8dNU Pmzy2KdySfkr92j7/34RrfvDpqdWGmxI8j93HLAYhLa2lXtvKcQ++9y+PugQBGVyb820K GkF2DCIPhiecXMbr1mqLp1IlGyJyYgR1VyAfnlQ0WMjs3Gnn9ZNPa3ytZoBbOFxPMsQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=pr8Pss4H; arc=none smtp.remote-ip=209.85.216.51 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 015FA606A31C for ; Mon, 30 Nov 2026 07:53:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 015FA606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=pr8Pss4H Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-3b41e5a1719so4142723a91.3 for ; Sun, 29 Nov 2026 23:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796025180; x=1796629980; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=kcMzilirh+r6uWMO21oCnUXHhtSu/YTi1er0e3ErLsw=; b=pr8Pss4Hh/KBl/RA3DVLMLFi9z8Z+l6wQJIbzA5ysyJd5zzpQdhGl3+E9O7fevSsI+ psOnwuZKKJEatGtqdiG65JXMu++gFJugvAMJ4taVe57vV7aEKOTEQyD534ej0u/MP9Zi OLLafDIoqeVt9/6ZQPHgLuxyaShg+3ZYZqI4S/FnegjoDBUGYCheqQAQrS52Kj0RcL1j gE7hG3N56O85ebnzdy7emOtOJ9Yuq5g49jbyAopi3LrJ/Z94MPU9jmP1C3XpAapclrRO sLN66mS31tnXtxCcyqywqRoQh8IXBO5EVom5HqlqcxTkScBqTYKVSIVIw1htwPt9QANI ZUGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796025180; x=1796629980; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kcMzilirh+r6uWMO21oCnUXHhtSu/YTi1er0e3ErLsw=; b=NtpgIMim7awxr6fIfmEt9o7Pmzlce/r4+rvCTon5wICEon5OOPhXveNV3nkjBbBwr6 54FeyZcZtuF3ye4yGpsQ+gq1AY5CITJP3NTMxz9RGhgy7rU22DUIQ96nscRc5vruP+KR 1m9J/KHUbOTXnnT8kMcr1hP3l9K03Rn+x3HZ7daiYu2phhKeDOK+54MPebc2PfdBR0Hq lcvYmvoR3BdNlZ6h6wpQin1OhSRfPcns5gBUrWk5P+R1icJBbVKiF0GCfYFsixeUdVK4 TdgtDZyh/hAwBiFyMWFZ6Lcsin/g98UQePtN5hm0DF0pF9qmb4fhj0y2PLCFOXmrYC8b 16HA== X-Forwarded-Encrypted: i=1; AL+hErEdTALO08ZUY++Jhj/yB8xFHugQiqygZ3RteMWSo2H4ccQJhFSTUf/Lru8qed2Q188NzJy8fQKxBjEyWV8=@vger.kernel.org X-Gm-Message-State: APuU4Z+IbXR2JJDl83LreRxE/QRr30yndwjEKCLVmcAHA5qUNx4Kve7O UYBSTSrNz9hXOi9BhraFjBZl7zVUHnxYdz93CdeWvl7T8ZETeuW1YFqu X-Gm-Gg: AZFdTZdpaOWh0URkP16sV7mQB9GP19ikgXKT7l0V1cAzkjBVo/6QTH+7k/SWGjt1nz1 5Bd+1IBR48lHY3TSPi/d/y46UyYhfDPjhGlkZk67p+YT5gKNsZv07gHPWVF94rDrCrUTHdv2h/R BbxdBLidbLCSrjeEklnmfP92OLwIsuJNZnccpYF2ffrNz6zBFZ4dPPOZPk+sy7qUhCJkEi6KiTr vG+rK6LhMKVOU6dPh7CSJ9lIjhCA+YNKT8kVqwIni55Sb02JZ1oLmIAAu9Y96+rXF9XxcSIBY2H S5Nv5vRBz3A/WcOISTEs+7f9Yqan1FLSTLxTqAVVgx+7TZrwA68yaqXYX99wz0OpNpesXmazYRt kfTFJBBH2jAj61YBMHM3BSttrg+lQyCywelti45OuATA00bh3dkyoFC5OUCoMKW3pV2Fs/LAVqA EDcbX2ctayhSLSrEb+49tSqIYUkMgiB5+JAnqMsofgzEfcUT9nbJX7rCiTA9QlEWVG6HkVsOPEF HzdOlIC6H2+QRqyfdPUaaP7BKIiT/HMq2D+oLW3CT1biFMZSbWU819qpBeWKEY1JtIoxDbCrcQC v2EnChY/ZqhFjxpra/WuhuLbMmZd6ixxg/gxavAoNQM9Tv2cKH8mKzcDxuaZba8tK4YJreA68ru hE7N+Y5offpDW X-Received: by 2002:a17:90a:ec88:b0:3b1:3e7a:6d8e with SMTP id 98e67ed59e1d1-3b41c8e0c73mr28264023a91.10.1796025180362; Sun, 29 Nov 2026 23:53:00 -0800 (PST) Received: from localhost.localdomain ([2001:d08:2217:b3e3:b06a:f264:36d2:5fea]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b40a878d50sm54153698a91.11.2026.11.29.23.52.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 29 Nov 2026 23:53:00 -0800 (PST) From: Daniel Syauqi To: Nathan Chancellor , Nicolas Schier 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 Message-ID: X-Mailer: git-send-email 2.54.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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