unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 70962@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Leo Famulari <leo@famulari.name>,
	Tobias Geerinckx-Rice <me@tobias.gr>, Wilko Meyer <w@wmeyer.eu>
Subject: [bug#70962] [PATCH 12/14] gnu: linux-libre: Enable BTF debug info.
Date: Wed, 15 May 2024 12:57:22 -0400	[thread overview]
Message-ID: <0ef662fff82aa5034e95f41ff413c06355a0fd70.1715791830.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com>

This is needed for software making use of eBPF programs, such as the sysdig
utility, among others.  For more information about BPF, see:
<https://brendangregg.com/blog/2020-11-04/bpf-co-re-btf-libbpf.html>.

* 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
-- 
2.41.0





  parent reply	other threads:[~2024-05-15 17:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 16:51 [bug#70962] [PATCH 01/14] gnu: grpc: Modernize Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 02/14] gnu: grpc: Propagate abseil-cpp-cxxstd11 Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 03/14] gnu: Add valijson Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 04/14] gnu: libbpf: Use gexps Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 05/14] gnu: libbpf: Update to 1.4.1 Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 06/14] gnu: Add falcosecurity-libs Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 07/14] gnu: Add sysdig Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 08/14] gnu: Add dwarves Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 09/14] gnu: make-linux-libre*: Set KBUILD_BUILD_VERSION for reproducibility Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 10/14] gnu: make-linux-libre*: Run install targets in parallel Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 11/14] gnu: linux: Turn %default-extra-linux-options into a procedure Maxim Cournoyer
2024-05-15 16:57 ` Maxim Cournoyer [this message]
2024-05-15 16:57 ` [bug#70962] [PATCH 13/14] gnu: linux-libre: Enable Zstd compression of kernel modules Maxim Cournoyer
2024-05-15 16:57 ` [bug#70962] [PATCH 14/14] gnu: linux-libre-with-bpf: Deprecate in favor of linux-libre Maxim Cournoyer
2024-05-15 17:20 ` [bug#70964] [PATCH 00/14] Add BTF support to kernel, sysdig and dependents, zstd-compressed modules Maxim Cournoyer
2024-05-15 18:30   ` [bug#70962] " Maxim Cournoyer
2024-05-30  2:05   ` bug#70962: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ef662fff82aa5034e95f41ff413c06355a0fd70.1715791830.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=70962@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=me@tobias.gr \
    --cc=w@wmeyer.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).