Bug 296

Summary: [PATCH] ELF loader fixes for non-exec stack/heap on Linux
Product: xorg Reporter: Mike A. Harris <mharris>
Component: Server/GeneralAssignee: Default Bug Report Assignee <xorg>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: highest CC: dberkholz, eich
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 213    
Description Flags
exec-shield fixes for ELF loader none

Description Mike A. Harris 2004-03-09 15:57:28 UTC
The ELF loader breaks on Linux systems running non-exec stack/heap technology
such as exec-shield.  The patch I'm attaching below fixes 3 problems in
the loader.
Comment 1 Mike A. Harris 2004-03-09 15:58:31 UTC
Created attachment 136 [details] [review]
exec-shield fixes for ELF loader
Comment 2 Egbert Eich 2004-03-11 10:14:21 UTC
I believe this patch is fine. Has it been tested on OpenBSD? I trust it works
there - but just to make sure....
Comment 3 Egbert Eich 2004-03-11 10:19:55 UTC
Well, lets put it in anyway...
Comment 4 Mike A. Harris 2004-03-11 12:14:03 UTC
I believe it should work on OpenBSD, but it's only been tested on Linux
to my knowledge.  One problem I just noticed, is that the mprotect call
is assumed to succeed.  The return code should be checked on all system
calls and have proper error handling.  I'm going to update John's patch
to do that, and also search through the loader for similar errors.
Comment 5 Egbert Eich 2004-03-11 12:21:33 UTC
Looks like mprotect failing would almost certainly be fatal.

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.