Results 1 to 4 of 4
Arch - Linux 126.96.36.199-9-default x86_64 GNU/Linux Can a user process, while in kernel mode, dereference the address in the cr3 register to obtain the values in the page global directory?? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-21-2008 #1
User process and cr3 register
Arch - Linux 188.8.131.52-9-default x86_64 GNU/Linux
Can a user process, while in kernel mode, dereference the address in the cr3 register to obtain the values in the page global directory?? I tried but Linux keeps crashing...So my question is, is this possible, a yes or no response is all I'm looking for...Thanks in advance Gerard4143
- 01-01-2009 #2
- Join Date
- Jan 2009
How did you test? If you write a user level program, it will never have kernel privilege. It can call system calls to do something like writing to a file. In that case, the kernel is said to be running under the process context but the kernel does not run your code directly.
If you want to access the cr3 register, you need to write a kernel module.
- 01-01-2009 #3
I wrote my own software interrupt via a kernel module...this allows me controlled access to the kernel from a user process...Gerard4143
- 01-11-2009 #4
Found the Answer for cr3 address
Found the answer...
The address contained in the cr3 register is a physical address not a virtual address. So all I had to do was convert it, the cr3 address, to a virtual address and dereference it....Gerard4143