Re: how to get current cs:eip value for some process while it is in kernel mode?

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

 



      call next
next:
     popl %eax

from <Computer Systems: A Programmer's Perspective>

2008/6/4 Frédéric Weisbecker <f.weisbecker@xxxxxxxxx>:
Oops, I meaned: eip can't be accessed directly. You have to use call.

2008/6/4 Frédéric Weisbecker <f.weisbecker@xxxxxxxxx>:

Hello,

You mean how to get your own kernel's task eip?
It's like in userspace, you can directly access eip but the opcode "call" pushes eip on the stack so eip can be accessed with this kind of code:

get_eip:
    mov (%esp), %eax
    ret

call get_eip
//some code  <--- eip of this line will be on eax

2008/6/4 Michal <rabbit50@xxxxxxxxx>:
Hallo Group Members


Is it possible?

best regards,
Michal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ






--
Best Regards.

[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