update libbpf from v0.1.1 to v0.3
This commit is contained in:
parent
1e16f24f82
commit
884e95afe1
@ -1,39 +0,0 @@
|
|||||||
From 456b1cced6ba9b06bf028377236e548ccccfbb60 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Di Zhu <zhudi21@huawei.com>
|
|
||||||
Date: Wed, 16 Jun 2021 09:33:27 +0800
|
|
||||||
Subject: [PATCH] libbpf: Use SOCK_CLOEXEC when opening the netlink socket
|
|
||||||
Otherwise, there exists a small window between the opening and closing of the
|
|
||||||
socket fd where it may leak into processes launched by some other thread.
|
|
||||||
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Fixes: 949abbe88436 ("libbpf: add function to setup XDP")
|
|
||||||
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
|
|
||||||
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
||||||
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
|
||||||
Link: https://lore.kernel.org/bpf/20210317115857.6536-1-memxor@gmail.com
|
|
||||||
|
|
||||||
Conflict:NA
|
|
||||||
Reference:https://github.com/libbpf/libbpf/commit/bbc65156d75ab64180dbf5f1ae93dd4f1a6d3cc8
|
|
||||||
---
|
|
||||||
src/netlink.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/netlink.c b/src/netlink.c
|
|
||||||
index 312f887..c2b251c 100644
|
|
||||||
--- a/src/netlink.c
|
|
||||||
+++ b/src/netlink.c
|
|
||||||
@@ -41,7 +41,7 @@ int libbpf_netlink_open(__u32 *nl_pid)
|
|
||||||
memset(&sa, 0, sizeof(sa));
|
|
||||||
sa.nl_family = AF_NETLINK;
|
|
||||||
|
|
||||||
- sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
|
||||||
+ sock = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE);
|
|
||||||
if (sock < 0)
|
|
||||||
return -errno;
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
BIN
libbpf-0.3.tar.gz
Normal file
BIN
libbpf-0.3.tar.gz
Normal file
Binary file not shown.
12
libbpf.spec
12
libbpf.spec
@ -1,19 +1,18 @@
|
|||||||
%global githubname libbpf
|
%global githubname libbpf
|
||||||
%global githubver 0.1.1
|
%global githubver 0.3
|
||||||
%global githubfull %{githubname}-%{githubver}
|
%global githubfull %{githubname}-%{githubver}
|
||||||
|
|
||||||
Name: %{githubname}
|
Name: %{githubname}
|
||||||
Version: %{githubver}
|
Version: %{githubver}
|
||||||
Release: 1.h1
|
Release: 1.h0
|
||||||
Summary: Libbpf library
|
Summary: Libbpf library
|
||||||
|
|
||||||
License: LGPLv2 or BSD
|
License: LGPLv2 or BSD
|
||||||
URL: https://github.com/%{githubname}/%{githubname}
|
URL: https://github.com/%{githubname}/%{githubname}
|
||||||
Source: https://github.com/%{githubname}/%{githubname}/archive/v%{githubver}.tar.gz
|
Source: https://github.com/%{githubname}/%{githubname}/archive/%{githubname}-%{githubver}.tar.gz
|
||||||
BuildRequires: gcc elfutils-libelf-devel elfutils-devel
|
BuildRequires: gcc elfutils-libelf-devel elfutils-devel
|
||||||
|
|
||||||
#patches
|
#patches
|
||||||
Patch6000: backport-0001-libbpf-Use-SOCK_CLOEXEC-when-opening-the-netlink-soc.patch
|
|
||||||
|
|
||||||
# This package supersedes libbpf from kernel-tools,
|
# This package supersedes libbpf from kernel-tools,
|
||||||
# which has default Epoch: 0. By having Epoch: 1
|
# which has default Epoch: 0. By having Epoch: 1
|
||||||
@ -54,7 +53,7 @@ developing applications that use %{name}
|
|||||||
%make_install -C ./src %{make_flags}
|
%make_install -C ./src %{make_flags}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/libbpf.so.0.1.0
|
%{_libdir}/libbpf.so.0.3.0
|
||||||
%{_libdir}/libbpf.so.0
|
%{_libdir}/libbpf.so.0
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
@ -66,6 +65,9 @@ developing applications that use %{name}
|
|||||||
%{_libdir}/libbpf.a
|
%{_libdir}/libbpf.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 27 2021 sunsuwan<sunsuwan2@huawei.com> - 0.6.1-1.h0
|
||||||
|
- update libbpf from v0.1.1 to v0.3
|
||||||
|
|
||||||
* Sun Sep 26 2021 zhudi<zhudi2@huawei.com> - 0.1.1-1.h1
|
* Sun Sep 26 2021 zhudi<zhudi2@huawei.com> - 0.1.1-1.h1
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:
|
- CVE:
|
||||||
|
|||||||
BIN
v0.1.1.tar.gz
BIN
v0.1.1.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user