Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54259C64EC4 for ; Thu, 9 Mar 2023 02:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbjCICN5 (ORCPT ); Wed, 8 Mar 2023 21:13:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjCICNy (ORCPT ); Wed, 8 Mar 2023 21:13:54 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA80961A82 for ; Wed, 8 Mar 2023 18:13:48 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id f14so150087iow.5 for ; Wed, 08 Mar 2023 18:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678328028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xDCu+k9I5uU9ZeyTijagvPSWTHvVWfU/xHE3X1obRdA=; b=dipSQP9U03tyGH9iIucLnZ+CHfS8mkxPYC/AtXJfO832TcuO3QoByvI+6Uci295s7p fA2hqBRkCc8bB0ZMgkrGFTYy5k5GBsaopWvkUGyIdT86m6qAPoh5sQ0peVqyaac+44bx U8FF94CJ+IDhardjXsj3ub8vOIaAt2oJRTIl5dCD7Lms6O2I51mhkET8WnxJrhLDwl2l m82MqiqWrvYwmnP/dd4F0bjz1jby+M/KxfnX0czHLuII+GwHnHDsFwydgj0EaU7Fzg2c hlODJfjtSs+xPsbYqL7kTPxOFFOccA7cNgraGGKw0RQFuiEAUe7pgqxJW0LrMahKUuEH CKHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678328028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xDCu+k9I5uU9ZeyTijagvPSWTHvVWfU/xHE3X1obRdA=; b=MWiAokWOwYw12urfw6uv1v5jabEdXViAQWmjE+Q5ID3rHXloj1cQSbsNAaH7u3YP/N xyzGYD8VsgZ1Gr+VMdz3Cyoh45Cv7gB+0avfrjw/SNnZkl++su4Va16iMcvC/pZb8IKs 9NaGDqD8v8cgkMVZKPTHP8ZFFp65Lbf0fA0w3FaHo5PeAKb8PFMl429qRwLsm/uu93k9 2UVymv4ddK5hhtEWqapr/my16cRYfQ19S8xIJYAqcOZ5m3D7t3f81TyE2xEI7JwxVmKr L1HT0UOatFudTnqAweU/Mv8+ynLm1ywMkk9EohIyAuJMQYUN/hXre2RFUYoGsUmMmq5U isyg== X-Gm-Message-State: AO0yUKWFSvkvZFlEZqpqd1UMpoWGI3d0D7CxhdGy18574RDvoF2657fl Q9jgCJOk6rnlrXnvbjD5BsNNg1jju/3/MwN1JW1M7w== X-Google-Smtp-Source: AK7set+mWq6zJzHt94/3BeSde/daBudUBmiy0DGPNw2z7zo1D94NCuIcD0UN8oAwSxIzMMRpLPMDFnzDPe9ry/6ETaA= X-Received: by 2002:a6b:dc03:0:b0:74c:7eac:a064 with SMTP id s3-20020a6bdc03000000b0074c7eaca064mr9571737ioc.2.1678328027763; Wed, 08 Mar 2023 18:13:47 -0800 (PST) MIME-Version: 1.0 References: <20230116010115.490713-1-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Wed, 8 Mar 2023 18:13:34 -0800 Message-ID: Subject: Re: [PATCH v2 0/3] Assume libbpf 1.0+ To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Andres Freund , Quentin Monnet , Roberto Sassu , Christy Lee , Andrii Nakryiko , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Michael Petlan , Ben Hutchings , Guilherme Amadio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 19, 2023 at 1:13=E2=80=AFPM Jiri Olsa wrot= e: > > On Thu, Jan 19, 2023 at 02:41:12PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jan 19, 2023 at 09:11:03AM -0800, Ian Rogers escreveu: > > > On Sun, Jan 15, 2023 at 5:01 PM Ian Rogers wrote= : > > > > libbpf 1.0 was a major change in API. Perf has partially supported > > > > older libbpf's but an implementation may be: > > > > .. > > > > pr_err("%s: not support, update libbpf\n", __func__); > > > > return -ENOTSUP; > > > > .. > > > > > > > > Rather than build a binary that would fail at runtime it is > > > > preferrential just to build libbpf statically and link against > > > > that. The static version is in the kernel tools tree and newer than > > > > 1.0. > > > > > > > > These patches change the libbpf test to only pass when at least > > > > version 1.0 is installed, then remove the conditional build and > > > > feature logic. > > > > > > > > The issue is discussed here: > > > > https://lore.kernel.org/lkml/20230106151320.619514-1-irogers@google= .com/ > > > > perf bpf: > > > > > > > > A variant of this fix was added to Linux 6.2 in: > > > > "perf bpf: Avoid build breakage with libbpf < 0.8.0 + LIBBPF_DYNAMI= C=3D1" > > > > https://lore.kernel.org/lkml/Y71+eh00Ju7WeEFX@kernel.org/ > > > > This change goes further in removing logic that is now no longer > > > > necessary. > > > > > > > > v2. Rebase now that breakage fix patch is in linus/master. > > > > > > I missed the: > > > Acked/Tested-by: Jiri Olsa > > > I believe we are waiting for package maintainer input. > > > > Yes, as fedora:37 still is at libbpf 0.8.0 :-\ > > rawhide (f38) is already on 1.1.0 ... I'll check how bad it'd be to move > f37 to 1.x, but I had to do bulk update of like 10 other dependent packag= es > for f38, so not sure how bad it'd be for f37 > > jirka +Guilherme We were looking for maintainer input on these changes, but there is no update in over a month. Here is the original lore link: https://lore.kernel.org/lkml/CAP-5=3DfVUgc8xtBzGi66YRUxZHyXvW2kiMjGz39dywaL= xrO4Hpg@mail.gmail.com/ Should these changes land in perf-tools-next targeting Linux 6.4? Thanks, Ian > > > > This is what I have in the containers I test, sure, the older ones > > already have NO_LIBBPF=3D1 and some will get this added, and some I sti= ll > > need to ask for libbpf-devel (or the distro specific name, like > > libbpf-dev): > > > > [perfbuilder@five ~]$ podman images --format "{{.Repository}}:{{.Tag}}"= | grep /acmel/ | grep -v '' | sort -t: -Vk1,2 | grep -v -- -x- | whi= le read image ; do echo -n $image: ; libbpf=3D$(podman run --rm -t --entryp= oint=3Dls $image -la /usr/lib64/libbpf.so.1) ; echo $libbpf ; done > > localhost/acmel/linux-perf-tools-build-almalinux:8:ls: cannot access '/= usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-almalinux:9:ls: cannot access '/= usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.12:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.13:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.14:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.15:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.16:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:3.17:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alpine:edge:ls: /usr/lib64/libbp= f.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-alt:p9:ls: cannot access '/usr/l= ib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-alt:p10:ls: cannot access '/usr/= lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-alt:sisyphus:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-amazonlinux:2:ls: cannot access = /usr/lib64/libbpf.so.1: No such file or directory > > localhost/acmel/linux-perf-tools-build-amazonlinux:devel:ls: cannot acc= ess '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-archlinux:base:lrwxrwxrwx 1 root= root 15 Oct 1 12:32 /usr/lib64/libbpf.so.1 -> libbpf.so.1.0.1 > > localhost/acmel/linux-perf-tools-build-centos:8:ls: cannot access '/usr= /lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-centos:stream:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-clearlinux:latest:lrwxrwxrwx 1 r= oot root 15 Sep 30 16:01 /usr/lib64/libbpf.so.1 -> libbpf.so.1.0.1 > > localhost/acmel/linux-perf-tools-build-debian:10:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-debian:11:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-debian:experimental:ls: cannot a= ccess '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:26:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:27:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:28:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:29:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:30:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:31:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:32:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:33:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:34:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:35:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:36:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:37:ls: cannot access '/us= r/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-fedora:38:lrwxrwxrwx. 1 root roo= t 15 Dec 20 14:39 /usr/lib64/libbpf.so.1 -> libbpf.so.1.0.0 > > localhost/acmel/linux-perf-tools-build-fedora:rawhide:lrwxrwxrwx. 1 roo= t root 15 Dec 20 14:39 /usr/lib64/libbpf.so.1 -> libbpf.so.1.0.0 > > localhost/acmel/linux-perf-tools-build-gentoo-stage3:latest:ls: cannot = access '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-manjaro:base:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.0:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.1:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.2:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.3:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.4:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:15.5:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-opensuse:tumbleweed:lrwxrwxrwx. = 1 root root 15 Nov 9 12:08 /usr/lib64/libbpf.so.1 -> libbpf.so.1.0.1 > > localhost/acmel/linux-perf-tools-build-oraclelinux:8:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-oraclelinux:9:ls: cannot access = '/usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-rockylinux:8:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-rockylinux:9:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:18.04:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:20.04:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:21.04:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:21.10:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:22.04:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:22.10:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > localhost/acmel/linux-perf-tools-build-ubuntu:23.04:ls: cannot access '= /usr/lib64/libbpf.so.1': No such file or directory > > [perfbuilder@five ~]$ > > > > [perfbuilder@five linux-perf-tools-build]$ grep libbpf-dev */*/Dockerfi= le > > debian/experimental/Dockerfile: libbpf-dev \ > > fedora/35/Dockerfile: libtraceevent-devel libbpf-devel \ > > fedora/36/Dockerfile: libtraceevent-devel libbpf-devel \ > > fedora/37/Dockerfile: libtraceevent-devel libbpf-devel \ > > fedora/38/Dockerfile: libtraceevent-devel libbpf-devel \ > > fedora/rawhide/Dockerfile: libtraceevent-devel libbpf-devel \ > > opensuse/tumbleweed/Dockerfile: libbpf-devel libtraceevent-devel = \ > > ubuntu/22.04/Dockerfile: libelf-dev libiberty-dev libdw-dev libaud= it-dev libtraceevent-dev libbpf-dev \ > > ubuntu/22.10/Dockerfile: libelf-dev libiberty-dev libdw-dev libaud= it-dev libtraceevent-dev libbpf-dev \ > > ubuntu/23.04/Dockerfile: libelf-dev libiberty-dev libdw-dev libaud= it-dev libtraceevent-dev libbpf-dev \ > > [perfbuilder@five linux-perf-tools-build]$ > > > > In some cases it gets dragged on differently, like with clearlinux, > > gentoo, archlinux, etc. > > > > Anyway, just a data point, I'll check if I'm missing installing it > > somewhere. > > > > - Arnaldo