From 7f92c573a9f30e700212aadbfbff0e10bdb168e1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:10:18 +0000 Subject: import libhugetlbfs-2.16-11.el7 --- diff --git a/SOURCES/libhugetlbfs-2.16-makefile_segments.patch b/SOURCES/libhugetlbfs-2.16-makefile_segments.patch new file mode 100644 index 0000000..85751b4 --- /dev/null +++ b/SOURCES/libhugetlbfs-2.16-makefile_segments.patch @@ -0,0 +1,11 @@ +diff -up libhugetlbfs-2.16/Makefile.orig libhugetlbfs-2.16/Makefile +--- libhugetlbfs-2.16/Makefile.orig 2014-07-29 17:25:28.126626119 +0200 ++++ libhugetlbfs-2.16/Makefile 2014-07-29 17:25:47.249662564 +0200 +@@ -50,6 +50,7 @@ ifeq ($(ARCH),ppc) + CC32 = gcc -m32 + ELF32 = elf32ppclinux + TMPLIB32 = lib ++CPPFLAGS += -DPPC_NO_SEGMENTS + else + ifeq ($(ARCH),armv7l) + CC32 = gcc diff --git a/SOURCES/libhugetlbfs-2.16-map_high_truncate.patch b/SOURCES/libhugetlbfs-2.16-map_high_truncate.patch new file mode 100644 index 0000000..a420a2e --- /dev/null +++ b/SOURCES/libhugetlbfs-2.16-map_high_truncate.patch @@ -0,0 +1,42 @@ +commit f008e0d18a4ba8ac26b67c5989efde3406bce535 +Author: Jan Stancek +Date: Fri Dec 5 13:57:04 2014 +0100 + + lower mmap size of map_high_truncate_2 on 32bit s390 + + The low and high limit passed to vm_unmapped_area() in + hugetlb_get_unmapped_area() is (TASK_UNMAPPED_BASE, TASK_SIZE). + + On 64-bit kernel this is defined as: + #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ + (1UL << 30) : (1UL << 41)) + #define TASK_SIZE_OF(tsk) ((tsk)->mm->context.asce_limit) + + For 32-bit (-m31) process, this can be as small as + (0x40000000, 0x80000000), which is 0x40000000 bytes long area. + This testcase however is trying to allocate 0x60000000 and fails: + FAIL mmap() 1: Cannot allocate memory + + Lower mmap size to ~0x20000000, which is more likely to suit + address space constraints of 32-bit s390. + + Signed-off-by: Jan Stancek + Signed-off-by: Eric B Munson + +diff --git a/tests/map_high_truncate_2.c b/tests/map_high_truncate_2.c +index daabd00..2a2560b 100644 +--- a/tests/map_high_truncate_2.c ++++ b/tests/map_high_truncate_2.c +@@ -50,7 +50,11 @@ + * 856fc29505556cf263f3dcda2533cf3766c14ab6. + */ + #define MAP_LENGTH (4 * hpage_size) +-#define TRUNCATE_POINT 0x60000000UL ++#if defined(__s390__) && __WORDSIZE == 32 ++#define TRUNCATE_POINT 0x20000000UL ++#else ++#define TRUNCATE_POINT 0x60000000UL ++#endif + #define HIGH_ADDR 0xa0000000UL + + int main(int argc, char *argv[]) diff --git a/SOURCES/libhugetlbfs-2.16-mounts_warning.patch b/SOURCES/libhugetlbfs-2.16-mounts_warning.patch new file mode 100644 index 0000000..cbfee14 --- /dev/null +++ b/SOURCES/libhugetlbfs-2.16-mounts_warning.patch @@ -0,0 +1,28 @@ +diff -up libhugetlbfs-2.16/hugeadm.c.orig libhugetlbfs-2.16/hugeadm.c +--- libhugetlbfs-2.16/hugeadm.c.orig 2014-07-29 18:36:06.572447296 +0200 ++++ libhugetlbfs-2.16/hugeadm.c 2014-07-29 18:36:40.877511388 +0200 +@@ -517,6 +517,8 @@ int mount_dir(char *path, char *options, + struct mntent entry; + FILE *mounts; + struct mount_list *list, *previous; ++ char dummy; ++ int useMtab; + + list = collect_active_mounts(NULL); + +@@ -552,6 +554,15 @@ int mount_dir(char *path, char *options, + return 1; + } + ++ /* Check if mtab is a symlink */ ++ useMtab = (readlink(MOUNTED, &dummy, 1) < 0); ++ if (!useMtab) { ++ /* No need updating mtab */ ++ return 0; ++ } ++ ++ ++ + mounts = setmntent(MOUNTED, "a+"); + if (mounts) { + entry.mnt_fsname = FS_NAME; diff --git a/SOURCES/libhugetlbfs-2.16-plt_extrasz_fix.patch b/SOURCES/libhugetlbfs-2.16-plt_extrasz_fix.patch new file mode 100644 index 0000000..ce3fcd3 --- /dev/null +++ b/SOURCES/libhugetlbfs-2.16-plt_extrasz_fix.patch @@ -0,0 +1,13 @@ +diff -up libhugetlbfs-2.16/Makefile.orig libhugetlbfs-2.16/Makefile +--- libhugetlbfs-2.16/Makefile.orig 2014-11-06 23:06:07.605004158 +0100 ++++ libhugetlbfs-2.16/Makefile 2014-11-06 23:07:07.354883338 +0100 +@@ -150,6 +150,9 @@ endif + ifeq ($(ELF64),elf64ppc) + LIBOBJS64 += obj64/$(ELF64).o + endif ++ifeq ($(ELF64),elf64lppc) ++LIBOBJS64 += obj64/$(ELF64).o ++endif + LIBOBJS32 += $(LIBOBJS:%=obj32/%) + LIBOBJS64 += $(LIBOBJS:%=obj64/%) + diff --git a/SOURCES/libhugetlbfs-2.16-ppc64le-support.patch b/SOURCES/libhugetlbfs-2.16-ppc64le-support.patch new file mode 100644 index 0000000..df61f46 --- /dev/null +++ b/SOURCES/libhugetlbfs-2.16-ppc64le-support.patch @@ -0,0 +1,81 @@ +Backport of https://www.mail-archive.com/libhugetlbfs-devel@lists.sourceforge.net/msg13914.html + +-- +diff --git a/Makefile b/Makefile +index 9500fd5..fab7607 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,6 +46,12 @@ CC32 = gcc -m32 + ELF32 = elf32ppclinux + endif + else ++ifeq ($(ARCH),ppc64le) ++CC64 = $(CC) -m64 ++ELF64 = elf64lppc ++TMPLIB64 = lib64 ++CUSTOM_LDSCRIPTS = no ++else + ifeq ($(ARCH),ppc) + CC32 = gcc -m32 + ELF32 = elf32ppclinux +@@ -117,6 +123,7 @@ endif + endif + endif + endif ++endif + + ifdef CC32 + OBJDIRS += obj32 +diff --git a/contrib/tlbmiss_cost.sh b/contrib/tlbmiss_cost.sh +index 1f1e234..8fbf798 100755 +--- a/contrib/tlbmiss_cost.sh ++++ b/contrib/tlbmiss_cost.sh +@@ -44,7 +44,7 @@ cpumhz() { + FNAME="cpu MHz" + FINDEX=4 + case "`uname -m`" in +- ppc64) ++ ppc64|ppc64le) + FNAME="clock" + FINDEX=3 + ;; +diff --git a/ld.hugetlbfs b/ld.hugetlbfs +index ba9e00a..df446dd 100755 +--- a/ld.hugetlbfs ++++ b/ld.hugetlbfs +@@ -84,6 +84,7 @@ fi + MB=$((1024*1024)) + case "$EMU" in + elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; ++elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; + elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; + elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; + armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; +diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S +index 1b63ff0..d50f4a6 100644 +--- a/sys-elf64ppc.S ++++ b/sys-elf64ppc.S +@@ -20,7 +20,7 @@ + */ + + .text +- ++#if _CALL_ELF != 2 + .align 2 + .globl direct_syscall + .globl .direct_syscall +@@ -32,6 +32,11 @@ direct_syscall: + .previous + .type .direct_syscall,@function + .direct_syscall: ++#else ++ .globl direct_syscall ++ .type direct_syscall,@function ++direct_syscall: ++#endif + mr 0,3 + mr 3,4 + mr 4,5 +-- +1.8.3.1 + diff --git a/SPECS/libhugetlbfs.spec b/SPECS/libhugetlbfs.spec index aa523b1..33ad8e6 100644 --- a/SPECS/libhugetlbfs.spec +++ b/SPECS/libhugetlbfs.spec @@ -1,6 +1,6 @@ Name: libhugetlbfs Version: 2.16 -Release: 7%{?dist} +Release: 11%{?dist} Summary: A library which provides easy access to huge pages of memory Group: System Environment/Libraries License: LGPLv2+ @@ -11,6 +11,11 @@ Patch1: libhugetlbfs-2.15-fortify.patch Patch2: libhugetlbfs-2.16-misalign_test.patch Patch3: libhugetlbfs-2.17-aarch64.patch Patch4: libhugetlbfs-2.16-makefile_cflags.patch +Patch5: libhugetlbfs-2.16-makefile_segments.patch +Patch6: libhugetlbfs-2.16-mounts_warning.patch +Patch7: libhugetlbfs-2.16-ppc64le-support.patch +Patch8: libhugetlbfs-2.16-plt_extrasz_fix.patch +Patch9: libhugetlbfs-2.16-map_high_truncate.patch BuildRequires: glibc-devel BuildRequires: glibc-static @@ -48,8 +53,15 @@ pool size control. pagesize lists page sizes available on the machine. %patch2 -p1 -b .misalign_test %patch3 -p1 -b .aarch64 %patch4 -p1 -b .makefile_cflags +%patch5 -p1 -b .makefile_segments +%patch6 -p1 -b .mounts_warning +%patch7 -p1 -b .ppc64le_support +%patch8 -p1 -b .plt_extrasz_fix +%patch9 -p1 -b .map_high_truncate %build +ln -s sys-elf64ppc.S sys-elf64lppc.S +ln -s elf64ppc.c elf64lppc.c # Parallel builds are not reliable make BUILDTYPE=NATIVEONLY @@ -109,6 +121,19 @@ rm -fr $RPM_BUILD_ROOT/%{_sbindir}/ %exclude /usr/lib/perl5/TLBC %changelog +* Mon Dec 15 2014 Petr Holasek - 2.16-11 +- map_high_truncate_2 test fix (#1161677) + +* Thu Nov 06 2014 Petr Holasek - 2.16-10 +- fix plt_extrasz() always returning 0 on ppc64le (#1160217) + +* Wed Aug 13 2014 Petr Holasek - 2.16-9 +- ppc64le support (#1125576) + +* Tue Jul 29 2014 Petr Holasek - 2.16-8 +- Fixed malloc failures in testsuite +- Fixed warning when /etc/mtab is symlink + * Mon Mar 03 2014 Petr Holasek - 2.16-7 - Compiling with -fstack-protector-strong flag (#1070772)