From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3BB23D6674; Thu, 23 Apr 2026 04:04:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776917072; cv=none; b=PjAm0RIZ1dmjATl9ddY2VvenKp3n1xcdRXfA/o6FbfRveVI5+1/ZVXCAyBzNmttCOmAQ2OnQRKmJnwPhQoAh9QaEC1pZ6LjKdL1hgXnH+HP/6c8eNhG+T+uAZOK4dczLAEiMTzqPf4MHguNIXKBrz75BsUbnfdCHt6xF0vk+53I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776917072; c=relaxed/simple; bh=ks80gAFM+9j74ozL8rTgGc80chRVvZX5kr5nIZrm2Tw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H/gPp5H9ghfjfj1WwDvRIOYrWfZZr5ZMskNO+mN9eKCNe1OlChgwuJXtxtRaHtMiNuIlvoIl5HwRXIQnEfsCJg8niHfhya1LmXPyZcgaM2fjVrhQqTPWFDnvyBlZtr1be57BH0AsS/rmahUCX39i0B4+EybZkLaoJ9ySAO3Yn2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EW64AaX2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EW64AaX2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55751C2BCB2; Thu, 23 Apr 2026 04:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776917072; bh=ks80gAFM+9j74ozL8rTgGc80chRVvZX5kr5nIZrm2Tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EW64AaX2kYMDykl26Mi439TtATlDMaKbfnk8zNIC1O8Ti91qwrOSoyQ01zf9CNy4R n5wMB7sKnLnAIcz5K49m56MY5e5VFR6uENAe2vafjswJnmHpDshdc/ngckupsUvAvi Dzbmj1E68k1bHsOq3hLJgZZEPflUz+p2l5YCqhx4+LJ+1LQa9ZKCu4YfTo3QU4dHwY FpetTuFJwiz7TglKAcHfGhZ+dLUZlE+ZpRtJG6Sw8un8KPFW8SXaN3il2zBz+3frp+ /77S6ufJ+KFeS/W/09d/oQzB60qdtrZnAi41bO3qq2FbkxbQppuR2sL1FYtzlMYrKS ubHH5Lepex5Ww== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Peter Zijlstra , Joe Lawrence , Song Liu , Miroslav Benes , Petr Mladek Subject: [PATCH 18/48] klp-build: Fix hang on out-of-date .config Date: Wed, 22 Apr 2026 21:03:46 -0700 Message-ID: <1b3add71a35ff83fc9653c2c872b811cfd5629a3.1776916871.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If .config is out of date with the kernel source, 'make syncconfig' hangs while waiting for user input on new config options. Detect the mismatch and return an error. Fixes: 6f93f7b06810 ("livepatch/klp-build: Fix inconsistent kernel version") Signed-off-by: Josh Poimboeuf --- scripts/livepatch/klp-build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index 0ad7e6631314..81b35fc10877 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -306,7 +306,12 @@ set_kernelversion() { stash_file "$file" - kernelrelease="$(cd "$SRC" && make syncconfig &>/dev/null && make -s kernelrelease)" + if [[ -n "$(make -s listnewconfig 2>/dev/null)" ]]; then + die ".config mismatch, check your .config or run 'make olddefconfig'" + fi + make syncconfig &>/dev/null || die "make syncconfig failed" + + kernelrelease="$(cd "$SRC" && make -s kernelrelease)" [[ -z "$kernelrelease" ]] && die "failed to get kernel version" sed -i "2i echo $kernelrelease; exit 0" scripts/setlocalversion -- 2.53.0