Bug 1812 - Solaris needs mprotect to allow code execution
Summary: Solaris needs mprotect to allow code execution
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: SPARC Solaris
: high normal
Assignee: Alan Coopersmith
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-09 19:06 UTC by Alan Coopersmith
Modified: 2004-12-07 03:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[FIXED_X11R68x] Patch to xc/programs/Xserver/hw/xfree86/loader/elfloader.c (1.51 KB, patch)
2004-11-09 19:08 UTC, Alan Coopersmith
roland.mainz: 6.8-branch+
Details | Splinter Review

Description Alan Coopersmith 2004-11-09 19:06:47 UTC
Solaris 10 x86 will support the NX feature of the AMD64 CPU's, so 
mprotect(..., PROT_EXEC) needs to be called on memory areas we plan to execute.

This is already done in elfloader.c for Linux & OpenBSD, so the #ifdefs there 
just need to be modified to add || defined(sun) to add Solaris to the platforms.
Comment 1 Alan Coopersmith 2004-11-09 19:08:43 UTC
Created attachment 1263 [details] [review]
[FIXED_X11R68x] Patch to xc/programs/Xserver/hw/xfree86/loader/elfloader.c
Comment 2 Alan Coopersmith 2004-11-09 19:09:32 UTC
Fix committed to Xorg CVS head:

2004-10-30  Alan Coopersmith  <alan.coopersmith@sun.com>

	* xc/programs/Xserver/hw/xfree86/loader/elfloader.c:
	Add Solaris to the platforms on which mprotect is run to set
	execute permissions when necessary.  (Sun bug id #6175128 - 
	fix by Alan Coopersmith)
Comment 3 Roland Mainz 2004-11-19 07:33:07 UTC
Comment on attachment 1263 [details] [review]
[FIXED_X11R68x] Patch to xc/programs/Xserver/hw/xfree86/loader/elfloader.c

Approved for the X11R6.8.x branch in the 2004-11-17 release-wranglers phone
call.
Please don't commit it yourself, I'll handle that once the CVS service is
available again.
Comment 4 Roland Mainz 2004-12-07 22:26:11 UTC
Comment on attachment 1263 [details] [review]
[FIXED_X11R68x] Patch to xc/programs/Xserver/hw/xfree86/loader/elfloader.c

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.12; previous revision: 1.365.2.11
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v  <--  elfloader.c
new revision: 1.2.4.1; previous revision: 1.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.