lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix devmem_is_allowed for below 1MB accesses for an efi machine
On 10/02/2012 09:31 PM, Matthew Garrett wrote:
> On Tue, Oct 02, 2012 at 02:50:09PM -0700, H. Peter Anvin wrote:
>
>> That sounds like exactly the opposite of normal /dev/mem behavior... we
>> allow access to non-memory resources (which really could do anything if
>> misused), but not memory.
>
> From arch/x86/mm/init.c:
>
> * On x86, access has to be given to the first megabyte of ram because that area
> * contains bios code and data regions used by X and dosemu and similar apps.
>
> Limiting this to just RAM would be safer than it currently is. I'm not
> convinced that there's any good reason to allow *any* access down there
> for EFI systems, though.
>

Sorry, fail.

We *always* expose the I/O regions to /dev/mem. That is what /dev/mem
*does*. The above is an exception (which is really obsolete, too: we
should simply disallow access to anything which is treated as system
RAM, which doesn't include the BIOS regions in question; the only reason
we don't is that some versions of X take a checksum of the RAM in the
first megabyte as some kind of idiotic random seed.)

-hpa


\
 
 \ /
  Last update: 2012-10-03 07:21    [W:0.044 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site