From patchwork Tue Jun 29 02:41:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12349193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BD71C11F66 for ; Tue, 29 Jun 2021 02:41:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B6F9E61D0B for ; Tue, 29 Jun 2021 02:41:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6F9E61D0B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 18D7B8D0114; Mon, 28 Jun 2021 22:41:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 117D78D00F0; Mon, 28 Jun 2021 22:41:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED3688D0114; Mon, 28 Jun 2021 22:41:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id C018B8D00F0 for ; Mon, 28 Jun 2021 22:41:36 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 89E941F855 for ; Tue, 29 Jun 2021 02:41:36 +0000 (UTC) X-FDA: 78305210592.26.10A2724 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf08.hostedemail.com (Postfix) with ESMTP id 46AA78019374 for ; Tue, 29 Jun 2021 02:41:36 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 35EEF61D0C; Tue, 29 Jun 2021 02:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1624934495; bh=/N6u5bJybcCpXgkdOdLH2P2WlsRZDg7azdf+esj2QXM=; h=Date:From:To:Subject:In-Reply-To:From; b=gi8geiCgDzDgvE7BG0uXaIZMChRebKRSeHOjoKs2D44I9ehg3TkHSSD86ONu9sOcS Rd/WKOIRL9ZuHtUzCYty1ecHr/FCIKn3W1QOYwT+rkHy5Af58/oqEOJRAgOcgLJu0U qRz4ZKS33sxcB9fLTLKk+uY7o10IzR9x+fg2coCY= Date: Mon, 28 Jun 2021 19:41:34 -0700 From: Andrew Morton To: acme@redhat.com, akpm@linux-foundation.org, andrii@kernel.org, haoluo@google.com, jolsa@kernel.org, linux-mm@kvack.org, mgorman@techsingularity.net, mm-commits@vger.kernel.org, msuchanek@suse.de, torvalds@linux-foundation.org Subject: [patch 159/192] kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21 Message-ID: <20210629024134.P29WLt5IS%akpm@linux-foundation.org> In-Reply-To: <20210628193256.008961950a714730751c1423@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=gi8geiCg; dmarc=none; spf=pass (imf08.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Stat-Signature: gr5uuj8jo375gg3sm3idb31hcj7n3fxu X-Rspamd-Queue-Id: 46AA78019374 X-HE-Tag: 1624934496-757461 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrii Nakryiko Subject: kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21 Commit "mm/page_alloc: convert per-cpu list protection to local_lock" will introduce a zero-sized per-CPU variable, which causes pahole to generate invalid BTF. Only pahole versions 1.18 through 1.21 are impacted, as before 1.18 pahole doesn't know anything about per-CPU variables, and 1.22 contains the proper fix for the issue. Luckily, pahole 1.18 got --skip_encoding_btf_vars option disabling BTF generation for per-CPU variables in anticipation of some unanticipated problems. So use this escape hatch to disable per-CPU var BTF info on those problematic pahole versions. Users relying on availability of per-CPU var BTFs would need to upgrade to pahole 1.22+, but everyone won't notice any regressions. Link: https://lkml.kernel.org/r/20210530002536.3193829-1-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Mel Gorman Cc: Arnaldo Carvalho de Melo Cc: Hao Luo Cc: Michal Suchanek Cc: Jiri Olsa Signed-off-by: Andrew Morton --- scripts/link-vmlinux.sh | 4 ++++ 1 file changed, 4 insertions(+) --- a/scripts/link-vmlinux.sh~kbuild-skip-per-cpu-btf-generation-for-pahole-v118-v121 +++ a/scripts/link-vmlinux.sh @@ -235,6 +235,10 @@ gen_btf() vmlinux_link ${1} + if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then + # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars" + fi if [ "${pahole_ver}" -ge "121" ]; then extra_paholeopt="${extra_paholeopt} --btf_gen_floats" fi