From owner-svn-src-all@FreeBSD.ORG Thu Oct 13 19:25:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42B96106566C; Thu, 13 Oct 2011 19:25:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D510B8FC13; Thu, 13 Oct 2011 19:25:40 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7173A46B0D; Thu, 13 Oct 2011 15:25:40 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0EC028A02E; Thu, 13 Oct 2011 15:25:40 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Date: Thu, 13 Oct 2011 15:25:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201110131825.p9DIPAJs027201@svn.freebsd.org> In-Reply-To: <201110131825.p9DIPAJs027201@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110131525.39464.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 13 Oct 2011 15:25:40 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226349 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2011 19:25:41 -0000 On Thursday, October 13, 2011 2:25:10 pm Marcel Moolenaar wrote: > Author: marcel > Date: Thu Oct 13 18:25:10 2011 > New Revision: 226349 > URL: http://svn.freebsd.org/changeset/base/226349 > > Log: > Wrap mprotect(2) so that we can add execute permissions when read > permissions are requested. This is needed on amd64 and ia64 for > JDK 1.4.x > > Modified: > head/sys/compat/freebsd32/freebsd32_misc.c > head/sys/compat/freebsd32/freebsd32_proto.h > head/sys/compat/freebsd32/freebsd32_syscall.h > head/sys/compat/freebsd32/freebsd32_syscalls.c > head/sys/compat/freebsd32/freebsd32_sysent.c > head/sys/compat/freebsd32/freebsd32_systrace_args.c > > Modified: head/sys/compat/freebsd32/freebsd32_misc.c > ============================================================================== > --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Oct 13 18:21:11 2011 (r226348) > +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Oct 13 18:25:10 2011 (r226349) > @@ -437,6 +437,21 @@ freebsd32_mmap_partial(struct thread *td > #endif > > int > +freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap) > +{ > + struct mprotect_args ap; > + > + ap.addr = (void *)(uintptr_t)uap->addr; Maybe use PTRIN() here? > + ap.len = uap->len; > + ap.prot = uap->prot; > +#if defined(__amd64__) || defined(__ia64__) > + if (ap.prot & PROT_READ) > + ap.prot |= PROT_EXEC; > +#endif > + return (sys_mprotect(td, &ap)); > +} > + > +int -- John Baldwin