linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Shung-Hsi Yu <shung-hsi.yu@suse.com>,
	bpf@vger.kernel.org, linux-perf-users@vger.kernel.org
Cc: Shung-Hsi Yu <shung-hsi.yu@suse.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Quentin Monnet <quentin@isovalent.com>,
	Jiri Olsa <jolsa@kernel.org>, Tony Jones <tonyj@suse.de>,
	Michal Suchanek <msuchanek@suse.de>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: Packaging bpftool and libbpf: GitHub or kernel?
Date: Thu, 13 Apr 2023 13:00:20 +0200	[thread overview]
Message-ID: <87leiw11yz.fsf@toke.dk> (raw)
In-Reply-To: <ZDfKBPXDQxH8HeX9@syu-laptop>

Shung-Hsi Yu <shung-hsi.yu@suse.com> writes:

> A side note: if we want all userspace visible libbpf to have a coherent
> version, perf needs to use the shared libbpf library as well (either
> autodetected or forced with LIBBPF_DYNAMIC=1 like Fedora[4]). But having to
> backport patches to kernel source to keep up with userspace package (libbpf)
> changes could be a pain.

So basically, this here is the reason we're building libbpf from the
kernel tree for the RHEL package: If we use the github version we'd need
to juggle two different versions of libbpf, one for the in-kernel-tree
users (perf as you mention, but also the BPF selftests), and one for the
userspace packages. Also, having libbpf in the kernel tree means we can
just backport patches to it along with the BPF-related kernel patches
(we do quite extensive BPF backports for each RHEL version). Finally,
building from the kernel tree means we can use the existing
kernel-related procedures for any out of order hotfixes (since AFAIK
none of the github repositories have any concept of stable branches that
receive fixes).

YMMV of course, but figured I'd share our reasoning. To be clear,
building from the kernel tree is not without its own pain points (mostly
related to how the build scripts are structured for our kernel builds).
We've discussed moving to the github version of libbpf multiple times,
but every time we've concluded that it would be more, not less, painful
than having the kernel tree be the single source of truth.

-Toke


  parent reply	other threads:[~2023-04-13 11:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  9:23 Packaging bpftool and libbpf: GitHub or kernel? Shung-Hsi Yu
2023-04-13  9:50 ` Shung-Hsi Yu
2023-04-14  1:12   ` Quentin Monnet
2023-04-14  9:33     ` Michal Suchánek
2023-04-18  9:28     ` Shung-Hsi Yu
2023-04-13 11:00 ` Toke Høiland-Jørgensen [this message]
2023-04-19 10:54   ` Shung-Hsi Yu
2023-04-19 19:42     ` Andrii Nakryiko
2023-04-19 22:23       ` tonyj
2023-04-21 21:15         ` Vince Weaver
2023-04-20 19:18       ` Arnaldo Carvalho de Melo
2023-04-14  0:35 ` Quentin Monnet
2023-04-14  9:50   ` Michal Suchánek
2023-04-14 12:30     ` Quentin Monnet
2023-04-14 16:15       ` Michal Suchánek
2023-04-18  0:20         ` Andrii Nakryiko
2023-04-18 11:24           ` Michal Suchánek
2023-04-18 16:38             ` Andrii Nakryiko
2023-04-18 17:41               ` Michal Suchánek
2023-04-19 14:14                 ` Shung-Hsi Yu
2023-04-19 19:52                   ` Andrii Nakryiko
2023-04-19 21:23                     ` Toke Høiland-Jørgensen
2023-04-19 23:42                       ` Andrii Nakryiko
2023-04-20 14:46                         ` Toke Høiland-Jørgensen
2023-04-20 21:39                           ` Andrii Nakryiko
2023-04-28  9:13                             ` Shung-Hsi Yu
2023-04-28 21:15                               ` Andrii Nakryiko
2023-04-19 19:35                 ` Andrii Nakryiko
2023-04-18 12:22       ` Dave Thaler
2023-04-18  0:00   ` Andrii Nakryiko

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

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

  git send-email \
    --in-reply-to=87leiw11yz.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=acme@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jakub@cloudflare.com \
    --cc=jolsa@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=msuchanek@suse.de \
    --cc=quentin@isovalent.com \
    --cc=shung-hsi.yu@suse.com \
    --cc=tonyj@suse.de \
    /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.
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 NNTP newsgroup(s).