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 E1D04159C9B for ; Fri, 9 Aug 2024 14:39:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D66BE2C5C; Fri, 9 Aug 2024 14:39:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 F40C0E2C5C for ; Fri, 9 Aug 2024 14:39:43 +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 3F6743430E5 for ; Fri, 9 Aug 2024 14:39:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C66251E7E for ; Fri, 9 Aug 2024 14:39:41 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1723214368.14b5874a544060ceaf2e85872a91597d0f2f1778.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/xdp-tools/Manifest net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild X-VCS-Directories: net-libs/xdp-tools/ net-libs/xdp-tools/files/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 14b5874a544060ceaf2e85872a91597d0f2f1778 X-VCS-Branch: master Date: Fri, 9 Aug 2024 14:39:41 +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: 00f9ead2-5f98-42e1-a9bb-fc80c51d0a75 X-Archives-Hash: 1667b1b82bc9e55ba96e049fbc469549 commit: 14b5874a544060ceaf2e85872a91597d0f2f1778 Author: Holger Hoffstätte applied-asynchrony com> AuthorDate: Fri Aug 9 09:38:44 2024 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Aug 9 14:39:28 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14b5874a net-libs/xdp-tools: clean up old Signed-off-by: Holger Hoffstätte applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/38023 Signed-off-by: Arthur Zamarin gentoo.org> net-libs/xdp-tools/Manifest | 1 - ...4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch | 34 ------- net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild | 100 --------------------- 3 files changed, 135 deletions(-) diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest index 523230544af1..99babe4eae1b 100644 --- a/net-libs/xdp-tools/Manifest +++ b/net-libs/xdp-tools/Manifest @@ -1,3 +1,2 @@ -DIST xdp-tools-1.4.1.tar.gz 339878 BLAKE2B 30ed245dd0da8404cf67313ea4d5f9a148507d14bd7330bdac3b03c07d1cc0b38eb1a376636551cb8ea14c8a2e77d02527da363733a1059e1c2ebaee9ac90392 SHA512 9d2ad42713aa53c10ccbde2c344bf2696524e317544f3693114b343ab74240187699c3802cfc6efa05b3e9f9bfec80fd2537799aa3ae050717bb1f6aab435996 DIST xdp-tools-1.4.2.tar.gz 340864 BLAKE2B c5197330ff917043e03a16346823acab760db5fe903f2e039bd2c178ad34bb04d96a0d6b321fd3565256c39422f3f1f7b475970bd22ab487e30468c96e11c711 SHA512 aedf79859872523d514f18e7a6e8b7999bd1942021968dbba9a7e86cde1c193e31b328bc56d6bf2b3fbc7f266c9df8d942d90a70bbd9d514ce38d56c07cd18ca DIST xdp-tools-1.4.3.tar.gz 339989 BLAKE2B 836eb66a2264e9d46124a009a8b3e039da23f28f83460fb3aa724c8ca4c37952979278e3041e9acca44acd68cc94423d73f381febc107c454db7da01f583ae41 SHA512 3ba176e573d02feefc1baf81570b514bc25a61d7be3256ce530128092f07b246b8731430289cdcd874f8846122a4451f0bcd06891565dd1b48beaa10b854c646 diff --git a/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch b/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch deleted file mode 100644 index 6c95a970f876..000000000000 --- a/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch +++ /dev/null @@ -1,34 +0,0 @@ - -Patch from: -https://github.com/xdp-project/xdp-tools/commit/cae9c91353cd3ed51753168203ed101905b9ac9e - -From cae9c91353cd3ed51753168203ed101905b9ac9e Mon Sep 17 00:00:00 2001 -From: Ric Li -Date: Tue, 21 Nov 2023 15:36:57 +0800 -Subject: [PATCH] libxdp: Fix xdp prog memory leak in xsk_setup_xdp_prog - -In the xsk_setup_xdp_prog function, the xsk structure -temporarily takes ownership of an xdp_prog and stores it in -ctx->xdp_prog. However, the allocated memory is not freed -in xsk_destroy_xsk_struct, leading to a memory leak. This -commit addresses the issue by adding a call to -xdp_program_close to properly release the allocated -xdp_prog memory. - -Signed-off-by: Ric Li ---- - lib/libxdp/xsk.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/libxdp/xsk.c b/lib/libxdp/xsk.c -index a854f771..b3527fb6 100644 ---- a/lib/libxdp/xsk.c -+++ b/lib/libxdp/xsk.c -@@ -978,6 +978,7 @@ static struct xsk_ctx *xsk_create_ctx(struct xsk_socket *xsk, - - static void xsk_destroy_xsk_struct(struct xsk_socket *xsk) - { -+ xdp_program__close(xsk->ctx->xdp_prog); - free(xsk->ctx); - free(xsk); - } diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild deleted file mode 100644 index 62df6baaace5..000000000000 --- a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2021-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="The libxdp library and various tools for use with XDP" -HOMEPAGE="https://github.com/xdp-project/xdp-tools" -SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1 BSD-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" -IUSE="+tools" - -DEPEND=" - dev-libs/libbpf:= - dev-util/bpftool - net-libs/libpcap - sys-libs/zlib - virtual/libelf -" -RDEPEND="${DEPEND}" -BDEPEND=" - sys-apps/grep[pcre] - >=sys-devel/clang-11.0.0 -" - -# Not prebuilt -- we build them -- but they're not ordinary ELF objects either. -QA_PREBUILT="usr/lib/bpf/*.o" - -MAKEOPTS+=" V=1" - -PATCHES=( - "${FILESDIR}"/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch -) - -src_prepare() { - # remove -Werror: #899744 - sed -i 's/-Werror//g' lib/Makefile lib/defines.mk || die - sed -i '/-Werror/d' lib/common.mk lib/libxdp/Makefile \ - lib/libxdp/tests/Makefile lib/util/Makefile || die - - default -} - -src_configure() { - # filter LTO: #861587 - filter-lto - - # filter LDFLAGS some more: #916591 - filter-ldflags -Wl,--{icf,lto}* - - # force ld.bfd: #916591 - tc-ld-force-bfd - - export CC="$(tc-getCC)" - export PREFIX="${EPREFIX}/usr" - export LIBDIR="${PREFIX}/$(get_libdir)" - export BPF_OBJECT_DIR="${PREFIX}/lib/bpf" - export PRODUCTION=1 - export DYNAMIC_LIBXDP=1 - export FORCE_SYSTEM_LIBBPF=1 - - default -} - -src_test() { :; } - -src_install() { - default - - # To remove the scripts/testing files that are installed. - rm -r "${ED}/usr/share/xdp-tools" || die - # We can't control static archive generation yet. - rm "${ED}/usr/$(get_libdir)/libxdp.a" || die - - use tools || { rm "${ED}/usr/sbin"/* || die; } - - # These are ELF objects but BPF ones. - dostrip -x /usr/lib/bpf -} - -pkg_postinst() { - elog - elog "Many BPF utilities need access to a mounted bpffs virtual file system." - elog "Either mount it manually like this:" - elog - elog " mount bpffs /sys/fs/bpf -t bpf -o nosuid,nodev,noexec,relatime,mode=700" - elog - elog "or add the following line to your /etc/fstab to always mount it at boot time:" - elog - elog " bpffs /sys/fs/bpf bpf nosuid,nodev,noexec,relatime,mode=700 0 0" - elog - elog "You can verify that bpffs is mounted with:" - elog - elog " mount | grep /sys/fs/bpf" - elog -}