Bug 234073

Summary: xorg should not expand legacy mmap area
Product: [Fedora] Fedora Reporter: Bjorn Helgaas <bjorn.helgaas>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: prarit, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-10 20:32:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
don't expand legacy mmap (expanded range might span incompatible attrs)
none
check for mmap failure none

Description Bjorn Helgaas 2007-03-26 21:03:59 UTC
If we're mapping something in the "legacy range" (0-1Mb), we shouldn't
expand the requested range to the entire 0-1Mb range.  Typically this
is for mapping the VGA frame buffer, and some platforms support mmap of
the frame buffer but not the entire 0-1Mb range.

For example, HP sx1000 and sx2000 ia64 platforms can have memory from
0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from
0xc0000-0xfffff.  On these platforms, we can't map the entire 0-1Mb
range with the same attribute because the memory only supports WB,
while the frame buffer supports only UC.  But an mmap of just the
frame buffer should work fine.

Please incorporate the xorg patches here:
https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=115881

Upstream:
 
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=ae3c9ad4abe66784d7ee474455003d2745699286 
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=bd0c829654903ca45543dfa59cda967c4fafd8ac

Comment 1 Bjorn Helgaas 2007-03-26 21:07:44 UTC
This is related to:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=234069

The xorg patches are safe even without the kernel patches from 234069.

If the kernel patches in 234069 are applied without the xorg patches,
the X server will start failing because the 0-1MB mmap fails.

Comment 2 Bjorn Helgaas 2007-04-04 16:38:54 UTC
Created attachment 151676 [details]
don't expand legacy mmap (expanded range might span incompatible attrs)

Copying patch here from issue tracker (davej wanted this for the kernel
patches, so I'll do it for the xorg patches as well).

Comment 3 Bjorn Helgaas 2007-04-04 16:39:56 UTC
Created attachment 151677 [details]
check for mmap failure

Comment 4 Adam Jackson 2007-04-09 20:30:54 UTC
Comment on attachment 151676 [details]
don't expand legacy mmap (expanded range might span incompatible attrs)

Already present in 1.3 branch.

Comment 5 Adam Jackson 2007-04-10 20:32:02 UTC
Fixed in 1.2.99.905-2, thanks!