From owner-svn-src-stable@freebsd.org Mon May 29 13:18:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EEE8CFF283; Mon, 29 May 2017 13:18:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E82D7999C; Mon, 29 May 2017 13:18:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TDIKa3001935; Mon, 29 May 2017 13:18:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TDIK1h001934; Mon, 29 May 2017 13:18:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705291318.v4TDIK1h001934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 May 2017 13:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319134 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 13:18:21 -0000 Author: kib Date: Mon May 29 13:18:20 2017 New Revision: 319134 URL: https://svnweb.freebsd.org/changeset/base/319134 Log: MFC r318312: Fix the AT_EXECFD functionality. Modified: stable/11/libexec/rtld-elf/map_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/map_object.c ============================================================================== --- stable/11/libexec/rtld-elf/map_object.c Mon May 29 13:17:00 2017 (r319133) +++ stable/11/libexec/rtld-elf/map_object.c Mon May 29 13:18:20 2017 (r319134) @@ -193,6 +193,8 @@ map_object(int fd, const char *path, con base_flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE; if (npagesizes > 1 && round_page(segs[0]->p_filesz) >= pagesizes[1]) base_flags |= MAP_ALIGNED_SUPER; + if (base_vaddr != 0) + base_flags |= MAP_FIXED | MAP_EXCL; mapbase = mmap(base_addr, mapsize, PROT_NONE, base_flags, -1, 0); if (mapbase == (caddr_t) -1) {