From 63f390452bcf724d87e00455374529ee006ee27e Mon Sep 17 00:00:00 2001 From: wuxu_wu Date: Tue, 15 Dec 2020 18:39:16 +0800 Subject: [PATCH] hugetlb only support 3 max segment, but x86 elf always have 4 segment. Signed-off-by: wuxu_wu Conflicts: libhugetlbfs.spec --- ...fix-max-segment-cannot-adopt-the-x86.patch | 23 +++++++++++++++++++ libhugetlbfs.spec | 9 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch diff --git a/libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch b/libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch new file mode 100644 index 0000000..82dcb0c --- /dev/null +++ b/libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch @@ -0,0 +1,23 @@ +From 09972e4b31efed122c8747c2840bea4fa6615c6c Mon Sep 17 00:00:00 2001 +From: wuxu +Date: Sun, 9 Aug 2020 15:54:55 +0000 +Subject: [PATCH] libhugetlbfs: fix max segment cannot adopt the x86 + +Signed-off-by: wuxu + +diff --git a/elflink.c b/elflink.c +index 2e71522..0f3c228 100644 +--- a/elflink.c ++++ b/elflink.c +@@ -158,7 +158,7 @@ static void unmapped_abort(const char *fmt, ...) + /* The directory to use for sharing readonly segments */ + static char share_readonly_path[PATH_MAX+1]; + +-#define MAX_HTLB_SEGS 3 ++#define MAX_HTLB_SEGS 4 + #define MAX_SEGS 10 + + struct seg_info { +-- +1.8.3.1 + diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 6565c80..d01bd52 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -2,7 +2,7 @@ Name: libhugetlbfs Version: 2.22 -Release: 2 +Release: 3 Summary: A library which provides easy access to huge pages of memory License: LGPLv2+ URL: https://github.com/libhugetlbfs/libhugetlbfs @@ -13,6 +13,7 @@ Patch0000: 0000-build_flags.patch Patch9000:libhugetlbfs-2.16-remap_segments_with_MAP_SHARED.patch Patch9001:libhugetlbfs-2.16-remap_segments_with_MAP_SHARED-2.patch Patch9002:libhugetlbfs-make-cflags.patch +Patch9003:libhugetlbfs-fix-max-segment-cannot-adopt-the-x86.patch Recommends: %{name}-help = %{version}-%{release} BuildRequires: gcc glibc-devel glibc-static @@ -85,6 +86,12 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/hugepages.conf %changelog +* Tue Dec 15 2020 wuxu - 2.22-3 +- Type:enhancement +- ID:NA +- SUG:restart +- DESC: fix max segment cannot adopt the x86 + * Wed Nov 11 2020 xinghe - 2.22-2 - add help for Recommends -- Gitee