Re: /dev/mem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Prabhu,

On Tue, Oct 26, 2010 at 9:19 PM, Prabhu nath <gprabhunath@xxxxxxxxx> wrote:
> Dear All,
>
>           Can you please clarify my doubt on /dev/mem
>
>          When I open /dev/mem, Is that entire physical address space is
> associated to /dev/mem or only the system memory ?
>          * If I can mmap the kernel memory in read write mode, I can screw
> up the whole kernel. Is that right ?

Absolutely.

>          * Suppose I map a random memory page frame (let's assume it is a
> free page) from physical address 1abde000 to 1abdf000,
>            then will the page allocator not allocate this page to to any
> other task or to the kernel ?

Accessing through /dev/mem has no impact on the page allocator.

Accessing memory through /dev/mem is the same thing as the kernel
accessing that memory from within kernel space. You can access
allocated pages, unallocated pages, device  registers, pretty much
anything at all. Writing indiscriminantly through /dev/mem is the same
thing as writing indiscriminantly from within a driver.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux