From patchwork Thu Sep 28 02:25:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Ruffell X-Patchwork-Id: 1840476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rwy4p1549z1ynm for ; Thu, 28 Sep 2023 12:25:30 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qlgiM-0000S5-Te; Thu, 28 Sep 2023 02:25:19 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qlgiH-0000M1-8y for kernel-team@lists.ubuntu.com; Thu, 28 Sep 2023 02:25:14 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id CDD883F685 for ; Thu, 28 Sep 2023 02:25:12 +0000 (UTC) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1c61acdd7e1so107091375ad.2 for ; Wed, 27 Sep 2023 19:25:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695867911; x=1696472711; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/oajr7m0XYnUdwxpOrC1bqyIrtAcfpuj14hm59qRMlE=; b=bVWrPAYa8DwBTk5m8iYuaGy8pmzimlyUTpdkvGUJi+lLnR/kFl/IKpzyfIXKCNdZ6r tP44ZFolA5mimKF2YLVVTpUoEiUxyua01AoI/6npFkY0LaPTktnrI/x27zvWiu6ifVq/ +3IdSNA92ASZ5AKZgU1Ggc0Blm8NW1zqubf7wICeKyXyHzsqJo02HtR5Qs2EfWyQdM+i 6BoGzSrxh+Y2cA9frcwpOPniH9awPAOZRnM/Yn0b+kCT/2/Hw2/wCHtPQt094DzeKmAd KYLEOxcXRLIydg+5gxUG7lYHIBFDVEoPtEQzZ9+OIkMgMa9rS6E5JfqNTafn+9aHB4t3 LBmA== X-Gm-Message-State: AOJu0YyLtcciLJG5uWfGlszVqBBZK/2MqWpZRurBXQqf8io0aoSXiOvI zFpFujtJCCprlPkMWxaVcWgbc40aU1tw5Ih2tusLrcTwsiJaAOb9GhE6j4YShUQ236B/ykVj0Pv BsbCo1CWcVvpVuUU5HHbulzbHWTsPENVC1o4NdhxjnyWFZBd/UQ== X-Received: by 2002:a17:902:f685:b0:1c7:2763:9ef4 with SMTP id l5-20020a170902f68500b001c727639ef4mr3048618plg.66.1695867911329; Wed, 27 Sep 2023 19:25:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9k6D9VawFllk6JwUHzB1lNjhZxMg/VWv5PUZt1e4MjLe5bH8pQ6uhN7D2flTqWSWAo+4mPA== X-Received: by 2002:a17:902:f685:b0:1c7:2763:9ef4 with SMTP id l5-20020a170902f68500b001c727639ef4mr3048608plg.66.1695867910912; Wed, 27 Sep 2023 19:25:10 -0700 (PDT) Received: from Thinkpad-X1.. (125-237-194-100-fibre.sparkbb.co.nz. [125.237.194.100]) by smtp.gmail.com with ESMTPSA id l16-20020a170903245000b001b89b1b99fasm13870169pls.243.2023.09.27.19.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:25:10 -0700 (PDT) From: Matthew Ruffell To: kernel-team@lists.ubuntu.com Subject: [SRU][J][J:linux-bluefield][PATCH 0/1] scripts/pahole-flags.sh change return to exit 0 Date: Thu, 28 Sep 2023 15:25:00 +1300 Message-Id: <20230928022501.14072-1-matthew.ruffell@canonical.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2035123 [Impact] When building the Jammy linux-bluefield kernel tree on a system without pahole installed, the following warning is emitted: ./scripts/pahole-flags.sh: line 7: return: can only `return' from a function or sourced script scripts/pahole-flags.sh attempts to return from an if statement that is not within a function, and generates a warning. The fix is straightforward, changing return to an exit 0. Clone the linux-bluefield kernel tree and build it on a arm64 system without pahole installed. A test kernel is available with the fix applied in: https://launchpad.net/~mruffell/+archive/ubuntu/sf368560-test Both linux-bluefield and ubuntu-jammy build correctly. [Fix] This was fixed by Linus Torvalds in the following merge commit: commit fc02cb2b37fe2cbf1d3334b9f0f0eab9431766c4 Merge: bfc484fe6abb 84882cf72cd7 Author: Linus Torvalds Date: Tue Nov 2 06:20:58 2021 -0700 Subject: Merge tag 'net-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc02cb2b37fe2cbf1d3334b9f0f0eab9431766c4 Note, the original commit does not have the fix included: commit 9741e07ece7c247dd65e1aa01e16b683f01c05a8 Author: Jiri Olsa Date: Fri Oct 29 14:57:29 2021 +0200 Subject: kbuild: Unify options for BTF generation for vmlinux and modules Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9741e07ece7c247dd65e1aa01e16b683f01c05a8 The Ubuntu kernel cherry-picked the original commit and did not pick up the silent fix made in the merge commit. Submitting the silent fix as a SAUCE patch with changelog describing the change. Note: I know SAUCE patches are bad, but in this scenario, to revert the initial commit and re-apply the fixed version would require us to revert two additional dependency commits, making six patches to review, vs, a one line change in a SAUCE commit that has a real changelog entry. [Where problems could occur] The Ubuntu kernel is built with pahole enabled, and requires pahole to be installed as a build dependency. It is extremely unlikely that any users are disabling pahole at build time, apart from linux-bluefield engineers. If a regression were to occur, engineers would see errors during build time about scripts/pahole-flags.sh not executing properly. [Other info] Linus remarked about the issue in the following lkml discussion: https://lore.kernel.org/lkml/CAHk-=wgdE6=ob5nF60GvRYAG24MKaJBGJf3jPufMe1k_UPBQTA@mail.gmail.com/ https://lore.kernel.org/lkml/CAHk-=wgPZM4bN=LUCrMkG3FX808QSLm6Uv6ixm5P350_7c=xUw@mail.gmail.com/ This was silently Incorporated into the linux-stable commit: commit 0baced0e0938f2895ceba54038eaf15ed91032e7 5.15.y From: Jiri Olsa Date: Sun, 4 Sep 2022 15:19:00 +0200 Subject: kbuild: Unify options for BTF generation for vmlinux and modules Link: https://github.com/gregkh/linux/commit/0baced0e0938f2895ceba54038eaf15ed91032e7 Matthew Ruffell (1): UBUNTU: SAUCE: scripts/pahole-flags.sh change return to exit 0 scripts/pahole-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Tim Gardner Acked-by: Bartlomiej Zolnierkiewicz --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -4,7 +4,7 @@ extra_paholeopt= if ! [ -x "$(command -v ${PAHOLE})" ]; then - return + exit 0 fi [Testcase]