From patchwork Wed May 15 16:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64459 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A158C27BBE9; Wed, 15 May 2024 18:00:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9C54227BBE2 for ; Wed, 15 May 2024 18:00:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7HzE-0001s1-VO; Wed, 15 May 2024 13:00:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7Hz7-0001pK-Is for guix-patches@gnu.org; Wed, 15 May 2024 13:00:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7Hz5-0007Gf-Jq for guix-patches@gnu.org; Wed, 15 May 2024 13:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7Hz5-0007Cf-4L; Wed, 15 May 2024 13:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70962] [PATCH 12/14] gnu: linux-libre: Enable BTF debug info. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Wed, 15 May 2024 17:00:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70962@debbugs.gnu.org Cc: Maxim Cournoyer , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 70962-submit@debbugs.gnu.org id=B70962.171579237927544 (code B ref 70962); Wed, 15 May 2024 17:00:07 +0000 Received: (at 70962) by debbugs.gnu.org; 15 May 2024 16:59:39 +0000 Received: from localhost ([127.0.0.1]:43178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7Hyd-0007AB-6y for submit@debbugs.gnu.org; Wed, 15 May 2024 12:59:39 -0400 Received: from mail-ua1-f45.google.com ([209.85.222.45]:53381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7HyV-000795-Kj for 70962@debbugs.gnu.org; Wed, 15 May 2024 12:59:32 -0400 Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7f17efe79a1so2212500241.2 for <70962@debbugs.gnu.org>; Wed, 15 May 2024 09:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715792304; x=1716397104; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=05/FBm9bMsf9bppIqYiu0ZRssu5Jk9Xad7GcSNVkx4Q=; b=hAsDT8wv10x6rtYdIZZC7U9W2US6D9WpH1RUFzbrXA69v9WlOUJVCmbQXAUs5Kl1QK IyZ8krKfl8adfZh5ABMl5B08Db60rDiPj36tluxbrlJEG8dWNZrMweM/jLxsqJXWCrXT Genj6sNKMgPyDw06fgt2+oybddE+c7+PIRxIVYmVoo8kOn6KPA5ACD5yoJXnxssQkrjV dCWNp9fz2G5G+RZa0vY75HjnzTAx4JTjwmEIIkmlHAO+DEb2YvUWgRNR2aaKbVQICrKX RCv96cKg6XwJ6G0cZFOvn/SvImNWDfvL6n2nCm8Q1IkXjRAtSVEY6Y6ZdWZJzWlh+eQg cOVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715792304; x=1716397104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05/FBm9bMsf9bppIqYiu0ZRssu5Jk9Xad7GcSNVkx4Q=; b=n7ZNjaxR0PQHwPBoYp7aKph8bHe0Zyd0X3dp8di0YxDWnaEXVobIgGSLwJEguHNZ3j NsDJtY34/m3f1t4LQV0zoWNtKJEKePPF+IroqleHSuokhR5q01NDdez9CJ028KdNVX+I ksw8PDr0z4kZoQo69DhPzdaIedg3rmsl4o0ptmGPLu17yCm3ulMxMRmgcH+FrXsDN3TC B18VfVkK7mxoeXDldNd+TRRDNeqYbZAi8RHmcS/03S9v9WVjeyvROWR/RgUrZHeWVSYV ELl8IyL9XKIkc19j88F12jJYOZzavIc+6BCxGeBSx6mb/QIm1OaAvFWjphNrfCBtSkew DqVw== X-Gm-Message-State: AOJu0Yy8etDMfrNwtFst0JAqR8coR0Wmwt/LdgSp0hp53hCwSbDKhZZc jcXhSw9y8WQpS6UR0YNvoipxSNgG0YTiG2hA8l+yefzAnFKnLwkQacdkkA== X-Google-Smtp-Source: AGHT+IFRzmbPa4ykPNIaRgua/vsZF2/HMVK9Ou4gFINM9lTujh8nPI+QtCjBBHTi2yTvzS9tDexPeQ== X-Received: by 2002:a05:6102:3e8e:b0:47e:f54c:4ba6 with SMTP id ada2fe7eead31-48077e7b77dmr17535151137.27.1715792302574; Wed, 15 May 2024 09:58:22 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f194871sm66068896d6.59.2024.05.15.09.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:58:22 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 15 May 2024 12:57:22 -0400 Message-ID: <0ef662fff82aa5034e95f41ff413c06355a0fd70.1715791830.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> References: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is needed for software making use of eBPF programs, such as the sysdig utility, among others. For more information about BPF, see: . * gnu/packages/linux.scm (%default-extra-linux-options): Enable CONFIG_DEBUG_INFO, CONFIG_DEBUG_INFO_BTF, CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT, CONFIG_BPF_JIT, CONFIG_BPF_JIT_ALWAYS_ON, CONFIG_BPF_SYSCALL and BPF_UNPRIV_DEFAULT_OFF. Disable CONFIG_DEBUG_INFO_REDUCED. (make-linux-libre*) [native-inputs]: Add dwarves, python-wrapper and zlib. Change-Id: Idfc64f82aa404e86168bffcf721a325f9e807f75 --- gnu/packages/linux.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index eaa9f66d74..d2b9344296 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -829,6 +829,24 @@ (define (default-extra-linux-options version) `(;; Make the kernel config available at /proc/config.gz ("CONFIG_IKCONFIG" . #t) ("CONFIG_IKCONFIG_PROC" . #t) + ;; Debugging options. + ("CONFIG_DEBUG_INFO" . #t) ;required by BTF + ,@(if (version>=? version "5.1") + '(("CONFIG_DEBUG_INFO_BTF" . #t)) + '()) + ,@(if (version>=? version "5.12") + '(("CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT" . #t)) + '()) + ("CONFIG_DEBUG_INFO_REDUCED" . #f) ;incompatible with BTF + ;; Tracing and related options. + ,@(if (version>=? version "5.1") + '(("CONFIG_BPF_JIT" . #t) + ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) + ("CONFIG_BPF_SYSCALL" . #t)) + '()) + ,@(if (version>=? version "5.13") + '(("BPF_UNPRIV_DEFAULT_OFF" . #t)) + '()) ;; Some very mild hardening. ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) ;; All kernels should have NAMESPACES options enabled @@ -1107,7 +1125,12 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; These are needed to compile the GCC plugins. gmp mpfr - mpc)) + mpc + ;; These are needed when building with the CONFIG_DEBUG_INFO_BTF + ;; support. + dwarves ;for pahole + python-wrapper + zlib)) (home-page "https://www.gnu.org/software/linux-libre/") (synopsis "100% free redistribution of a cleaned Linux kernel") (description "GNU Linux-Libre is a free (as in freedom) variant of the