Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2017 08:56:05 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325134 - in head: libexec/rtld-elf sbin/ldconfig
Message-ID:  <201710300856.v9U8u51Z061414@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon Oct 30 08:56:04 2017
New Revision: 325134
URL: https://svnweb.freebsd.org/changeset/base/325134

Log:
  Use MAP_PRIVATE instead of obsolete MAP_COPY.  No functional changes.
  
  MFC after:	2 weeks

Modified:
  head/libexec/rtld-elf/malloc.c
  head/sbin/ldconfig/ldconfig.c

Modified: head/libexec/rtld-elf/malloc.c
==============================================================================
--- head/libexec/rtld-elf/malloc.c	Mon Oct 30 08:55:10 2017	(r325133)
+++ head/libexec/rtld-elf/malloc.c	Mon Oct 30 08:56:04 2017	(r325134)
@@ -479,7 +479,7 @@ int	n;
 
 	if ((pagepool_start = mmap(0, n * pagesz,
 			PROT_READ|PROT_WRITE,
-			MAP_ANON|MAP_COPY, fd, 0)) == (caddr_t)-1) {
+			MAP_ANON|MAP_PRIVATE, fd, 0)) == (caddr_t)-1) {
 		rtld_printf("Cannot map anonymous memory\n");
 		return 0;
 	}

Modified: head/sbin/ldconfig/ldconfig.c
==============================================================================
--- head/sbin/ldconfig/ldconfig.c	Mon Oct 30 08:55:10 2017	(r325133)
+++ head/sbin/ldconfig/ldconfig.c	Mon Oct 30 08:56:04 2017	(r325134)
@@ -550,7 +550,7 @@ readhints(void)
 	}
 
 	msize = PAGE_SIZE;
-	addr = mmap(0, msize, PROT_READ, MAP_COPY, fd, 0);
+	addr = mmap(0, msize, PROT_READ, MAP_PRIVATE, fd, 0);
 
 	if (addr == MAP_FAILED) {
 		warn("%s", hints_file);
@@ -573,7 +573,7 @@ readhints(void)
 	if (hdr->hh_ehints > msize) {
 		fsize = hdr->hh_ehints;
 		munmap(addr, msize);
-		addr = mmap(0, fsize, PROT_READ, MAP_COPY, fd, 0);
+		addr = mmap(0, fsize, PROT_READ, MAP_PRIVATE, fd, 0);
 		if (addr == MAP_FAILED) {
 			warn("%s", hints_file);
 			return -1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710300856.v9U8u51Z061414>