Re: address space of kernel thread
Hi On Wed, Aug 25, 2010 at 02:04, Parmenides wrote: > Hmm..., it's really a good idea. Now, I am interested some details > about how to borrow latest normal process's address space. And, what > is a ***latest*** normal process? Borrow--> by simply taking their "mm" property..such as x->mm=latest->mm where x is current kernel thread memory struct (which represent its whole address space), and latest is latest process which is going to be switched out of processor :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Re: address space of kernel thread
> it "borrows" latest normal process's (e.g non kernel thread) memory > address space. Why is it possible? simple, because kernel address > space is the same for every process...kernel address space is mapped > equally for all... Hmm..., it's really a good idea. Now, I am interested some details about how to borrow latest normal process's address space. And, what is a ***latest*** normal process? 2010/8/23 Mulyadi Santosa : > OK, let's see if I can make it real straight :D > > On Sun, Aug 22, 2010 at 17:28, Parmenides wrote: >> Hi, >> >> It's said that kernel thread is running in kernel address space only. > > See, it's "kernel" thread, meaning it's a thread that operates in > kernel mode. Thus, no wonder it just "wander" in kernel land only... > in this case, the fancy words are: "kernel address space" > > But this doesn;t mean it could not communicate with user mode, if necessary... > >> I wonder what's the meaning of "running in kernel address space only". >> When kernel thread running, which page table is used? Is there any >> special characteristics of this page table? > > it "borrows" latest normal process's (e.g non kernel thread) memory > address space. Why is it possible? simple, because kernel address > space is the same for every process...kernel address space is mapped > equally for all... > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Re: address space of kernel thread
OK, let's see if I can make it real straight :D On Sun, Aug 22, 2010 at 17:28, Parmenides wrote: > Hi, > > It's said that kernel thread is running in kernel address space only. See, it's "kernel" thread, meaning it's a thread that operates in kernel mode. Thus, no wonder it just "wander" in kernel land only... in this case, the fancy words are: "kernel address space" But this doesn;t mean it could not communicate with user mode, if necessary... > I wonder what's the meaning of "running in kernel address space only". > When kernel thread running, which page table is used? Is there any > special characteristics of this page table? it "borrows" latest normal process's (e.g non kernel thread) memory address space. Why is it possible? simple, because kernel address space is the same for every process...kernel address space is mapped equally for all... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Re: address space of kernel thread
On 8/22/2010 3:58 PM, Parmenides wrote: Hi, It's said that kernel thread is running in kernel address space only. I wonder what's the meaning of "running in kernel address space only". X86 Architecture defines 4 logical rings which acts as a protection mechanism. When code is running in ring 0 (aka kernel thread) it means its segment selector (RPL) and Descriptor data structures are 'marked' with 0. This is in contrast with user space programs with segment selector is 3 (ring 3). So kernel space threads or user space threads are the CPL , RPL and DPL values. When kernel thread running, which page table is used? Is there any special characteristics of this page table? Page table keeps mapping between virtual pages and physical page frames. And when ever a kernel thread allocates memory each page allocated is marked as only readable or writable via kernel code. etc... Thanks -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Re: address space of kernel thread
http://ldn.linuxfoundation.org/article/kernel-symbols-whats-available-your-module-what-isnt On Sun, Aug 22, 2010 at 3:58 PM, Parmenides wrote: > Hi, > > It's said that kernel thread is running in kernel address space only. > I wonder what's the meaning of "running in kernel address space only". > When kernel thread running, which page table is used? Is there any > special characteristics of this page table? > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecar...@nl.linux.org > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Tapas http://mightydreams.blogspot.com http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
address space of kernel thread
Hi, It's said that kernel thread is running in kernel address space only. I wonder what's the meaning of "running in kernel address space only". When kernel thread running, which page table is used? Is there any special characteristics of this page table? -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ