lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject/dev/mem "unbounded?"
Dear LKML,

In the previous kernels, valid_phys_addr_range was not
defined for x86, and used the static variant which
returned 0 if access went above __pa(high_memory).

Current behavior, though, relies on the x86 variant
of valid_phys_addr_range, defined in arch/x86/include/asm/io.h,
that always returns 1, hence, reading will never end since there
won't be any condition (barring an MCE on physical hardware) that
would say "Bad Address". Is this supposed to be by design?

How about exposing the "top" allocated resource address from
linux/kernel/resource.c? That way /dev/mem will know when
all the "interesting" bits end, and can return -EFAULT for
everything above that.

Thanks,
A



\
 
 \ /
  Last update: 2011-11-09 22:03    [W:0.291 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site