Re: Kernel Virtual Memory

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

 



hello...

>  but what is the KERNEL's virtual memory ?
well, it is virtual memory too..only, the pages which is mapped in this 
area has Supervisor flag set...so it can be accessed only in kernel 
mode (CPL--Current Privilege Level 0)

> how come the kernel has a virtual memory, too ? like a process ?
because kernel (after init stage is passed and fully operated) works in 
x86 protected mode (here we talk strictly about x86). every memory 
access is done via this phase:
logical address-->virtual addr--> physical

So, in other word, if kernel try to access memory in protected mode, it 
issues virtual address...and MMU will translate it into physical 
address. Virtual memory itself is a result of segmentation plus 
paging....two basics mechanism that provides clue to MMU on how to turn 
virtual address into physical address.

And yes, kernel do have its own page table...it is referred  by so 
called "master kernel page global directory"...this is the same page 
tables that define the upper (>3GB) process address space (in 3G/1G VM 
split). It is built on early phase of kernel init. Check out 
startup_32().

> what does the /dev/kmem show ?
IIRC, it shows kernel virtual memory content....if you look at 
phrack.org's article, you will see numerous articles there mentioning 
"tricks" on how to use it...ranging from "good" to "very nasty" 
intention... :)

> isn't the kernel just a bunch of asynchronous functions,
> working without a memory descriptor ?
What do you mean by "without  memory descriptor"? 

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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