Date: Fri, 5 Feb 1999 10:27:10 -0800 (PST) From: John Polstra <jdp@polstra.com> To: dillon@FreeBSD.ORG Cc: committers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/vm vm_unix.c Message-ID: <199902051827.KAA22713@vashon.polstra.com> In-Reply-To: <199902050749.XAA35519@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <199902050749.XAA35519@freefall.freebsd.org>, Matt Dillon <dillon@FreeBSD.ORG> wrote: > dillon 1999/02/04 23:49:29 PST > > Modified files: > sys/vm vm_unix.c > Log: > The elf loader sets the permissions on bss to VM_PROT_READ|VM_PROT_WRITE > rather then VM_PROT_ALL. obreak, on the otherhand, uses VM_PROT_ALL. > This prevents vm_map_insert() from being able to coalesce the heap and > creates an extra map entry. Since current architectures ignore > VM_PROT_EXECUTE anyway, and since not having VM_PROT_EXECUTE on data/bss > may provide protection in the future, obreak now uses read+write rather > then all (r+w+x). > > This is an optimization, not a bug fix. > > Submitted by: Alan Cox <alc@cs.rice.edu> Wouldn't this change break things like just-in-time compilers, if it weren't for the quirk that our currently-supported architectures ignore VM_PROT_EXECUTE? I think it would be more correct to take the opposite approach and make the ELF loader use VM_PROT_ALL. That's what is done for a.out. I believe the stack already needs to be VM_PROT_ALL, because of the signal trampoline code. I think we should change the ELF loader and RTLD to grant execute permission whenever read permission is present. I'm willing to do the work if there's agreement. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902051827.KAA22713>