Re: [RFC] prevent "dd if=/dev/mem" crash

From: Andrew Morton <>
Date: 2003-10-18 08:50:28
Bjorn Helgaas <> wrote:
> Old behavior:
>     # dd if=/dev/mem of=/dev/null
>     <unrecoverable machine check>

I recently fixed this for ia32 by changing copy_to_user() to not oops if
the source address generated a fault.  Similarly copy_from_user() returns
an error if the destination generates a fault.

In other words: drivers/char/mem.c requires that the architecture's
copy_*_user() functions correctly handle faults on either the source or
dest of the copy.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Fri Oct 17 18:53:09 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST