From: "Jan Beulich" Subject: Re: /dev/mem Date: Wed, 25 Jan 2006 09:24:07 +0100 Message-ID: <43D743B7.76F0.0078.0@novell.com> References: <43D66354.76F0.0078.0@novell.com> <9dcd52b41ebe4d540aa9654e1cff3ecd@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9dcd52b41ebe4d540aa9654e1cff3ecd@cl.cam.ac.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> Finally, while following the involved code paths, I noted a check that >> is made in __ioremap, by calling >> is_local_lowmem(). It would seem to me that calling this function just >> for the first address is insufficient - the range >> specified may begin in non-lowmem but end in lowmem. Or it may begin >> in lowmem and end in non-lowmem, in which case I >> would think that virt_to_page() wouldn't work correctly anymore >> (permitting, say, an erroneous dd command issued by root >> to result in an oops or maybe worse things). > >It's assumed people using those interfaces know what they're doing. How >can a 'dd' end up in __ioremap() anyway? /dev/mem's read/write handlers call ioremap... Jan