From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB47D1A254E for ; Thu, 18 Dec 2025 21:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766092381; cv=none; b=Dzk3FMDqtrKxy1I/wYd7jtNI1CddkkY2W8CLy+SwL68hcHuQUxvI34EHlUDHY0+bN0+658Z4hNJGu4QgbLF/jRSqavA8rQclaxAM2Kr1KvEUcUv936oXkQECqTmlqXYByNrISciE5GcfTh/IN3DIiWiA4TPQSfxxCMYQ6My/Rgk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766092381; c=relaxed/simple; bh=cqUjv37bQrHWjLeiJzydyeedJGJwjMmSj74naJ3C0pE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mfIWzlcyUuH44U9bX+W+2X24/eWY+sKEC2wqgA8LABBFRAx8Ro99QMElVzyEJZOZV8hfQ5dmqORKM0NKayIii9D/7Z3/hGLh+Y2dSefludqCZBE2ZIO22TracrHczKqonikvy7NFY8OrKV13boBUNfnXFO1b/7fop1QRvxW53vc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z6sAC4Fi; arc=none smtp.client-ip=209.85.160.49 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.b="Z6sAC4Fi" Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-3ec47e4c20eso725578fac.1 for ; Thu, 18 Dec 2025 13:12:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766092378; x=1766697178; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=c9tipiql2onxACO3kjd/0S/XiUV13p9feMh/zj3zK8U=; b=Z6sAC4Fifcf2I+EfH36T7uMhkZ34bs4oz9SdOm/FZe7qPOkRbMWrQoYM0u+C5qNr54 KBPIkRmTmf6hQH6O8QRqXsl/zOhx7HxnqBXgfGp+GaeG7PKZMdEK+bbYQ/FL05QnKdk4 uNC/QfFeb6xAKcR2yFO0/2XGupIZ0NMUEblnusBpZacnYvtpqOr5bWK6RFmEFlFKI3aw x6nvlAQmXNRzIqWnN4u0n48+ZAxPO9qX2LbRLozIMpVAVD6CHUvZcSSqMUgf09iZ7Mzq beOu2Hm4DwcdsZ9oll0bLiaM71do/AtB5qPXA+aC9C9uv44mbb6M9BvZG251efKfJBcf CKUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766092378; x=1766697178; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c9tipiql2onxACO3kjd/0S/XiUV13p9feMh/zj3zK8U=; b=P77opp8yYipIOyCX0rOkgltQxz1kRt43HTQn1oHWVZmScXPRweH0tYKguMk7uiAo/N aS2kg9qvYd81wk5728LdRJxUS1G21tVLtPI+fX1Pd1+zemmpWeM6rflGWKe1L9xo8tK5 mjuy3xR8jFhMmvmBD+IA+Zcm+l/bFqkbjL1lQ5qgSQP39M0P1qyjWopvLeZ/yqbvIYUs ZvGthKzWWz5peoiOirDkY5S080y4mEDjNJ8HBofp2S+XB/OrHkkEDa8Lv/3GeDMaIyfm 9x78nNEhP1hABO1W/CwEVmAWW7dziguXx1cRopDpKTRtDsQYXOKMWBl8eCcuCt9bJtnD 0ToQ== X-Forwarded-Encrypted: i=1; AJvYcCV778ts1Dwc/Zp04n5SRTd+DE5f7GVmIswYviYN7j2L2Hb3cM5dPCpfG2/qz46NmlMimnIPcagWg/2GEbY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7VeMQHbmsxicigi2DIYxOsmyUCiyGqbuIVQpiO0J9VgI/vzbC 8wKMuSL7JSaIkr1tOkw47uCFNzyWL1309LQXGBcBJsdOOM3JUi3UsUa3 X-Gm-Gg: AY/fxX6kVm1XinBf8FoQOG4C6P6znhTSj6jPF3XWMoFX0ko2C2k4hbL7Iv3M0ME7kR1 kLU+wQbZZaQQTPJldhOvVMjOV78AFxKOFCtf+7DiP4GV92t5Vox2gUqscO+O5Uvicbzhe0njnl+ 52/23YsM85KtL/fj6Rb867spNqxDiocJ/m8RmcVDQEgtkwOD5KEpIAmXQljKtTkZTtiv+xmLFbD mNXEDxjOOxEdb2r/ynUQ8AYtyzmdHuILavFOTcFm+XlEKIjHkwNJpMmUiyw/8HnGlJTBAmlHojR OKJm8YdBZWWFydTgq5xEJwdkIao+loPXbCOmRAxi9TEZWpRSeg7P/kGG9mqa3Gi2XLLbsb8ppOR qNLO/7Osy3lzpBsx79hB8bKF7JA7ztOs6nMmqtwyijVfVaj6mbM/HDF9d1HKFrgb+sQGlFyuJdf VBGE8voxKF3JlUEkf3LJCqKGWvytNb5yoAmeFO X-Google-Smtp-Source: AGHT+IFmxk3YATonxLCiLcbn2iIMS7nFOUUgNJH1YIJWm9l0xXgphXvwi2zor2XCGLSbRXvcDbeAAQ== X-Received: by 2002:a17:903:1249:b0:2a1:3cd9:a734 with SMTP id d9443c01a7336-2a2f2a4f99emr2804215ad.43.1766085667750; Thu, 18 Dec 2025 11:21:07 -0800 (PST) Received: from ?IPv6:2a03:83e0:115c:1:d912:2088:c593:6daa? ([2620:10d:c090:500::7:e642]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a2f3c9b52asm566865ad.45.2025.12.18.11.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 11:21:07 -0800 (PST) Message-ID: <8be2cafa00b759220e73a6ce837ac9a3ff52da1f.camel@gmail.com> Subject: Re: [PATCH bpf-next v4 5/8] kbuild: Sync kconfig when PAHOLE_VERSION changes From: Eduard Zingerman To: Ihor Solodrai , Alan Maguire , Alexei Starovoitov , Andrea Righi , Andrew Morton , Andrii Nakryiko , Bill Wendling , Changwoo Min , Daniel Borkmann , David Vernet , Donglin Peng , Hao Luo , Jiri Olsa , John Fastabend , Jonathan Corbet , Justin Stitt , KP Singh , Martin KaFai Lau , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Shuah Khan , Song Liu , Stanislav Fomichev , Tejun Heo , Yonghong Song Cc: bpf@vger.kernel.org, dwarves@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev Date: Thu, 18 Dec 2025 11:21:04 -0800 In-Reply-To: <20251218003314.260269-6-ihor.solodrai@linux.dev> References: <20251218003314.260269-1-ihor.solodrai@linux.dev> <20251218003314.260269-6-ihor.solodrai@linux.dev> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2025-12-17 at 16:33 -0800, Ihor Solodrai wrote: > This patch implements kconfig re-sync when the pahole version changes > between builds, similar to how it happens for compiler version change > via CC_VERSION_TEXT. >=20 > Define PAHOLE_VERSION in the top-level Makefile and export it for > config builds. Set CONFIG_PAHOLE_VERSION default to the exported > variable. >=20 > Kconfig records the PAHOLE_VERSION value in > include/config/auto.conf.cmd [1]. >=20 > The Makefile includes auto.conf.cmd, so if PAHOLE_VERSION changes > between builds, make detects a dependency change and triggers > syncconfig to update the kconfig [2]. >=20 > For external module builds, add a warning message in the prepare > target, similar to the existing compiler version mismatch warning. >=20 > Note that if pahole is not installed or available, PAHOLE_VERSION is > set to 0 by pahole-version.sh, so the (un)installation of pahole is > treated as a version change. >=20 > See previous discussions for context [3]. >=20 > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tr= ee/scripts/kconfig/preprocess.c?h=3Dv6.18#n91 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tr= ee/Makefile?h=3Dv6.18#n815 > [3] https://lore.kernel.org/bpf/8f946abf-dd88-4fac-8bb4-84fcd8d81cf0@orac= le.com/ >=20 > Signed-off-by: Ihor Solodrai > --- When building BPF selftest modules the pahole version change was detected, but it seems that BTF rebuild was not triggered: $ (cd ./tools/testing/selftests/bpf/test_kmods/; make -j) make[1]: Entering directory '/home/ezingerman/bpf-next' make[2]: Entering directory '/home/ezingerman/bpf-next/tools/testing/self= tests/bpf/test_kmods' CC [M] bpf_testmod.o CC [M] bpf_test_no_cfi.o CC [M] bpf_test_modorder_x.o CC [M] bpf_test_modorder_y.o CC [M] bpf_test_rqspinlock.o MODPOST Module.symvers CC [M] bpf_testmod.mod.o CC [M] .module-common.o CC [M] bpf_test_no_cfi.mod.o CC [M] bpf_test_modorder_x.mod.o CC [M] bpf_test_modorder_y.mod.o CC [M] bpf_test_rqspinlock.mod.o LD [M] bpf_test_modorder_x.ko LD [M] bpf_testmod.ko LD [M] bpf_test_modorder_y.ko LD [M] bpf_test_no_cfi.ko BTF [M] bpf_test_modorder_x.ko LD [M] bpf_test_rqspinlock.ko BTF bpf_test_modorder_x.ko BTF [M] bpf_test_no_cfi.ko BTF [M] bpf_test_modorder_y.ko BTF [M] bpf_testmod.ko BTF bpf_test_no_cfi.ko BTF bpf_test_modorder_y.ko BTF [M] bpf_test_rqspinlock.ko BTF bpf_testmod.ko BTF bpf_test_rqspinlock.ko BTFIDS bpf_test_modorder_x.ko BTFIDS bpf_test_modorder_y.ko BTFIDS bpf_test_no_cfi.ko BTFIDS bpf_testmod.ko OBJCOPY bpf_test_modorder_x.ko.BTF BTFIDS bpf_test_rqspinlock.ko OBJCOPY bpf_test_no_cfi.ko.BTF OBJCOPY bpf_test_modorder_y.ko.BTF OBJCOPY bpf_testmod.ko.BTF OBJCOPY bpf_test_rqspinlock.ko.BTF make[2]: Leaving directory '/home/ezingerman/bpf-next/tools/testing/selft= ests/bpf/test_kmods' make[1]: Leaving directory '/home/ezingerman/bpf-next' [~/bpf-next] $ (cd ./tools/testing/selftests/bpf/test_kmods/; make -j) make[1]: Entering directory '/home/ezingerman/bpf-next' make[2]: Entering directory '/home/ezingerman/bpf-next/tools/testing/self= tests/bpf/test_kmods' make[2]: Leaving directory '/home/ezingerman/bpf-next/tools/testing/selft= ests/bpf/test_kmods' make[1]: Leaving directory '/home/ezingerman/bpf-next' ... update pahole from version 131 to 132 ... [~/bpf-next] $ (cd ./tools/testing/selftests/bpf/test_kmods/; make -j) make[1]: Entering directory '/home/ezingerman/bpf-next' make[2]: Entering directory '/home/ezingerman/bpf-next/tools/testing/self= tests/bpf/test_kmods' warning: pahole version differs from the one used to build the kernel The kernel was built with: 131 You are using: 132 make[2]: Leaving directory '/home/ezingerman/bpf-next/tools/testing/selft= ests/bpf/test_kmods' make[1]: Leaving directory '/home/ezingerman/bpf-next' Is this an expected behavior?