[lkml]   [2003]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] prevent "dd if=/dev/mem" crash
>>>>> On Fri, 17 Oct 2003 17:49:55 -0700, Andrew Morton <> said:

Andrew> We _want_ to be able to read mmio ranges via /dev/mem, don't
Andrew> we? I guess it has never come up because everyone uses
Andrew> kmem.

I just don't see how making a "dd if=/dev/mem" safe and allowing
access to arbitrary physical memory can go to together. Given that
/dev/mem _is_ being used for accessing mmio space, is it really worth
bothering trying to make such a "dd" safe?

Andrew> If the hardware doesn't give the system programmer a choice
Andrew> then the hardware is poorly designed, surely?

Emh, we're talking about _physical_ memory accesses here. AFAIK,
failures on physical memory accesses are never signaled with
synchronous faults (not on any reasonably modern high performance
architecture, at least). Loads probably _could_ be signalled
synchronously, but consider stores: would you really want to wait with
retiring a store until it has made it all the way to some slow ISA
device? I think not (IN/OUT do that). No, modern CPUs check the
TLB/page-table and if that check passes, they'll _assume_ the memory
access will complete without errors. If it doesn't, they signal an
asynchronous failure (e.g., via an MCA).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.088 / U:8.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site