Re: Reading the GDT in kernel space?

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

 



Hi,

I'm trying to read & display the GDT contents in kernel space. Is this
permissible? I used the "sgdt" assembly instruction to load the GDT
register, and found out the address & length of GDT from that (It is
"0000c248") . Is this the physical or the virtual address?

It's a physical address. Convert in virtual address using __va(x) before dereferencing.



I'm now trying to print out the contents of GDT. I am able to print
this address. BUt the moment I try to deference it, the kernel OOPS. I
understand that this is because the address is not in kernel virtual
address space (3GB). I tried using "ioremap" but it always returns
NULL. Any ideas?

Thanks in Advance,

Rajat



--
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