Hello community,
here is the log from the commit of package libhugetlbfs
checked in at Sun Oct 29 11:26:42 CET 2006.
--------
--- libhugetlbfs/libhugetlbfs.changes 2006-10-05 13:40:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/libhugetlbfs/libhugetlbfs.changes 2006-10-29 11:26:31.000000000 +0100
@@ -1,0 +2,9 @@
+Sun Oct 29 10:02:15 CET 2006 - olh@suse.de
+
+- update to bugfix release 1.0.1 (214426)
+ * Always install linker scripts for all targets
+ * Error message updates
+ * Add documentation on HUGETLB_DEBUG
+ * Testcase updates
+
+-------------------------------------------------------------------
Old:
----
libhugetlbfs-1.0.tar.gz
New:
----
libhugetlbfs-1.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libhugetlbfs.spec ++++++
--- /var/tmp/diff_new_pack.HnuyVr/_old 2006-10-29 11:26:37.000000000 +0100
+++ /var/tmp/diff_new_pack.HnuyVr/_new 2006-10-29 11:26:37.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package libhugetlbfs (Version 1.0)
+# spec file for package libhugetlbfs (Version 1.0.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,14 +12,14 @@
Name: libhugetlbfs
BuildRequires: doxygen
-License: LGPL
+License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: Development/Libraries/Other
Summary: hugetlbfs helper library
-Version: 1.0
-Release: 24
+Version: 1.0.1
+Release: 1
URL: http://libhugetlbfs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: libhugetlbfs-1.0.tar.gz
+Source0: libhugetlbfs-%{version}.tar.gz
Patch0: libhugetlbfs.install.patch
Patch1: libhugetlbfs.ldscript-path.patch
@@ -36,8 +36,6 @@
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
%build
make V=1 CFLAGS="$RPM_OPT_FLAGS -fPIC" CC32=gcc CC64= PREFIX=/usr libs
@@ -70,12 +68,18 @@
%files
%defattr(-, root, root)
-%doc LGPL-2.1 HOWTO
+%doc LGPL-2.1 HOWTO README NEWS
/usr/include/*
%attr(755,root,root) /usr/bin/*
%{_libdir}/lib*
%changelog -n libhugetlbfs
+* Sun Oct 29 2006 - olh@suse.de
+- update to bugfix release 1.0.1 (214426)
+ * Always install linker scripts for all targets
+ * Error message updates
+ * Add documentation on HUGETLB_DEBUG
+ * Testcase updates
* Thu Oct 05 2006 - olh@suse.de
- update to final 1.0
* Tue Sep 19 2006 - olh@suse.de
++++++ libhugetlbfs-1.0.tar.gz -> libhugetlbfs-1.0.1.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/.gitHEAD new/libhugetlbfs-1.0.1/.gitHEAD
--- old/libhugetlbfs-1.0/.gitHEAD 2006-10-04 17:16:17.000000000 +0200
+++ new/libhugetlbfs-1.0.1/.gitHEAD 2006-10-27 19:12:37.000000000 +0200
@@ -1 +1 @@
-e64c667c3f04c3039f8b7b1e0f28c48171285773
+1b69112150cb7729f090df05755c9abf9d996de4
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/HOWTO new/libhugetlbfs-1.0.1/HOWTO
--- old/libhugetlbfs-1.0/HOWTO 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/HOWTO 2006-10-27 19:12:32.000000000 +0200
@@ -319,6 +319,9 @@
Specify the path to the hugetlbfs mount point
HUGETLB_SHARE
Explained in "Sharing remapped segments"
+ HUGETLB_DEBUG
+ Set to 1 if an application segfaults. Gives very detailed output
+ and runs extra diagnostics.
Sharing remapped segments:
--------------------------
@@ -403,6 +406,10 @@
happen if something goes wrong in the middle of unmapping and
remapping segments for the text/data/bss feature.
+If an application fails to run, set the environment variable HUGETLB_DEBUG
+to 1. This causes additional diagnostics to be run. This information should
+be included when sending bug reports to the libhugetlbfs team.
+
Trademarks
==========
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/Makefile new/libhugetlbfs-1.0.1/Makefile
--- old/libhugetlbfs-1.0/Makefile 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/Makefile 2006-10-27 19:12:32.000000000 +0200
@@ -5,6 +5,7 @@
SBINOBJS = hugetlbd
INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
LDSCRIPT_TYPES = B BDT
+LDSCRIPT_DIST_ELF = elf32ppclinux elf64ppc elf_i386 elf_x86_64
INSTALL_OBJSCRIPT = ld.hugetlbfs
VERSION=version.h
SOURCE = $(shell find . -maxdepth 1 ! -name version.h -a -name '*.[h]')
@@ -60,25 +61,19 @@
OBJDIRS += obj64
endif
-LIBDIR32 = $(DESTDIR)$(PREFIX)/$(LIB32)
-LIBDIR64 = $(DESTDIR)$(PREFIX)/$(LIB64)
+LIBDIR32 = $(PREFIX)/$(LIB32)
+LIBDIR64 = $(PREFIX)/$(LIB64)
LDSCRIPTDIR = $(PREFIX)/share/libhugetlbfs/ldscripts
-BINDIR = $(DESTDIR)$(PREFIX)/share/libhugetlbfs
-SBINDIR = $(DESTDIR)$(PREFIX)/sbin
-DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/libhugetlbfs
+BINDIR = $(PREFIX)/share/libhugetlbfs
+SBINDIR = $(PREFIX)/sbin
+DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
EXTRA_DIST = \
README \
HOWTO \
LGPL-2.1
-ifdef CC32
-INSTALL_LDSCRIPTS = $(foreach type,$(LDSCRIPT_TYPES),$(ELF32).x$(type))
-endif
-ifdef CC64
-INSTALL_LDSCRIPTS += $(foreach type,$(LDSCRIPT_TYPES),$(ELF64).x$(type))
-endif
-
+INSTALL_LDSCRIPTS = $(foreach type,$(LDSCRIPT_TYPES),$(LDSCRIPT_DIST_ELF:%=%.x$(type)))
ifdef V
VECHO = :
@@ -202,17 +197,17 @@
obj32/install:
@$(VECHO) INSTALL32 $(LIBDIR32)
- $(INSTALL) -d $(LIBDIR32)
- $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj32/%) $(LIBDIR32)
- $(INSTALL) -d $(SBINDIR)
- for x in $(SBINOBJS); do $(INSTALL) obj32/$$x $(SBINDIR)/$$x; done
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR32)
+ $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj32/%) $(DESTDIR)$(LIBDIR32)
+ $(INSTALL) -d $(DESTDIR)$(SBINDIR)
+ for x in $(SBINOBJS); do $(INSTALL) obj32/$$x $(DESTDIR)$(SBINDIR)/$$x; done
obj64/install:
@$(VECHO) INSTALL64 $(LIBDIR64)
- $(INSTALL) -d $(LIBDIR64)
- $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj64/%) $(LIBDIR64)
- $(INSTALL) -d $(SBINDIR)
- for x in $(SBINOBJS); do $(INSTALL) obj64/$$x $(SBINDIR)/$$x; done
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR64)
+ $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj64/%) $(DESTDIR)$(LIBDIR64)
+ $(INSTALL) -d $(DESTDIR)$(SBINDIR)
+ for x in $(SBINOBJS); do $(INSTALL) obj64/$$x $(DESTDIR)$(SBINDIR)/$$x; done
objscript.%: %
@$(VECHO) OBJSCRIPT $*
@@ -222,14 +217,14 @@
@$(VECHO) INSTALL
$(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR)
$(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR)
- $(INSTALL) -d $(BINDIR)
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
for x in $(INSTALL_OBJSCRIPT); do \
- $(INSTALL) -m 755 objscript.$$x $(BINDIR)/$$x; done
- cd $(BINDIR) && ln -sf ld.hugetlbfs ld
+ $(INSTALL) -m 755 objscript.$$x $(DESTDIR)$(BINDIR)/$$x; done
+ cd $(DESTDIR)$(BINDIR) && ln -sf ld.hugetlbfs ld
install-docs:
- $(INSTALL) -d $(DOCDIR)
- for x in $(EXTRA_DIST); do $(INSTALL) -m 755 $$x $(DOCDIR)/$$x; done
+ $(INSTALL) -d $(DESTDIR)$(DOCDIR)
+ for x in $(EXTRA_DIST); do $(INSTALL) -m 755 $$x $(DESTDIR)$(DOCDIR)/$$x; done
install-tests: install # Force make to install the library first
${MAKE} -C tests install DESTDIR=$(DESTDIR) OBJDIRS="$(OBJDIRS)" LIB32=$(LIB32) LIB64=$(LIB64)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/NEWS new/libhugetlbfs-1.0.1/NEWS
--- old/libhugetlbfs-1.0/NEWS 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0.1/NEWS 2006-10-27 19:12:32.000000000 +0200
@@ -0,0 +1,29 @@
+libhugetlbfs 1.0.1 "Spicy Garlic"
+======================================================================
+
+This small maintenance release brings a security fix, a few minor bug
+fixes, plus some documentation and error message updates.
+
+Security
+
+* A section on security has been added to the README file
+* The hugetlbd daemon socket has been moved from /tmp to /var/run.
+ This will require the daemon to be run as root, which was previously
+ just a recommendation.
+
+Bug fixes
+
+* Reduce reserved huge pages needed for application start-up
+* PPC linker script fixes
+
+Trivial but notable changes
+
+* Always install linker scripts for all targets
+* Error message updates
+* Add documentation on HUGETLB_DEBUG
+* Testcase updates
+
+libhugetlbfs 1.0
+======================================================================
+
+* First stable release
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/README new/libhugetlbfs-1.0.1/README
--- old/libhugetlbfs-1.0/README 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/README 2006-10-27 19:12:32.000000000 +0200
@@ -40,3 +40,14 @@
libhugetlbfs-devel@lists.sourceforge.net and we'll help out as much as we
can. We will probably ask you to collect things like: straces,
/proc/pid/maps and gdb back traces.
+
+Security Considerations
+-----------------------------------------------------------------------------
+When using the segment sharing feature, you must take extra steps to avoid
+exposing an application to rogue code insertion. We recommend creating your
+hugetlbfs mount point with restricted permissions that allow only a specific
+user or group to access the files on the mount point. Specifically, you should
+restrict directory access (x) permissions for the mount point to the selected
+user or group only. The need to perform this manual lock-down will be
+unnecessary in a future release, though you may wish to continue the practice
+to restrict huge pages to certain users and/or processes.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/debug.d new/libhugetlbfs-1.0.1/debug.d
--- old/libhugetlbfs-1.0/debug.d 2006-10-04 17:16:17.000000000 +0200
+++ new/libhugetlbfs-1.0.1/debug.d 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-obj32/debug.o debug.d: debug.c hugetlbfs.h libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/elflink.c new/libhugetlbfs-1.0.1/elflink.c
--- old/libhugetlbfs-1.0/elflink.c 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/elflink.c 2006-10-27 19:12:32.000000000 +0200
@@ -185,6 +185,11 @@
int __debug = 0;
static Elf_Ehdr *ehdr;
+/*
+ * Parse an ELF header and record segment information for any segments
+ * which contain hugetlb information.
+ */
+
static void parse_phdrs(Elf_Ehdr *ehdr)
{
Elf_Phdr *phdr = (Elf_Phdr *)((char *)ehdr + ehdr->e_phoff);
@@ -230,6 +235,10 @@
}
}
+/*
+ * Look for non-zero BSS data inside a range and print out any matches
+ */
+
static void check_bss(unsigned long *start, unsigned long *end)
{
unsigned long *addr;
@@ -240,14 +249,15 @@
}
}
-/* Subtle: Since libhugetlbfs depends on glibc, we allow it
+/*
+ * Subtle: Since libhugetlbfs depends on glibc, we allow it
* it to be loaded before us. As part of its init functions, it
* initializes stdin, stdout, and stderr in the bss. We need to
* include these initialized variables in our copy.
*/
-static void get_extracopy(struct seg_info *seg, void *p,
- void **extra_start, void **extra_end)
+static void get_extracopy(struct seg_info *seg, void **extra_start,
+ void **extra_end)
{
Elf_Dyn *dyntab; /* dynamic segment table */
Elf_Phdr *phdr; /* program header table */
@@ -262,9 +272,9 @@
end_orig = seg->vaddr + seg->memsz;
start_orig = seg->vaddr + seg->filesz;
if (seg->filesz == seg->memsz)
- goto bail;
+ goto bail2;
if (!minimal_copy)
- goto bail;
+ goto bail2;
/* Find dynamic section */
i = 1;
@@ -298,7 +308,8 @@
goto bail;
}
- /* WARNING - The symbol table size calculation does not follow the ELF
+ /*
+ * WARNING - The symbol table size calculation does not follow the ELF
* standard, but rather exploits an assumption we enforce in
* our linker scripts that the string table follows
* immediately after the symbol table. The linker scripts
@@ -310,12 +321,15 @@
}
numsyms = ((void *)strtab - (void *)symtab) / sizeof(Elf_Sym);
- /* We must ensure any returns done hereafter have sane start and end
- values, as the criss-cross apple sauce algorithm is beginning */
+ /*
+ * We must ensure any returns done hereafter have sane start and end
+ * values, as the criss-cross apple sauce algorithm is beginning
+ */
start = end_orig;
end = start_orig;
- /* To reduce the size of the extra copy window, we can eliminate certain
+ /*
+ * To reduce the size of the extra copy window, we can eliminate certain
* symbols based on information in the dynamic section. The following
* characteristics apply to symbols which may require copying:
* - Within the BSS
@@ -356,31 +370,40 @@
/* No need to copy anything */
*extra_start = start_orig;
*extra_end = start_orig;
- goto bail2;
+ goto bail3;
}
bail:
+ DEBUG("Unable to perform minimal copy\n");
+bail2:
*extra_start = start_orig;
*extra_end = end_orig;
-bail2:
- DEBUG("Minimal copy was not performed\n");
+bail3:
return;
}
+/*
+ * Copy a program segment into a huge page. If possible, try to copy the
+ * smallest amount of data possible, unless the user disables this
+ * optimization via the HUGETLB_ELFMAP environment variable.
+ */
+
static int prepare_segment(struct seg_info *seg)
{
int hpage_size = gethugepagesize();
void *p, *extra_start, *extra_end;
unsigned long gap;
- unsigned long size = ALIGN(seg->memsz, hpage_size);
-
- /* Prepare the hugetlbfs file */
+ unsigned long size;
- /* Subtle, copying only filesz bytes of the segment
- * allows for much better performance than copying all of
- * memsz but it requires that all data (such as the plt)
- * be contained in the filesz portion of the segment.
+ /*
+ * Calculate the BSS size that we must copy in order to minimize
+ * the size of the shared mapping.
*/
+ get_extracopy(seg, &extra_start, &extra_end);
+ size = ALIGN((unsigned long)extra_end - (unsigned long)seg->vaddr,
+ hpage_size);
+
+ /* Prepare the hugetlbfs file */
p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, seg->fd, 0);
if (p == MAP_FAILED) {
@@ -389,12 +412,18 @@
return -1;
}
+ /*
+ * Subtle, copying only filesz bytes of the segment
+ * allows for much better performance than copying all of
+ * memsz but it requires that all data (such as the plt)
+ * be contained in the filesz portion of the segment.
+ */
+
DEBUG("Mapped hugeseg at %p. Copying %#0lx bytes from %p...\n",
p, seg->filesz, seg->vaddr);
memcpy(p, seg->vaddr, seg->filesz);
DEBUG_CONT("done\n");
- get_extracopy(seg, p, &extra_start, &extra_end);
if (extra_end > extra_start) {
DEBUG("Copying extra %#0lx bytes from %p...\n",
(unsigned long)(extra_end - extra_start), extra_start);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/elflink.d new/libhugetlbfs-1.0.1/elflink.d
--- old/libhugetlbfs-1.0/elflink.d 2006-10-04 17:16:17.000000000 +0200
+++ new/libhugetlbfs-1.0.1/elflink.d 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-obj32/elflink.o elflink.d: elflink.c hugetlbfs.h libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/hugetlbd.c new/libhugetlbfs-1.0.1/hugetlbd.c
--- old/libhugetlbfs-1.0/hugetlbd.c 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/hugetlbd.c 2006-10-27 19:12:32.000000000 +0200
@@ -846,15 +846,15 @@
sun.sun_family = AF_UNIX;
/* clear out any previous socket */
- unlink("/tmp/libhugetlbfs-sock");
- strcpy(sun.sun_path, "/tmp/libhugetlbfs-sock");
+ unlink(SOCKFILE);
+ strcpy(sun.sun_path, SOCKFILE);
ret = bind(sock, (struct sockaddr *)(&sun), sizeof(sun));
if (ret < 0) {
ERROR("bind() failed: %s\n", strerror(errno));
goto die;
}
- chmod("/tmp/libhugetlbfs-sock", 0666);
+ chmod(SOCKFILE, 0666);
ret = listen(sock, QUEUE_LENGTH);
if (ret < 0) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/hugetlbd.h new/libhugetlbfs-1.0.1/hugetlbd.h
--- old/libhugetlbfs-1.0/hugetlbd.h 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/hugetlbd.h 2006-10-27 19:12:32.000000000 +0200
@@ -26,6 +26,7 @@
#define ID_KEY 0x56
#define LOGFILE "/tmp/hugetlbd.log"
+#define SOCKFILE "/var/run/libhugetlbfs-sock"
/*
* Ideally, would like to deal with this better, so that a 32-bit daemon
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/hugeutils.c new/libhugetlbfs-1.0.1/hugeutils.c
--- old/libhugetlbfs-1.0/hugeutils.c 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/hugeutils.c 2006-10-27 19:12:32.000000000 +0200
@@ -213,8 +213,9 @@
tmp++;
}
- ERROR("Could not find hugetlbfs mount point in /proc/mounts. "
- "Is it mounted?\n");
+ WARNING("Could not find hugetlbfs mount point in /proc/mounts. "
+ "Is it mounted?\n");
+
return NULL;
}
@@ -319,7 +320,7 @@
}
sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, "/tmp/libhugetlbfs-sock");
+ strcpy(sun.sun_path, SOCKFILE);
ret = connect(sock, &sun, sizeof(sun));
if (ret < 0) {
ERROR("connect() failed: %s\n", strerror(errno));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/hugeutils.d new/libhugetlbfs-1.0.1/hugeutils.d
--- old/libhugetlbfs-1.0/hugeutils.d 2006-10-04 17:16:17.000000000 +0200
+++ new/libhugetlbfs-1.0.1/hugeutils.d 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-obj32/hugeutils.o hugeutils.d: hugeutils.c libhugetlbfs_internal.h \
- hugetlbfs.h hugetlbd.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xB new/libhugetlbfs-1.0.1/ldscripts/elf32ppclinux.xB
--- old/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xB 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/ldscripts/elf32ppclinux.xB 2006-10-27 19:12:32.000000000 +0200
@@ -199,6 +199,7 @@
.bss :
{
*(.dynbss)
+ *(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
/*
* Align here to ensure that the .bss section occupies space up to
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/morecore.d new/libhugetlbfs-1.0.1/morecore.d
--- old/libhugetlbfs-1.0/morecore.d 2006-10-04 17:16:17.000000000 +0200
+++ new/libhugetlbfs-1.0.1/morecore.d 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-obj32/morecore.o morecore.d: morecore.c hugetlbfs.h \
- libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/tests/Makefile new/libhugetlbfs-1.0.1/tests/Makefile
--- old/libhugetlbfs-1.0/tests/Makefile 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/tests/Makefile 2006-10-27 19:12:32.000000000 +0200
@@ -28,8 +28,8 @@
SCRIPTS32 = $(SCRIPTS)/$(ELF32)
SCRIPTS64 = $(SCRIPTS)/$(ELF64)
HUGETLBFS_LD=../ld.hugetlbfs
-LIBDIR32 = $(DESTDIR)$(PREFIX)/$(LIB32)
-LIBDIR64 = $(DESTDIR)$(PREFIX)/$(LIB64)
+LIBDIR32 = $(PREFIX)/$(LIB32)
+LIBDIR64 = $(PREFIX)/$(LIB64)
INST_TESTSDIR32 = $(LIBDIR32)/libhugetlbfs/tests
INST_TESTSDIR64 = $(LIBDIR64)/libhugetlbfs/tests
@@ -137,17 +137,17 @@
obj32/install:
@$(VECHO) INSTALL32 $(INST_TESTSDIR32)
- $(INSTALL) -d $(INST_TESTSDIR32)
- $(INSTALL) -d $(INST_TESTSDIR32)/obj32
- $(INSTALL) -m 755 $(TESTS:%=obj32/%) $(INST_TESTSDIR32)/obj32
- $(INSTALL) -m 755 run_tests.sh $(INST_TESTSDIR32)
+ $(INSTALL) -d $(DESTDIR)$(INST_TESTSDIR32)
+ $(INSTALL) -d $(DESTDIR)$(INST_TESTSDIR32)/obj32
+ $(INSTALL) -m 755 $(TESTS:%=obj32/%) $(DESTDIR)$(INST_TESTSDIR32)/obj32
+ $(INSTALL) -m 755 run_tests.sh $(DESTDIR)$(INST_TESTSDIR32)
obj64/install:
@$(VECHO) INSTALL64 $(INST_TESTSDIR64)
- $(INSTALL) -d $(INST_TESTSDIR64)
- $(INSTALL) -d $(INST_TESTSDIR64)/obj64
- $(INSTALL) -m 755 $(TESTS:%=obj64/%) $(INST_TESTSDIR64)/obj64
- $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(INST_TESTSDIR64)/obj64
- $(INSTALL) -m 755 run_tests.sh $(INST_TESTSDIR64)
+ $(INSTALL) -d $(DESTDIR)$(INST_TESTSDIR64)
+ $(INSTALL) -d $(DESTDIR)$(INST_TESTSDIR64)/obj64
+ $(INSTALL) -m 755 $(TESTS:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
+ $(INSTALL) -m 755 $(TESTS_64:%=obj64/%) $(DESTDIR)$(INST_TESTSDIR64)/obj64
+ $(INSTALL) -m 755 run_tests.sh $(DESTDIR)$(INST_TESTSDIR64)
install: $(OBJDIRS:%=%/install)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/tests/linkshare.c new/libhugetlbfs-1.0.1/tests/linkshare.c
--- old/libhugetlbfs-1.0/tests/linkshare.c 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/tests/linkshare.c 2006-10-27 19:12:32.000000000 +0200
@@ -168,7 +168,10 @@
num_sharings = atoi(argv[1]);
if (num_sharings > 99999)
- FAIL("Too many sharings requested (max = 99999)");
+ CONFIG("Too many sharings requested (max = 99999)");
+ if (num_sharings <= 0)
+ CONFIG("Number of sharings requested must be greater "
+ "than or equal to 0");
children = (pid_t *)malloc(num_sharings * sizeof(pid_t));
if (!children)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-1.0/tests/mlock.c new/libhugetlbfs-1.0.1/tests/mlock.c
--- old/libhugetlbfs-1.0/tests/mlock.c 2006-10-04 17:16:15.000000000 +0200
+++ new/libhugetlbfs-1.0.1/tests/mlock.c 2006-10-27 19:12:32.000000000 +0200
@@ -29,46 +29,36 @@
#include