From owner-p4-projects@FreeBSD.ORG Tue Jan 16 22:52:16 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A14716A494; Tue, 16 Jan 2007 22:52:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4086516A416 for ; Tue, 16 Jan 2007 22:52:16 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 30B9613C457 for ; Tue, 16 Jan 2007 22:52:16 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0GMqGW7051486 for ; Tue, 16 Jan 2007 22:52:16 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0GMqFdx051482 for perforce@freebsd.org; Tue, 16 Jan 2007 22:52:15 GMT (envelope-from jkim@freebsd.org) Date: Tue, 16 Jan 2007 22:52:15 GMT Message-Id: <200701162252.l0GMqFdx051482@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 113025 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 22:52:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=113025 Change 113025 by jkim@jkim_hammer on 2007/01/16 22:52:01 Check PROT_READ before setting PROT_EXEC. Linux has added READ_IMPLIES_EXEC personality but we do not have the feature. We just assume it is always on to make it backward compatible. This fixes mmap05 LTP test case on amd64. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#21 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#21 (text+ko) ==== @@ -877,11 +877,12 @@ } /* - * We add PROT_EXEC to work around buggy applications (e.g. Java) - * that take advantage of the fact that execute permissions are not - * enforced by x86 CPUs. + * Linux has added READ_IMPLIES_EXEC personality but we do not support + * the feature yet. We just assume READ_IMPLIES_EXEC is always on. */ - bsd_args.prot = linux_args->prot | PROT_EXEC; + if (linux_args->prot & PROT_READ) + bsd_args.prot = linux_args->prot | PROT_EXEC; + if (linux_args->flags & LINUX_MAP_ANON) bsd_args.fd = -1; else {