From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: [patch 4/6] xip: support non-struct page backed memory Date: Tue, 04 Mar 2008 10:06:42 +0100 Message-ID: <47CD1122.6090807@de.ibm.com> References: <20080118045649.334391000@suse.de> <20080118045755.735923000@suse.de> <6934efce0803010014p2cc9a5edu5fee2029c0104a07@mail.gmail.com> <47CBB44D.7040203@de.ibm.com> <6934efce0803031138g725f0ec4ra683d56615b7dbe0@mail.gmail.com> <20080303203202.GI8974@wotan.suse.de> Reply-To: carsteno@de.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nick Piggin , Jared Hulbert , carsteno@de.ibm.com, Andrew Morton , mschwid2@linux.vnet.ibm.com, heicars2@linux.vnet.ibm.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org To: Linus Torvalds Return-path: Received: from mout0.freenet.de ([195.4.92.90]:40691 "EHLO mout0.freenet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753607AbYCDJHZ (ORCPT ); Tue, 4 Mar 2008 04:07:25 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Linus Torvalds wrote: > Implementing a kmap_pfn() sounds like a perfectly sane idea. But why does > it need to even be mapped into kernel space? Is it for the ELF header > reading or something (not having looked at the patch, just reacting to the > wrongness of using virt_to_phys())? It needs to be mapped into kernel space to do regular file operations other than mmap. In mm/filemap_xip.c we do access the xip memory from kernel to fulfill sys_read/sys_write and friends [copy_from/to_user to user's buffer]. so long, Carsten