problem mapping physical address from /dev/mem
Vaibhav Jain
vjoss197 at gmail.com
Thu Oct 6 18:43:30 EDT 2011
On Thu, Oct 6, 2011 at 11:28 AM, Mulyadi Santosa
<mulyadi.santosa at gmail.com>wrote:
> Hi...
>
> On Thu, Oct 6, 2011 at 02:34, Vaibhav Jain <vjoss197 at gmail.com> wrote:
> > Hi,
> >
> > I am trying to run a program that scans memory from a given physical
> address
> > using /dev/mem.
> > It uses mmap to map physical address from /dev/mem. So to start with I
> used
> > /proc/iomem to look up the
> > physical memory mapping and found the address 00010000 to be the starting
> > address for System ram. But whenever I
> > provide this address to the program it throws an error of "Operation not
> > permitted".
>
> Probably this could also due to mmap NULL dereferencing protection (at
> least that's how I name it :) )
>
> By default, the lowest 65536 byte (10000 in hex) is protected from
> mapping etc. It practically render such null dererefencing useless.
>
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
Hi,
I tried the same with other addresses (greater than 0x10000 ) also but it is
throwing the same error.
Is there a way to get over this ?
Thanks
Vaibhav Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111006/697e9dd3/attachment.html
More information about the Kernelnewbies
mailing list