Error reading /dev/mem

Mulyadi Santosa mulyadi.santosa at gmail.com
Sat Oct 1 13:45:39 EDT 2016


On Wed, Sep 28, 2016 at 2:49 AM, Paddie O'Brien <paddieobrien at gmail.com>
wrote:

> Hi,
>
> I have a system call that maps virtual to physical addresses. I have
> disabled CONFIG_STRICT_DEVMEM and am reading from /dev/mem to verify
> that the contents of the syscall-returned physical address match the
> contents of the virtual address. It works fine up to a point. Reading
> beyond byte 935321597 in /dev/mem throws a "bad address" error. Not
> sure it's relevant but I'm running on virtual box and specifying 1GB
> of RAM. Tried with 2GB of RAM and hit the same problem.
>
> Any idea why I can't read beyond the above point?
>
> Thanks.
>
>
Hi paddie

Is it 32 bit system?

If yes, it seems you are about to exceed boundary of kernel linear addres
range, which is 0-896 MiB. The upper 896-1024 MiB (1 GiB) is reserved for
dynamic mapping

CMIIW people.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161002/b87fa50e/attachment.html 


More information about the Kernelnewbies mailing list