From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Date: Wed, 05 May 2004 15:44:48 +0000 Subject: Re: mmap() of /dev/kmem issue Message-Id: <20040505154448.GW2281@parcelfarce.linux.theplanet.co.uk> List-Id: References: <4097C51D.71EA0BEA@email.mot.com> In-Reply-To: <4097C51D.71EA0BEA@email.mot.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org On Wed, May 05, 2004 at 08:08:21AM -0700, Luck, Tony wrote: > Mapping kernel memory as uncacheable into a user process > seems like a recipe for disaster (well at least for an > MCA when the processor catches you using mixed attributes). ... which is why we don't do that. See drivers/char/mem.c::mmap_mem(). We call uncached_access() which does: #elif defined(CONFIG_IA64) /* * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. */ return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain