From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EE8651580B8 for ; Sun, 5 Mar 2023 11:19:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4785BE088B; Sun, 5 Mar 2023 11:19:47 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 22CC8E088B for ; Sun, 5 Mar 2023 11:19:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 491BA34139A for ; Sun, 5 Mar 2023 11:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA8088D4 for ; Sun, 5 Mar 2023 11:19:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1678015159.8eea55ff639c63ce54f5feba1d3300e40d4814b9.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/xdp-tools/Manifest net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch net-libs/xdp-tools/xdp-tools-1.2.8.ebuild net-libs/xdp-tools/xdp-tools-1.3.1.ebuild X-VCS-Directories: net-libs/xdp-tools/files/ net-libs/xdp-tools/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8eea55ff639c63ce54f5feba1d3300e40d4814b9 X-VCS-Branch: master Date: Sun, 5 Mar 2023 11:19:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 841fc0d1-f7cc-4733-8169-66dcce410ccd X-Archives-Hash: 70f440b1f43180aac33a7870e2639bb6 commit: 8eea55ff639c63ce54f5feba1d3300e40d4814b9 Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Sat Mar 4 15:16:10 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sun Mar 5 11:19:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8eea55ff net-libs/xdp-tools: bump to 1.3.1 & add build fixes - fix configure to properly detect libbpf features - fix clang build with default-enabled stack protector Closes: https://bugs.gentoo.org/889842 Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/29926 Signed-off-by: Sam James gentoo.org> net-libs/xdp-tools/Manifest | 2 +- .../files/1.3.1-disable-stack-protector.patch | 32 +++++++++++++++++++ .../files/1.3.1-fix-btf__type_cnt-detection.patch | 36 ++++++++++++++++++++++ ...p-tools-1.2.8.ebuild => xdp-tools-1.3.1.ebuild} | 7 ++++- 4 files changed, 75 insertions(+), 2 deletions(-) diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest index 9e3d03e1cffd..2fda18e4cc09 100644 --- a/net-libs/xdp-tools/Manifest +++ b/net-libs/xdp-tools/Manifest @@ -1 +1 @@ -DIST xdp-tools-1.2.8.tar.gz 253786 BLAKE2B f745085b73da5193c3cdaf60c20dfa5de62f3d83487413c87b4c3d07b755dcf91cfbeb4ba970b4e04eef74b4cec4238057f4462074f49b7139d7652cb0f22998 SHA512 6ada9e433fcbefd13cebdffe93c3ce9159e9e09f1498d1615918ca6ecc4f11f03fcd9096980e8ceb7de126d4d8b953fa64917e777d54b5a3dfd1a9556de81626 +DIST xdp-tools-1.3.1.tar.gz 330516 BLAKE2B 89a61f47ba26efe6d0630d971e913e034d111d05c896e5af1bb28e6cb4e94133e6ecd827a10ee12a935ae2e6856f04556ac564ded1bcc65182766d656f8d0c5f SHA512 9dd434095a043158d14fb6829fa632fc4a0714dc0b6e08c219dfb55cb9f34005300db750115e08bd54210e90142bd499904616da077b8aa827e4de28c31be637 diff --git a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch new file mode 100644 index 000000000000..3a37b26efa14 --- /dev/null +++ b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch @@ -0,0 +1,32 @@ + +From: https://github.com/xdp-project/xdp-tools/commit/cb6d06219d1b49b07980b481a383e1dea74a0702 +Bug: https://bugs.gentoo.org/889842 + +From cb6d06219d1b49b07980b481a383e1dea74a0702 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= +Date: Sat, 4 Mar 2023 20:08:25 +0100 +Subject: [PATCH] make: disable stack protector for BPF bits built by clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The clang toolchain might have stack-protection enabled by default +(e.g. via platform configuration) and that won't work for BPF, +so unconfitionally disable it via -fno-stack-protector. + +Signed-off-by: Holger Hoffstätte +--- + lib/defines.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/defines.mk b/lib/defines.mk +index f134c43b..54b259f2 100644 +--- a/lib/defines.mk ++++ b/lib/defines.mk +@@ -1,5 +1,5 @@ + CFLAGS ?= -O2 -g +-BPF_CFLAGS ?= -Wno-visibility ++BPF_CFLAGS ?= -Wno-visibility -fno-stack-protector + BPF_TARGET ?= bpf + + HAVE_FEATURES := diff --git a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch new file mode 100644 index 000000000000..d805e1077c76 --- /dev/null +++ b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch @@ -0,0 +1,36 @@ + +From https://github.com/xdp-project/xdp-tools/commit/a7df567634af77381832a2212c5f5099b07734f3 + +From a7df567634af77381832a2212c5f5099b07734f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= +Date: Sat, 4 Mar 2023 20:07:39 +0100 +Subject: [PATCH] configure: Fix function detection for btf__type_cnt() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The configure check for btf__type_cnt() swapped two arguments in the +check_libbpf_function() call in the configure script, leading to the check +failing if LIBBPF_CFLAGS is non-empty. Make sure the arguments are in the +right order, and also pass a proper NULL parameter in the check instead of +a 0. + +Reported-by: Holger Hoffstätte +Signed-off-by: Toke Høiland-Jørgensen +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 016c5bbd..62c2f883 100755 +--- a/configure ++++ b/configure +@@ -272,7 +272,7 @@ check_libbpf_functions() + + check_libbpf_function "perf_buffer__consume" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" + check_libbpf_function "btf__load_from_kernel_by_id" "(0)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" +- check_libbpf_function "btf__type_cnt" "(0)" "$LIBBPF_CFLAGS" "" "$LIBBPF_LDLIBS" ++ check_libbpf_function "btf__type_cnt" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" + check_libbpf_function "bpf_object__next_map" "(NULL, NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" + check_libbpf_function "bpf_object__next_program" "(NULL, NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" + check_libbpf_function "bpf_program__insn_cnt" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS" diff --git a/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild similarity index 88% rename from net-libs/xdp-tools/xdp-tools-1.2.8.ebuild rename to net-libs/xdp-tools/xdp-tools-1.3.1.ebuild index 0dd14f1dc39b..fdc4068a030e 100644 --- a/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild +++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2022 Gentoo Authors +# Copyright 2021-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -25,6 +25,11 @@ QA_PREBUILT="usr/lib/bpf/*.o" MAKEOPTS+=" V=1" +PATCHES=( + "${FILESDIR}"/1.3.1-disable-stack-protector.patch + "${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch +) + src_configure() { export PRODUCTION=1 export DYNAMIC_LIBXDP=1