Bug 234073 - xorg should not expand legacy mmap area
Summary: xorg should not expand legacy mmap area
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-26 21:03 UTC by Bjorn Helgaas
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-10 20:32:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
don't expand legacy mmap (expanded range might span incompatible attrs) (1.30 KB, patch)
2007-04-04 16:38 UTC, Bjorn Helgaas
no flags Details | Diff
check for mmap failure (1.29 KB, patch)
2007-04-04 16:39 UTC, Bjorn Helgaas
no flags Details | Diff

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!


Note You need to log in before you can comment on or make changes to this bug.