Results 1 to 4 of 4
Thread: User process and cr3 register
Enjoy an ad free experience by logging in. Not a member yet? Register.
User process and cr3 register
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
- 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.
I wrote my own software interrupt via a kernel module...this allows me controlled access to the kernel from a user process...Gerard4143
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