From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Fri, 17 Oct 2003 22:50:28 +0000 Subject: Re: [RFC] prevent "dd if=/dev/mem" crash Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org Bjorn Helgaas wrote: > > Old behavior: > > # dd if=/dev/mem of=/dev/null > 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.