Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Drivers
Block devices
Access to anything on the host which can be mounted, e.g. CDROM, disk partition
Network devices
Network access between UML to host OS/UML and between UML to host in outside network.
Int 0x80 Enter kernel Notify parent Execute system call Signal self when done
Nullify system call Save process state Force process onto Kernel stack
Test program
For arch/x86/syscalls/syscall 64.tbl. 311 64 process_vm_writev sys_process_vm_writev 312 64 kcmp sys_kcmp 313 common mysyscall sys_mysyscall // Acts as a library call that makes the actual system call int mysyscall() {
int ret; // initializing the system call register with the system call number 313 __asm__("mov $313, %rax"); // executing the TRAP instruction for x86 64 bit architectures __asm__("syscall"); return ret;
} int main() {
printf("Making a system call...\n"); mysyscall(); return 0;
.. system call .. ..
0x80
.. 313 . mysyscall ..
(Call mysyscall handler )
Running UML
linux ubd0=./Debian-Squeeze-AMD64-root_fs mem=128M
dont forget rebuild Linux kernel to test new system call function