From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1046BC636D6 for ; Wed, 22 Feb 2023 11:22:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231577AbjBVLW4 (ORCPT ); Wed, 22 Feb 2023 06:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231733AbjBVLWx (ORCPT ); Wed, 22 Feb 2023 06:22:53 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AECD72710 for ; Wed, 22 Feb 2023 03:22:49 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id cz22-20020a0564021cb600b004a245f58006so10755811edb.12 for ; Wed, 22 Feb 2023 03:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=k8GcqkkFXOmQfJIUtbmUr5k1z/whW+UlGQJ8Pnqpo3w=; b=byR2C1GGXLrWHhD76Mt/Tp3bc81XhWJlKfJSRUr4e0J6wKICHnj6e45RrbZdYuHGnX u1rg+7bBJheX2Nc6wahgC0+8ja0m2k7ymzsZvsoYTpFUrfBvxhlLjnMRvSF7ZefKYZZk VUHy2Qr4IPZ+Qp9mnukVY9IdNwSRSF9rF1EnR71dD9uVX5D41UVW991GnvFgYjn2+9mI V+MuAFCYzWR31rIsj2R4e+mVne3g8CF3pMPXQd3gHKaQilhYK1a2PomqRKk+mxeXPxup JcAXTEdl5nYqP8WXIZa3C/EbTY+qsNqblairpYOHy00IT73/Z/bdcjzqTIgCDkrVxPyv 9JIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k8GcqkkFXOmQfJIUtbmUr5k1z/whW+UlGQJ8Pnqpo3w=; b=Y238Y5gLANfsOzh8/4K/EkCtheb5hV9yHGSErICGGwyd8pKYUMa4fDZs0Ic7ELkrXP tuDhBydSXHzFpMnsPPaOV9VQkwBGvkwtXEtwYfl/Oa2fnzIcwocaIRWJMvrqSSQN1nQ/ E1h0jOvnlqpOSYDHbPWKC+qAnpshQMFFujKZkqzR+vspx6cGmoPY6/PJsEOzlzcEoNW6 BPzs91WXqjNtogJikJC45w/iHJiFbRVBn1BKGzJl1kfR6Zzx/lrFPuSscr8jLvxy4YLJ PMgqQX7rJdqqlEf+lZ8LyEg2Fiv+q/SXAJysEUsv6acIHiDXkPc+Fk/fhdEJly6sYIrO mNnQ== X-Gm-Message-State: AO0yUKVbWvMkaKh33pAmbB9Sdgk7GTxEeEpbTrkK1bLnBp2Rb+KN49zv 4e7KD8IbG0fsURucm8x2JEPVq/snm88sTAvoBJJQ7GTC1fzT0cCmF9ewNjHw3+XLLQQYJMRAnNe bt0WVRlF1v6bJTmHWXzTwIZbZc4F8NpWJgw4f65ujABkYdlv/0U10+QDRBgj3US+xFT2ZfrY9Gb U= X-Google-Smtp-Source: AK7set9e4WYPVXK1XRVvrsjuSEygc+0lYmRc5aSLwtIGvMcYo8p3s1R4GwNBvn3YhptHYa7gsLOhwjyidAO5fg== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:35a9:4800:d90c:e9bc]) (user=maennich job=sendgmr) by 2002:a17:906:22db:b0:8ea:a647:ae5d with SMTP id q27-20020a17090622db00b008eaa647ae5dmr1111eja.13.1677064968205; Wed, 22 Feb 2023 03:22:48 -0800 (PST) Date: Wed, 22 Feb 2023 11:21:39 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230222112141.278066-2-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH 1/5] MAINTAINERS: Add scripts/pahole-flags.sh to BPF section From: maennich@google.com To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor Currently, scripts/pahole-flags.sh has no formal maintainer. Add it to the BPF section so that patches to it can be properly reviewed and picked up. Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-2-nathan@kernel.org Signed-off-by: Matthias Maennich --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4f50a453e18a..176485e625a0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3407,6 +3407,7 @@ F: net/sched/act_bpf.c F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py +F: scripts/pahole-flags.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F2AC636D6 for ; Thu, 23 Feb 2023 11:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233859AbjBWLyE (ORCPT ); Thu, 23 Feb 2023 06:54:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233808AbjBWLyA (ORCPT ); Thu, 23 Feb 2023 06:54:00 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E541D279A3 for ; Thu, 23 Feb 2023 03:53:58 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-536c8bcae3bso111716837b3.2 for ; Thu, 23 Feb 2023 03:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=N8HNcqhgVSPQjofHY9HHdIOhJTzECil/jKWvuQznJ68=; b=Z3UuFNSReuZnspRBUTXn6xA0XjsS6l9KP5XVnWEdr9dGHjRh1pl/bW1vjts/JQ0v3z 0319caZbtMTvuy3cW8JqhJ3jT92gRYutd7S+XmN8B8Z+dRbaTAbQtQ8Dv/kPuuMnUxty alkzx7gAB7iqJ/lxcT0AS9VT1kyCAsVqRjafog2bRM6t9vrG+3Z92Htr9whhxOm8FaAI g/9whJggh8+IxLCUYFNE1Kb5+0f/zYP7JGThoXcdqQagtbEY4VvSBI+JQuXk52vVF4Su W7+WNUI1LG85bAyQZioDjBw/GNDgMP2ir2v+fHy8jyZ8stulAmicI6xBU+N9iaACdNoM 65/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N8HNcqhgVSPQjofHY9HHdIOhJTzECil/jKWvuQznJ68=; b=4J8JRljnk/Z0fDQj1vqlLHRSOEz79Tel4OuWbVNBMFBoSmzIIrnUS2Wa6q17ORywsb eEADNPUBjx2Xca5ua/lVcqPiK/hykhQHkZduhiQiB5fmmLlJzGq/0wn74cBNTPOfK5u/ 2Q/MX2ekLlE7fF/lFLAJefBfw3PY3GaTkkAz5tlmc28cyBhB4ZMAVJAeDzZIII3to3cA 6dkli+ESaVPgfF7OdsXnRLlXucvq8pkiIASAiK/JGk/CALs3pSdLDUttCyfJmUHpDy+1 SfOWwU6maK6NGXxPnqBHZkOk9ajuYXGqRwioMaLUcialNPKspTW5fYfXZR1XvPnrTlm+ qqNg== X-Gm-Message-State: AO0yUKUhigvIgiHw+lynTi368NHLkwfM6caFCpl+5oBt/ZIrT7/g2bwO v5rby9BQnmU2avYa1f/5N5oujZq8GtQxQguUQy5zUQGWbSOilyZGk7L/j5mwQkcRbfOri/RP/Mr qnFgAqryAmmFGV6ZYhDxwjLdqqaVlB8Sv77Ibb3bQFXTdMSaTb63XOfX1KX/ZFZd2nAe8kpRWls c= X-Google-Smtp-Source: AK7set+I4E8Ic9RobItVWKhwGewzOFBfJwr18n2356kXAEqAzOXFphfRQxMcgfc12aDp1ZnI6wg2wBpW2AzF/g== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:cf33:dc28:3e98:f5e9]) (user=maennich job=sendgmr) by 2002:a0d:d503:0:b0:52e:d56b:18c3 with SMTP id x3-20020a0dd503000000b0052ed56b18c3mr1071272ywd.74.1677153237942; Thu, 23 Feb 2023 03:53:57 -0800 (PST) Date: Thu, 23 Feb 2023 11:53:48 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230223115351.1241401-2-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH v5.15 v2 1/4] kbuild: Add CONFIG_PAHOLE_VERSION From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor [ Upstream commit 613fe169237785a4bb1d06397b52606b2967da53 ] There are a few different places where pahole's version is turned into a three digit form with the exact same command. Move this command into scripts/pahole-version.sh to reduce the amount of duplication across the tree. Create CONFIG_PAHOLE_VERSION so the version code can be used in Kconfig to enable and disable configuration options based on the pahole version, which is already done in a couple of places. Change-Id: Id18c1808832cead0d32f6992a52eb35b0ec269bb Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-3-nathan@kernel.org Signed-off-by: Matthias Maennich --- MAINTAINERS | 1 + init/Kconfig | 4 ++++ scripts/pahole-version.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 scripts/pahole-version.sh diff --git a/MAINTAINERS b/MAINTAINERS index 4f50a453e18a..826e2ba7b09a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3407,6 +3407,7 @@ F: net/sched/act_bpf.c F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py +F: scripts/pahole-version.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ diff --git a/init/Kconfig b/init/Kconfig index a4144393717b..dafc3ba6fa7a 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -91,6 +91,10 @@ config CC_HAS_ASM_INLINE config CC_HAS_NO_PROFILE_FN_ATTR def_bool $(success,echo '__attribute__((no_profile_instrument_function)) = int x();' | $(CC) -x c - -c -o /dev/null -Werror) =20 +config PAHOLE_VERSION + int + default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE)) + config CONSTRUCTORS bool =20 diff --git a/scripts/pahole-version.sh b/scripts/pahole-version.sh new file mode 100755 index 000000000000..f8a32ab93ad1 --- /dev/null +++ b/scripts/pahole-version.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./pahole-version.sh pahole +# +# Prints pahole's version in a 3-digit form, such as 119 for v1.19. + +if [ ! -x "$(command -v "$@")" ]; then + echo 0 + exit 1 +fi + +"$@" --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/' --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75F3CC433FE for ; Tue, 1 Feb 2022 20:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237248AbiBAU5K (ORCPT ); Tue, 1 Feb 2022 15:57:10 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58332 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236893AbiBAU44 (ORCPT ); Tue, 1 Feb 2022 15:56:56 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BD67161756; Tue, 1 Feb 2022 20:56:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CDE7C340ED; Tue, 1 Feb 2022 20:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749015; bh=JjYwktbzWgaZZwjKwRtnb1xc51qgqbnt81floObI+Ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=to+G9Qb5eqyzP8rsE+Jwnl3XgQEegaYvKjtUIXNeNSdePMOyhgkbmNe4/Yx5mSAuq G68kspeColB3L2HTB7TAqyf6eZZemWF9yeowZbU+4A3Esammaiyc77KDKspyPrB/CU lVXJsY8RN5ChGncKVo5b+ZqwK+Y56Sc6FuolYua270Hqy39EDWvWtipJ1lizK2Jda7 bfgK2XZvMTR7kMh+pIx8RL+RkRCQWQtO2gxcTvAsGctAMZeIfukeoGRK1OGFyNnow5 d0RSVaqHzoVD+kouQdPshWdBO/7wIBX7MMi+tNKBgiUHNVWsZaIdi72AUxHdFK9ugN kRTFBcGZAn1Kg== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 1/5] MAINTAINERS: Add scripts/pahole-flags.sh to BPF section Date: Tue, 1 Feb 2022 13:56:20 -0700 Message-Id: <20220201205624.652313-2-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Currently, scripts/pahole-flags.sh has no formal maintainer. Add it to the BPF section so that patches to it can be properly reviewed and picked up. Signed-off-by: Nathan Chancellor Acked-by: Andrii Nakryiko --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0d7883977e9b..0d422452c8ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3523,6 +3523,7 @@ F: net/sched/act_bpf.c F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py +F: scripts/pahole-flags.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ --=20 2.35.1 From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4DC4C61DA4 for ; Wed, 22 Feb 2023 11:23:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231864AbjBVLXN (ORCPT ); Wed, 22 Feb 2023 06:23:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbjBVLXF (ORCPT ); Wed, 22 Feb 2023 06:23:05 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED2D232E59 for ; Wed, 22 Feb 2023 03:22:59 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id co14-20020a0564020c0e00b004aab4319cedso9732036edb.2 for ; Wed, 22 Feb 2023 03:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=oUsFDIt+en/p6sUQPbh9dJjmzdUxDXKN1SBhXjDkwpg=; b=puensBLrVDEvzcWAY1rAWiStnl55c0wdEJrM2vMzD4oJJpRcg9t10FxEJubD8ByE16 TI1ljAOrxhayi/2hNV2E8VhN59tkDpznD+9svSEHZOt6khLSGcdWp4WP3DShE4Ym94qV SX3idukqNg7wQQKUB0RoXUZwVVaf2SYu/N1ghKdAqdRUAjNL8Vvp410PD2jdPtjVspZ/ 1BddfyIE2hWyADJMmIks6V95O4vBHM/mB6dyFjINUu37mOqVCBM+FtFfRbVXgMbNAiiP L6rbwASrp+aPMGkYxcsvWjoW9L+bKLmxjGz07wys3J2UVnfQKYa1iv2VN0OZFveIs6Tf L48w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oUsFDIt+en/p6sUQPbh9dJjmzdUxDXKN1SBhXjDkwpg=; b=xG21hWIBSf3112l+IUUGa0EkPnzdMhMLtxX17fIsNN8VOiw90/ZLXxlOLlJhKw2Bbf CbiDcZN8OGuTtjE7HMgp4sgfK6CeRZUkugAu/PZI6JgzwI4xg969Mhlmw8sZUkLg92We +r4sWHrWcQb3PkxcnfjosASpepatIXYkMhoAO5A844Yngwq0UeIO5eidpbFmcV5Jgj+e Aq4tuw+1DzPia+rlalVoaKFI5J2Ec4ZhG7Bs1bqdM4EkFZRj9hoftu6lLGA22Pb5Qq+L Nx0kZVBhkgRq0saT7bQkfMPlhxCkYKa2Pb0jW1835tgc09UVtoHfy6onHIUbLd6VMuGR VPpA== X-Gm-Message-State: AO0yUKVPyX25sGKZwwY/HO0CxirIitewKE7xbByzHq2gE2VQO7HiEc30 LbjsMUYCwTKSJz08ZtfUBO1KPnTxCAIkVO+JNdZf1XOOt9v0tce6dPF3xxQ97fIiO7qz7bRJmLI QvwQtar75ZSM6yQftMW16P0CsXvaY4zisPGSufQAkvfHb+1cTVwfF+OgMfYPLU/iKidKOJlpZjj M= X-Google-Smtp-Source: AK7set8f5p3oIRS4H5EM3Dhvo/hCfa9rAhtcBI5HzBpGDXxebJIOqfJnnE5Jl8UYZNNJEppXSUgZMpqc0dcorQ== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:35a9:4800:d90c:e9bc]) (user=maennich job=sendgmr) by 2002:a50:d701:0:b0:4ad:7265:82db with SMTP id t1-20020a50d701000000b004ad726582dbmr3597452edi.1.1677064978058; Wed, 22 Feb 2023 03:22:58 -0800 (PST) Date: Wed, 22 Feb 2023 11:21:41 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230222112141.278066-3-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH 2/5] kbuild: Add CONFIG_PAHOLE_VERSION From: maennich@google.com To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor There are a few different places where pahole's version is turned into a three digit form with the exact same command. Move this command into scripts/pahole-version.sh to reduce the amount of duplication across the tree. Create CONFIG_PAHOLE_VERSION so the version code can be used in Kconfig to enable and disable configuration options based on the pahole version, which is already done in a couple of places. Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-3-nathan@kernel.org Signed-off-by: Matthias Maennich --- MAINTAINERS | 1 + init/Kconfig | 4 ++++ scripts/pahole-version.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 scripts/pahole-version.sh diff --git a/MAINTAINERS b/MAINTAINERS index 176485e625a0..ee8a1b5c28a6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3408,6 +3408,7 @@ F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py F: scripts/pahole-flags.sh +F: scripts/pahole-version.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ diff --git a/init/Kconfig b/init/Kconfig index a4144393717b..dafc3ba6fa7a 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -91,6 +91,10 @@ config CC_HAS_ASM_INLINE config CC_HAS_NO_PROFILE_FN_ATTR def_bool $(success,echo '__attribute__((no_profile_instrument_function)) = int x();' | $(CC) -x c - -c -o /dev/null -Werror) =20 +config PAHOLE_VERSION + int + default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE)) + config CONSTRUCTORS bool =20 diff --git a/scripts/pahole-version.sh b/scripts/pahole-version.sh new file mode 100755 index 000000000000..f8a32ab93ad1 --- /dev/null +++ b/scripts/pahole-version.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./pahole-version.sh pahole +# +# Prints pahole's version in a 3-digit form, such as 119 for v1.19. + +if [ ! -x "$(command -v "$@")" ]; then + echo 0 + exit 1 +fi + +"$@" --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/' --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C67AAC61DA4 for ; Thu, 23 Feb 2023 11:54:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233761AbjBWLyL (ORCPT ); Thu, 23 Feb 2023 06:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233862AbjBWLyI (ORCPT ); Thu, 23 Feb 2023 06:54:08 -0500 Received: from mail-wr1-x44a.google.com (mail-wr1-x44a.google.com [IPv6:2a00:1450:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610F84E5DC for ; Thu, 23 Feb 2023 03:54:02 -0800 (PST) Received: by mail-wr1-x44a.google.com with SMTP id bh3-20020a05600005c300b002c70d6e2014so971418wrb.10 for ; Thu, 23 Feb 2023 03:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FE6DqTLa6oLIEcPK8T4wTKxiA51jr0clK07mi2rNw2M=; b=PCA1tagJIsI7O+0Bx91eiRyRj2mKFxg7YgxeG2hiFjGAkBFhJObVBdaX5v3431ZEvi QovW3mswBo0Dd4w+1Sv4M+dZfczp16Gn7Mz9NxP/t7fHurKot3MBQzldi8C6RdNScM0G 8TkJtO3v8/XSFVuN6CB8qbxamo1YbIspXY25ssxZuVbn+nXQb59erqHi0GEnBfTaArKz 0MpRsi+ZrngfSgMRwQgXbOusuOFa9Xxm0Q3AYvM6fFsw1KB71GawmE8BHB1dKkjQRdHj j8KxAU3QkdAjzM21kiTIzDS+t5wXvLAH6KlFpew7ja9CWa+YIK2QUqVPdToMzinhXFWP 3Ptw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FE6DqTLa6oLIEcPK8T4wTKxiA51jr0clK07mi2rNw2M=; b=QIy+KrgF5nOacekXtqQVsxMn4nhGr1M80YH60Xsvt7PdmZqyVTB86qU/fZ6Sp466od UxrZwaLwQQXtywdH7SUi4xx6ke0cA0To5Nm0lrZ+LD9XHPgjRJLX3PMs0Zqooj9M8MID 0UkDaSi+Lr7hgTSGuHhQE5JXAN5eHePxPaofg38Q0vjInrVkd1apVUWFYl5pDGXcfc75 s0aYmb3h3xHgYgr/3928QzYgBW9QDyd+ILEfr2+yT4lPq4M9yVJp5IHAWEtzFod6jNed wcOkVZIVhROOXTpLsTDvPhz/74oMC37Ga0Gu9rMY1hYbc/Xj07fwNCNiLezaPPt5CO9q MsZA== X-Gm-Message-State: AO0yUKVlf/5+EE0C93tnN3zNijaUjODVLR8L59fqsbSZ2LzHwI31IspR n35cUZ4opw+/2eeNe2np46pPv7hd3s+iLr9Lj+T/Q7rl2r03saOpchwkJz4v8Xl9jTb+0JroLWG 6KI2It1qgwfUqBHb6tpdNei3mjVdHeXbdfvpH/ASeMdI8XVBn2Pf+RFvATAvIWO/kKBZ2IDywk7 g= X-Google-Smtp-Source: AK7set+MzHKyhEA2oOA6t+AlfF6nP4ofet3+WO/YMFBvJ6teFYUWCd8hM7C3mV/3f3gi+7jzaSX8rRR7sv2Pcg== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:cf33:dc28:3e98:f5e9]) (user=maennich job=sendgmr) by 2002:a05:600c:1c04:b0:3dd:b278:27e9 with SMTP id j4-20020a05600c1c0400b003ddb27827e9mr1415658wms.71.1677153240667; Thu, 23 Feb 2023 03:54:00 -0800 (PST) Date: Thu, 23 Feb 2023 11:53:49 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230223115351.1241401-3-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH v5.15 v2 2/4] scripts/pahole-flags.sh: Use pahole-version.sh From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor [ Upstream commit 2d6c9810eb8915c4ddede707b8e167a1d919e1ca ] Use pahole-version.sh to get pahole's version code to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-4-nathan@kernel.org Signed-off-by: Matthias Maennich --- scripts/pahole-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh index 7acee326aa6c..d38fa6d84d62 100755 --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -7,7 +7,7 @@ if ! [ -x "$(command -v ${PAHOLE})" ]; then exit 0 fi =20 -pahole_ver=3D$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') +pahole_ver=3D$($(dirname $0)/pahole-version.sh ${PAHOLE}) =20 if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2033C433FE for ; Tue, 1 Feb 2022 20:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242661AbiBAU5M (ORCPT ); Tue, 1 Feb 2022 15:57:12 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58366 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242629AbiBAU5A (ORCPT ); Tue, 1 Feb 2022 15:57:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC4E661758; Tue, 1 Feb 2022 20:56:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93922C340ED; Tue, 1 Feb 2022 20:56:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749019; bh=CwHDLZ6vHdCkuPxLcNdA4DZY55blACA3PpaAT6fvdR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPBCFS2iAC7DwE4t4GmDcNwo/6DQ20kEVsITV5Vk9ezupwTHTzkKtyShei1F1v218 1eL3dltEzwn5v/KbaSdZB2UG01bSTBnftZrZozBM4QofUdJTCHkFNoxMXJp0GyIVR9 epGGdgLbZqIjqmdNwzm5kcxNy3yeE+zu5Gl1V5w4aYhsilxHsaivMHl68paXE1xgxR KUifrK+Q8wmh4kudaJJh0sWqjbh+znE5G7xHtU7a4TAJ27hcgJGZHpa5Gp5BGK5z8i H0QU4OvNPjKeF9Mua90M+NoUBq74Heln09M2x902yQwgL1KK+ZwSaAHyJV6QgZfhnD Z9pGJr+/DPwcg== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 2/5] kbuild: Add CONFIG_PAHOLE_VERSION Date: Tue, 1 Feb 2022 13:56:21 -0700 Message-Id: <20220201205624.652313-3-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There are a few different places where pahole's version is turned into a three digit form with the exact same command. Move this command into scripts/pahole-version.sh to reduce the amount of duplication across the tree. Create CONFIG_PAHOLE_VERSION so the version code can be used in Kconfig to enable and disable configuration options based on the pahole version, which is already done in a couple of places. Signed-off-by: Nathan Chancellor Acked-by: Andrii Nakryiko --- MAINTAINERS | 1 + init/Kconfig | 4 ++++ scripts/pahole-version.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 scripts/pahole-version.sh diff --git a/MAINTAINERS b/MAINTAINERS index 0d422452c8ff..d8a66d50f224 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3524,6 +3524,7 @@ F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py F: scripts/pahole-flags.sh +F: scripts/pahole-version.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ diff --git a/init/Kconfig b/init/Kconfig index e9119bf54b1f..7328d4f25370 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -86,6 +86,10 @@ config CC_HAS_ASM_INLINE config CC_HAS_NO_PROFILE_FN_ATTR def_bool $(success,echo '__attribute__((no_profile_instrument_function)) = int x();' | $(CC) -x c - -c -o /dev/null -Werror) =20 +config PAHOLE_VERSION + int + default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE)) + config CONSTRUCTORS bool =20 diff --git a/scripts/pahole-version.sh b/scripts/pahole-version.sh new file mode 100755 index 000000000000..f8a32ab93ad1 --- /dev/null +++ b/scripts/pahole-version.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./pahole-version.sh pahole +# +# Prints pahole's version in a 3-digit form, such as 119 for v1.19. + +if [ ! -x "$(command -v "$@")" ]; then + echo 0 + exit 1 +fi + +"$@" --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/' --=20 2.35.1 From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75F65C61DA4 for ; Thu, 23 Feb 2023 11:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233317AbjBWLyd (ORCPT ); Thu, 23 Feb 2023 06:54:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233955AbjBWLyK (ORCPT ); Thu, 23 Feb 2023 06:54:10 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0331051935 for ; Thu, 23 Feb 2023 03:54:04 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id en10-20020a056402528a00b004acbf564d75so13756997edb.5 for ; Thu, 23 Feb 2023 03:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=td1YUBJ9Xy17Ao0yXyrts3oObTRLSjz6Au98Jd+MF6w=; b=nqG0bfUFR7NI6wUr5Hd5GxJgRgQD+sGUwKfng3kf5pLU5YCjQ0/ueVwjGkgMB8mUPN tEy7o0faFercAF+u2ti0qobJWc5/RvZKQD4Fl2hlSP8Iius9FQO9bqEH0OogDDiRsO+N OHX4r3xUJ7wnwhaR5U+3Q5uPomox8pmTrG0f6vl51CMCbzg1c/YsHBtc9pnjCUzgGlUs Lp/Y/qTJuY+8UBobVr7cdnzit328B6HifA5p9y86WpdXvt6+SUK8yTcmyoQM8Ns1qHkE j3D55T64Am2T/iM6gbvaga/S85svOBQ8uqOtFxRPzZcb1Tg6ytpg4JiioIZ+pCxyNVAb wy3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=td1YUBJ9Xy17Ao0yXyrts3oObTRLSjz6Au98Jd+MF6w=; b=hcUQ5wQnNoqUdyspqZHA0CGb94i6ak2PBqoAPuaKKHsRh7d2+qg0tji4eQMlSL9+1z g+w+m345pcPm1Q4mO1JCgn3bM8zhr3j8ntm4m8dSsMTFhIlW2BkUybIgKu88ssrWj04r /9Q/RLWc81zURmqxNBQjBHKeTtP/zsliCN6kkR60OZm1qLT82GA/2bL67BV9yJnHf/eD h8bn4Opxh+ay4+TFKIyMXMuANZBtJQVpJHIWra66RUuRVPM0uOPrFcJ+XvIkWkMiTFUf huUQCYzTHI88XbAeRFld1HhWxV5HZNhKCoXW5RKS/wFjdC+1/LzW1FbgaFcLtjVyTCl9 NWDw== X-Gm-Message-State: AO0yUKUDBFKRoQ41IJFS0xgZDltUa3ISNJnwOTHou6KW9YV7ojybcIN/ eQ1/dNAD94aqGCWsKekHD24i/Eel0D4YDAIyVBp5W4Rq/dBoalEVIuYvOzJsse1KWUkp3xQO9HW HhYK7l74MGebD9wFUK5lV9M8hsOdWA3RBl1kfFAUHvyIUd0qFNbnxf9rmhQrdYLBRtQCWiIO1Uf U= X-Google-Smtp-Source: AK7set+ytwsc4AdAQs+yRSblVc6pkY8uQ6HKqEmqM42lwZWX19F1h5Mb8Hb0LSMBlW4BzARFHZSzRRaAXKe7pQ== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:cf33:dc28:3e98:f5e9]) (user=maennich job=sendgmr) by 2002:a17:907:2071:b0:8e5:411d:4d09 with SMTP id qp17-20020a170907207100b008e5411d4d09mr2855387ejb.15.1677153243389; Thu, 23 Feb 2023 03:54:03 -0800 (PST) Date: Thu, 23 Feb 2023 11:53:50 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230223115351.1241401-4-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH v5.15 v2 3/4] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor [ Upstream commit 6323c81350b73a4569cf52df85f80273faa64071 ] Now that CONFIG_PAHOLE_VERSION exists, use it in the definition of CONFIG_PAHOLE_HAS_SPLIT_BTF and CONFIG_PAHOLE_HAS_BTF_TAG to reduce the amount of duplication across the tree. Change-Id: Ie5ba17d96688dbcc385a9804ed96a59bda7a40df Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-5-nathan@kernel.org [maennich: omitted patching non-existing config PAHOLE_HAS_BTF_TAG] Signed-off-by: Matthias Maennich --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f71db0cc3bf1..944fd2ae756b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -328,7 +328,7 @@ config DEBUG_INFO_BTF DWARF type info into equivalent deduplicated BTF type info. =20 config PAHOLE_HAS_SPLIT_BTF - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-= 9]+)/\1\2/'` -ge "119") + def_bool PAHOLE_VERSION >=3D 119 =20 config DEBUG_INFO_BTF_MODULES def_bool y --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BAC1C636D6 for ; Wed, 22 Feb 2023 11:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231846AbjBVLXU (ORCPT ); Wed, 22 Feb 2023 06:23:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231867AbjBVLXN (ORCPT ); Wed, 22 Feb 2023 06:23:13 -0500 Received: from mail-ed1-x549.google.com (mail-ed1-x549.google.com [IPv6:2a00:1450:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1663199E6 for ; Wed, 22 Feb 2023 03:23:08 -0800 (PST) Received: by mail-ed1-x549.google.com with SMTP id r6-20020aa7c146000000b004acd97105ffso10523407edp.19 for ; Wed, 22 Feb 2023 03:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=ADFQgZgGOq4TDMg8Y+BW13f+LjzW9iSZx+Zyrtcp/n4=; b=MMWZcbYyEd1tCa+BGmDX75zVMH9izj2aiKtgJ57vTU6TFSuHRnLE6MVpPAYcG9cPZy yyXly1rODPWcZopTyOLqlF5HZuXs6jDOjDHRl+eNMm9wGQsZdl2nWgoXGehrQJeRAxS5 kvw+9Aff6ZQQnynHtfO0+Y4DHRM31HVBuMNlMfrR8yC+qTELdBdY0CbY6RRv+wVA3Ow/ qlMQF/8KBkEsnYFta14Uq5UhA5MBvBoTwLPS51du649DU1FaOxsYOx+dyKTOXIxb3q9t 1yfm/lOmkNeezhtt1EHymnKYiLmeO8Z59LOQg3Y3kBtmVRtSpeeyWjmk4WNbr63czU8S Girw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ADFQgZgGOq4TDMg8Y+BW13f+LjzW9iSZx+Zyrtcp/n4=; b=Mo/f7/VfFRiYtXO0iXxFg0KVYoICzvL5enaxWQc4HEceVXomsoQ1FlNNhbSCQiaX/w VyzPubwBJt9G0eSRg8hYNWpnM0ZkqNNmsCvD9661KX0Y1SrPG3zZ2Yx7qjRG65T/j7Zp tZykXTcnrXqQTHaRfaqniW/MGCGYGbSdausBR9HF3Eb5Ws7lY9CexKvJNtBCWDeKKn4F RgQxQUysiDbySHDdDvxzUsUaPNkEy+rsnhCTX+yCcOZeZlYfLJnCdATC3jDGJCegZCAS hXGQAhKlZqTSgg2YqpIZVmQuaSu/ul59L+N0p1p2dME9D6TYpwyE4VpPHQ75zXEb/t9X zw/Q== X-Gm-Message-State: AO0yUKWVxc8STTgfmM/Y+xfxvtFUtowEig8+4Ga3H8OXysqXLyPvDwFg e/vPXITgrbdeDTVjYS1lE3vAIjPzLAORLAcYJEnjAbYkZ99ECcGCNzz1Ir7PFCqnFCdOUoS59mH kvtD4CwBD/P5BhTc1D0wsf7w87ysJCsiP85em7uovYHRFJ7eIUD5Zqg9Hhdqs6NNOav0ihTj9n9 Y= X-Google-Smtp-Source: AK7set8YIjI/ceJgkk2o+g0zPawn9DfXQRE5q1XNCusxwuKgKUW6uGnQIFcMHM4XtQm3uU0+SGgQhi5wqkc8Lw== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:35a9:4800:d90c:e9bc]) (user=maennich job=sendgmr) by 2002:a17:906:d215:b0:8e3:da0f:f3ea with SMTP id w21-20020a170906d21500b008e3da0ff3eamr1729163ejz.7.1677064987258; Wed, 22 Feb 2023 03:23:07 -0800 (PST) Date: Wed, 22 Feb 2023 11:21:43 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230222112141.278066-4-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH 3/5] scripts/pahole-flags.sh: Use pahole-version.sh From: maennich@google.com To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor Use pahole-version.sh to get pahole's version code to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-4-nathan@kernel.org Signed-off-by: Matthias Maennich --- scripts/pahole-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh index 7acee326aa6c..d38fa6d84d62 100755 --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -7,7 +7,7 @@ if ! [ -x "$(command -v ${PAHOLE})" ]; then exit 0 fi =20 -pahole_ver=3D$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') +pahole_ver=3D$($(dirname $0)/pahole-version.sh ${PAHOLE}) =20 if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D4D7C433F5 for ; Tue, 1 Feb 2022 20:57:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242658AbiBAU5P (ORCPT ); Tue, 1 Feb 2022 15:57:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242655AbiBAU5F (ORCPT ); Tue, 1 Feb 2022 15:57:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E44C061751; Tue, 1 Feb 2022 12:57:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9134861757; Tue, 1 Feb 2022 20:57:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55FBFC340EB; Tue, 1 Feb 2022 20:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749023; bh=V2UwD0MzRLDnF0+Omw6xViGV0ZfyIdZvB/8JfsHk8RI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEdi5W0pu1xy3fSUhyc2k3oSBbX2/wku68zWw5kuze4gOkoLboNP+Nywp8Rpg/Tvs paQ4JrmqnLN+Le1A/PPYrT6fWQ7/RvZlUwbRBWce7Z7JT4QaHNY+4QcXtv6+KJZDmK ry4Ot3PPu8LVWLJRSA6X1vNqw0dciDri0ExKQXrtN15toUnPdpKA8ybVJbtZT2UTMU 67mghFuM8iyIEQg/xZt9IJuVXq61zIpX7xXa15a3eBl5OyJ3XoEXeliY70Gju3B7fV ofUijaBPYkiIQQz6Fzqvr3oh6A8WSsmwfdh/IUqQpSYVrozAp5xNYEAzKzDtKB39iU zOmbLZe9gIkcQ== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 3/5] scripts/pahole-flags.sh: Use pahole-version.sh Date: Tue, 1 Feb 2022 13:56:22 -0700 Message-Id: <20220201205624.652313-4-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use pahole-version.sh to get pahole's version code to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor Acked-by: Andrii Nakryiko --- scripts/pahole-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh index e6093adf4c06..c293941612e7 100755 --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -7,7 +7,7 @@ if ! [ -x "$(command -v ${PAHOLE})" ]; then exit 0 fi =20 -pahole_ver=3D$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') +pahole_ver=3D$($(dirname $0)/pahole-version.sh ${PAHOLE}) =20 if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars --=20 2.35.1 From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D249CC6379F for ; Wed, 22 Feb 2023 11:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231804AbjBVLXr (ORCPT ); Wed, 22 Feb 2023 06:23:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbjBVLXX (ORCPT ); Wed, 22 Feb 2023 06:23:23 -0500 Received: from mail-ed1-x549.google.com (mail-ed1-x549.google.com [IPv6:2a00:1450:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D02EF32E59 for ; Wed, 22 Feb 2023 03:23:17 -0800 (PST) Received: by mail-ed1-x549.google.com with SMTP id ec13-20020a0564020d4d00b004a621e993a8so10080712edb.13 for ; Wed, 22 Feb 2023 03:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=G8i/WK5WDKl3YN3JBPYbZztdEmPTBn08cMGx5hPood4=; b=cZnEB9p9Pz0nSB06JAlWcDXzyA6WyXGkDkRBoviUDXqZ357KJtFGr2jClJdpQe0jAG 3jF/l5p+WO1yB/Hn9jLPLm8XBSj5MSMZRdHMijcyLHftg0jkHm+kMAgojNm9XvK2uBBW qxz+0Vb0J+c8xocZHuAt8Ep27kzRoZ/45k5tHLoAAEnYF6VSRiDhwQ0eLVBrNvA5ZkmV ejg/9nP3YuTLIiiGnRcr5CxAdTjgxgJMxIt44vO5XuQO5agwaOhxP2b//PUiWc4//Hwb H1OmxFX0m+LENEZ6/xqcV/eN4rMn5RSHwFFyICPvc3YOCuvRXjjNBAIZ/KpUzjx8jsS/ atRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G8i/WK5WDKl3YN3JBPYbZztdEmPTBn08cMGx5hPood4=; b=XZMsRhvAvuPdhR69NUEnzwdGy+o9bhrxEHs+SwFuWXfvari/k5g2BSHwBdcUVvSIOg D7pYhZ12ullolhfPJZUmmZGueIosWzUEBo2ForsUO1wq3TaO8r7y1YIdBlqk9KDQoBmE monT2vIhBfhpqGZBT6KcSqfDfFL47RD7hPMLKbKRBV3PJ1Jbc7DMFr+MpoaViqCD0X9z wixAq1stn/tVTZpl1mFeU58vZFQaqwTqdrclcT7Nmhq33OOeeKCNYFIb8w66I84ybrz3 4aAhznpoeU+8ApFEd0MBUbu9TrwoutCfJhxgp25OK+NZXjh7x+IaAYXtfrPg4/7R5II5 j9TA== X-Gm-Message-State: AO0yUKUqAcFxy1GyMer7IOCK9HD5J3IZ1aV8X2S9jm3o+5xrFK21Jb8K I6N0Mg959hW4QGVph/r08ygfIW/eS17km5G280nVeAzrwaRAkorXKPvUae7jUOnt/jecRrM7LPA xQc9YA9byg1Wp9dEd2R/3gM0VlkWimDmzKY/5+KKHdMGTW0gH/Smg+aHMOuCMUUihTUo8MoZ+Qp M= X-Google-Smtp-Source: AK7set8ltdrvzD4QI4G2la/6RrmITWIM2bXrDbWr+TR8suA5T1OZxb0XBPUAravS+cfn5N02JT0wV7D84N5w0g== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:35a9:4800:d90c:e9bc]) (user=maennich job=sendgmr) by 2002:a17:906:1c4b:b0:878:6488:915f with SMTP id l11-20020a1709061c4b00b008786488915fmr7746205ejg.10.1677064996450; Wed, 22 Feb 2023 03:23:16 -0800 (PST) Date: Wed, 22 Feb 2023 11:21:45 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230222112141.278066-5-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH 4/5] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION From: maennich@google.com To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor Now that CONFIG_PAHOLE_VERSION exists, use it in the definition of CONFIG_PAHOLE_HAS_SPLIT_BTF and CONFIG_PAHOLE_HAS_BTF_TAG to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-5-nathan@kernel.org Signed-off-by: Matthias Maennich --- lib/Kconfig.debug | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f71db0cc3bf1..0743c9567d7e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -328,7 +328,15 @@ config DEBUG_INFO_BTF DWARF type info into equivalent deduplicated BTF type info. =20 config PAHOLE_HAS_SPLIT_BTF - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-= 9]+)/\1\2/'` -ge "119") + def_bool PAHOLE_VERSION >=3D 119 + +config PAHOLE_HAS_BTF_TAG + def_bool PAHOLE_VERSION >=3D 123 + depends on CC_IS_CLANG + help + Decide whether pahole emits btf_tag attributes (btf_type_tag and + btf_decl_tag) or not. Currently only clang compiler implements + these attributes, so make the config depend on CC_IS_CLANG. =20 config DEBUG_INFO_BTF_MODULES def_bool y --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EBCAC636D6 for ; Thu, 23 Feb 2023 11:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234004AbjBWLyg (ORCPT ); Thu, 23 Feb 2023 06:54:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234040AbjBWLyK (ORCPT ); Thu, 23 Feb 2023 06:54:10 -0500 Received: from mail-ed1-x549.google.com (mail-ed1-x549.google.com [IPv6:2a00:1450:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D801454A07 for ; Thu, 23 Feb 2023 03:54:07 -0800 (PST) Received: by mail-ed1-x549.google.com with SMTP id fi8-20020a056402550800b004a26cc7f6cbso14460848edb.4 for ; Thu, 23 Feb 2023 03:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=aqI5qRz1R2l92R95izh+z71292tP3IreESGLJDlY42w=; b=r5DLdzyiLefsEEbLLBNJXanRJcEV6piHQkD0uKbvvFGwGxZMeWUEZyqimk08IkkDgW sljfAcKxXzbHexzFzbfShoYNlJBhkd5Yimz9ECpYaz1JlOJNL8onMof/89jTGOqyvEod m7vlKRPwdSCOSVJ6zSy4puUAFrFe9qxzt7Dobqedwu4PwtgCeYaKBBdBSzVeHAqdTK61 0d7++akMPINK2HYjPjMQ1EZnorjvmhN3IcxzRasHAU0Gfom+0s3o9j8G7CkZyJ8jr/KM AwVwa5Fe3mjT+6+2kvGxbt55Gax5wcwLxwQjWfengdR2wfpovOSCppjHfuXO6/feXB8l pG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aqI5qRz1R2l92R95izh+z71292tP3IreESGLJDlY42w=; b=jF7xgbss/zR71yEQTslByI+fndj1el6fgNardvovBsHPmGFGZdWcDkpvkQWUYDIBkn 4RXEWf5uZ6Qi6jxpwWvvBEPH30timqAHCPVwta3eJ65fXUAQ5uWJqBAjKsFGBlbHPGak fZQWr/tyPuRCD/jJmKmMgsMxxhmFE1TJQO0XyrdYVoDgnmpOs8KdbjgXKzxukZo7gAzk OMAIFxlM2qyc0ew1YqbSPiA7UUyuJSvK+bqjfFpM7rnl9h7M05eNAWYwR9faGQ8WuNIk PJUQ3/qPMTY00mhmWguh7FgcUn3dsHB6zQS06fjv9QI1lsDrRCZW/AuguYc2i+qeOlRH loaQ== X-Gm-Message-State: AO0yUKUYR4XN/naoXJ3dUTp7mslcVbDgJCj2kIt2Q2QmyCti5Qr4K4nr PJ0Z3qm9ukkzHQigqxFHoIGtqfyxUYqk4zFgqfuNl/DHJCDcz/OqSs5F5a4Qwo2YjQRFPHBIxpC MsINqXrzbgLLaMh1lo7xYlFQQH7nfV7Mmgbct95jKXJp1L+24njJKPv1hK6wEJVs4mbXQeshQmx A= X-Google-Smtp-Source: AK7set/4h+iHm/PkGUfEY5SE2abz0fqYl0ctlcK48eQu18xhDc5UlrdrQp0M76tx5+fa5TINSt+SWYwimd31UQ== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:cf33:dc28:3e98:f5e9]) (user=maennich job=sendgmr) by 2002:a17:906:76d0:b0:8de:e66a:d788 with SMTP id q16-20020a17090676d000b008dee66ad788mr4278993ejn.7.1677153246106; Thu, 23 Feb 2023 03:54:06 -0800 (PST) Date: Thu, 23 Feb 2023 11:53:51 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230223115351.1241401-5-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH v5.15 v2 4/4] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor [ Upstream commit 42d9b379e3e1790eafb87c799c9edfd0b37a37c7 ] Commit 98cd6f521f10 ("Kconfig: allow explicit opt in to DWARF v5") prevented CONFIG_DEBUG_INFO_DWARF5 from being selected when CONFIG_DEBUG_INFO_BTF is enabled because pahole had issues with clang's DWARF5 info. This was resolved by [1], which is in pahole v1.21. Allow DEBUG_INFO_DWARF5 to be selected with DEBUG_INFO_BTF when using pahole v1.21 or newer. [1]: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=3D7d= 8e829f636f47aba2e1b6eda57e74d8e31f733c Change-Id: I9cc90f12abcc8a809bb263e31ec16766d9384e40 Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-6-nathan@kernel.org Signed-off-by: Matthias Maennich --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 944fd2ae756b..dbbd243c865f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -302,7 +302,7 @@ config DEBUG_INFO_DWARF4 config DEBUG_INFO_DWARF5 bool "Generate DWARF Version 5 debuginfo" depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >=3D 23= 502 && AS_HAS_NON_CONST_LEB128) - depends on !DEBUG_INFO_BTF + depends on !DEBUG_INFO_BTF || PAHOLE_VERSION >=3D 121 help Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 5.0+ accepts the -gdwarf-5 flag but only had partial support for some --=20 2.39.2.637.g21b0678d19-goog From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E1ECC433F5 for ; Tue, 1 Feb 2022 20:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242711AbiBAU5S (ORCPT ); Tue, 1 Feb 2022 15:57:18 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:54914 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242628AbiBAU5K (ORCPT ); Tue, 1 Feb 2022 15:57:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 378F3B82F92; Tue, 1 Feb 2022 20:57:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BC79C340F0; Tue, 1 Feb 2022 20:57:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749026; bh=CjKRajP1hyPG6GHtEcC8S1cRRiUsFDVkufEo2oeRcYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHhT8p9EI3H/jMYWEdBQhX57o8+L+vIC3+tLN4xs6ZNWLxeJKKUB05GTm3uPyKZJP n+1HQRKXDjX88fiYj9VEC1k7DxhEFOBPiveXCGnh7QWajpO8gdfbTdFdZTR9DERIZ9 pKcGOkI5jhSUqUulKJjjhkEBOxqo5TVQQx0Iz3k6KELSay+iCNX+4K7B33Tlcxjy93 afxH0sb7C88bZioAMSRlSCT2D+TsilmQQw4MQfy8OJKw5eLQ2d1TChcRATvmZJ+3o/ UBo29e/0n6vyImBfvW0YptV1u6izC8zLkHsj0DWCYL7JnskXjvERbE/PVIC6ufl01T /Q1aiZ0bGchMQ== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 4/5] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION Date: Tue, 1 Feb 2022 13:56:23 -0700 Message-Id: <20220201205624.652313-5-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Now that CONFIG_PAHOLE_VERSION exists, use it in the definition of CONFIG_PAHOLE_HAS_SPLIT_BTF and CONFIG_PAHOLE_HAS_BTF_TAG to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor Acked-by: Andrii Nakryiko --- lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6159859769fa..bd487d480902 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -323,10 +323,10 @@ config DEBUG_INFO_BTF DWARF type info into equivalent deduplicated BTF type info. =20 config PAHOLE_HAS_SPLIT_BTF - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-= 9]+)/\1\2/'` -ge "119") + def_bool PAHOLE_VERSION >=3D 119 =20 config PAHOLE_HAS_BTF_TAG - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-= 9]+)/\1\2/'` -ge "123") + def_bool PAHOLE_VERSION >=3D 123 depends on CC_IS_CLANG help Decide whether pahole emits btf_tag attributes (btf_type_tag and --=20 2.35.1 From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F1B3C433F5 for ; Tue, 1 Feb 2022 20:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242776AbiBAU5W (ORCPT ); Tue, 1 Feb 2022 15:57:22 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58506 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241127AbiBAU5L (ORCPT ); Tue, 1 Feb 2022 15:57:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36C1561756; Tue, 1 Feb 2022 20:57:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03855C340ED; Tue, 1 Feb 2022 20:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749030; bh=QXd5q+7zbc3jx1Mm3Y3j3sEp6a7kDTxU4zMgI1M/2kk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRveCCTFfiTH8rbyrskvMn7zEKvijdY2AWxXS8Oa0tcVHJl7jkEh4CftPLCtfL33H 509+ho2uYbQttMIcdNcZ8pWKHdnBQc5NC+E1XXTcG3m1z+aQemyE7WRJ+4Y21LEeAh yJx3YcLpcmS+k+sHDkazhBTz80lCJ02l0a/eQ84VsRdVXzMtkblhyOVaNJG+EUaA+g Q8567O1/cFJVLH5kCu6alN86VTReQ2XCscOuy64FJR4I2tdUPiyOzjXea6JK4vQQ8T 6RWZWTXDGkPQY2CP3EZ91XxgusRAwc8SQm0BHyemWHkrx+ChCTXnw0FuR+YEzeT9xe pNliHc4SyE9vw== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 5/5] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ Date: Tue, 1 Feb 2022 13:56:24 -0700 Message-Id: <20220201205624.652313-6-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Commit 98cd6f521f10 ("Kconfig: allow explicit opt in to DWARF v5") prevented CONFIG_DEBUG_INFO_DWARF5 from being selected when CONFIG_DEBUG_INFO_BTF is enabled because pahole had issues with clang's DWARF5 info. This was resolved by [1], which is in pahole v1.21. Allow DEBUG_INFO_DWARF5 to be selected with DEBUG_INFO_BTF when using pahole v1.21 or newer. [1]: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=3D7d= 8e829f636f47aba2e1b6eda57e74d8e31f733c Signed-off-by: Nathan Chancellor Acked-by: Andrii Nakryiko --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index bd487d480902..1555da672275 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -296,7 +296,7 @@ config DEBUG_INFO_DWARF4 config DEBUG_INFO_DWARF5 bool "Generate DWARF Version 5 debuginfo" depends on !CC_IS_CLANG || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && A= S_VERSION >=3D 23502))) - depends on !DEBUG_INFO_BTF + depends on !DEBUG_INFO_BTF || PAHOLE_VERSION >=3D 121 help Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 5.0+ accepts the -gdwarf-5 flag but only had partial support for some --=20 2.35.1 From nobody Tue Dec 16 11:48:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E9C6C636D6 for ; Wed, 22 Feb 2023 11:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbjBVLXv (ORCPT ); Wed, 22 Feb 2023 06:23:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231994AbjBVLXi (ORCPT ); Wed, 22 Feb 2023 06:23:38 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79EA12C666 for ; Wed, 22 Feb 2023 03:23:27 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id cf11-20020a0564020b8b00b0049ec3a108beso10092189edb.7 for ; Wed, 22 Feb 2023 03:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=D/IVoT6kbM/UtfR7s3dMh2SCTGIBOfUuX6JJnWJ+IwE=; b=Mdt0lnS7mkfTzOlIkWZGAfn2CNhhjY/+6NOaqjsir6sOkhYbTuaVd9+5Q8CiyWOUK5 M55HqjaHZpVYsmIBsKa4LhgN/2/Va/jhzCIWBzjlLCWncOvEexCXSs4p1AKQl58pbTlk Svrs3WiNe435EY1pyEkrO5+WJxC/U2pfTr3GU/2kmfGJ+Blv+XQjT0c16tFS/fbAIEY9 pIZGYmdzFGs//GZKHkJBqaz+Nku+cl6zLyNnuPKyhjPkdhFhAEnzq7wJ/cktgAG20UGx bdZQ80lyuMeiEzvdfgRXFKYRXNc5Kn2etdbq7V2NnYqgVijtsrwirIA+2WvmgV9p4TEt JzcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D/IVoT6kbM/UtfR7s3dMh2SCTGIBOfUuX6JJnWJ+IwE=; b=W5frFAqFPXIu/OjaObSZJeaQyiBLg0k/+MZEKQKn21OzaWGmUIS65wHoXsKU76XAeD 5hcYPD8qraAdNIsfP+G0uAoeXcKqkT/1J1ErbhxiZTz2E1X1LOtHRI5dRcNug4UVc7m7 YXFdQ1I3Tahn89HNMbcOIKE24kJP9wSH1b7NVUbzsPyYRtnNnINs3KqQXgDULdpeQ3lO fYh6nleUCuG85BCJK8lB8F3bSvlvGmQecTUIbAl7UAJs22w/Ngne3P4zFOnSlsLMX4Ob LMJIwBNxjg5fj2S0sHAPZwzkt8UsZuBTGRgk5zi8wzZbNHrWz/PrHXsuHvrlPTpjvI7A 6R1g== X-Gm-Message-State: AO0yUKVEcSFD1Eql8hOhQnE/gNjeMjyVamQV81Khbb0G3qS8zDX8WZWp wXSC6vfhw9wQyF+r9iY6G8aHoyUNuUGFIedPiTZuMTL137DzhMpXD5Jj7tj9HevgA0VFdZFCi/t e/l1aYWKs2OX7OHAHuTq0VK63iTcfjY7/xKokWHXOTlIO5nNPc2aWd/ipMw2MyY90awJuxHeyeY c= X-Google-Smtp-Source: AK7set8mrOZB3VFNWOkj4p+YxajaUNjVz9R6h/g8mcDXigj3yFq+Um+6vmXjxKfiQvlSkRah1b/2AptvfbDDZw== X-Received: from lux.lon.corp.google.com ([2a00:79e0:d:209:35a9:4800:d90c:e9bc]) (user=maennich job=sendgmr) by 2002:a17:906:5ad0:b0:878:790b:b7fd with SMTP id x16-20020a1709065ad000b00878790bb7fdmr7119681ejs.14.1677065006123; Wed, 22 Feb 2023 03:23:26 -0800 (PST) Date: Wed, 22 Feb 2023 11:21:47 +0000 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> Message-Id: <20230222112141.278066-6-maennich@google.com> Mime-Version: 1.0 References: <20220201205624.652313-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog Subject: [PATCH 5/5] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ From: maennich@google.com To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Andrii Nakryiko , Daniel Borkmann Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Nathan Chancellor Commit 98cd6f521f10 ("Kconfig: allow explicit opt in to DWARF v5") prevented CONFIG_DEBUG_INFO_DWARF5 from being selected when CONFIG_DEBUG_INFO_BTF is enabled because pahole had issues with clang's DWARF5 info. This was resolved by [1], which is in pahole v1.21. Allow DEBUG_INFO_DWARF5 to be selected with DEBUG_INFO_BTF when using pahole v1.21 or newer. [1]: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=3D7d= 8e829f636f47aba2e1b6eda57e74d8e31f733c Signed-off-by: Nathan Chancellor Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220201205624.652313-6-nathan@kernel.org Signed-off-by: Matthias Maennich --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0743c9567d7e..dd86de130cdf 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -302,7 +302,7 @@ config DEBUG_INFO_DWARF4 config DEBUG_INFO_DWARF5 bool "Generate DWARF Version 5 debuginfo" depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >=3D 23= 502 && AS_HAS_NON_CONST_LEB128) - depends on !DEBUG_INFO_BTF + depends on !DEBUG_INFO_BTF || PAHOLE_VERSION >=3D 121 help Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 5.0+ accepts the -gdwarf-5 flag but only had partial support for some --=20 2.39.2.637.g21b0678d19-goog