Userland
It's not difficult to switch from user land to kernel land. The difficulty comes the other way round.
switching from user land to kernel land
syscalls are typically implemented using an interrupt service routine hook - set up eax,ebx,ecx etc to pass paramters then interrupt. The kernel handles the interrupt as a 'syscall'.
The other way is more difficult and involves an IRET to change the CPL. (current privilege level)
switching from user land to kernel land
Code: Select all
int $0x80
The other way is more difficult and involves an IRET to change the CPL. (current privilege level)
- JackScott
- Member
- Posts: 1036
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
The following from osdever.net might be useful:
http://www.osdever.net/tutorials/soft_ts.php
http://www.osdever.net/tutorials/soft_ts.php