From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Subject: Re: [PATCH 06/14] Pramfs: Include files Date: Wed, 24 Jun 2009 18:49:41 +0200 Message-ID: <4A425925.7000601@gmail.com> References: <4A33A7EC.6070008@gmail.com> <200906232355.34134.arnd@arndb.de> <2ea1731b0906232332n2488d452p27419eac7edab7e4@mail.gmail.com> <200906241730.37151.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: David Woodhouse , =?UTF-8?B?SsO2cm4gRW5nZWw=?= , Sam Ravnborg , Tim Bird , Chris Simmonds , Linux FS Devel , Linux Embedded , Linux Kernel To: Arnd Bergmann Return-path: In-Reply-To: <200906241730.37151.arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Arnd Bergmann wrote: > On Wednesday 24 June 2009, Marco Stornelli wrote: >>> Actually, reading from /dev/mem is only valid on real RAM. If the nvram >>> is part of an IO memory mapping, you have to do mmap()+memcpy() rather >>> than read(). So dd won't do it, but it's still easy to read from user >>> space. >> For "security" reasons pram reserve the region of memory with >> reserve_mem_region_exclusive()..... > > That will only prevent other device drivers from stepping on it, > /dev/mem does not care about mem_region reservations. > > Arnd <>< > Userland may not map this resource, so /dev/mem and the sysfs MMIO access will not be allowed. This restriction depends on STRICT_DEVMEM option. It's true that currently is only implemented in the x86 world. Marco