SLIDE 4 Protection issue
func_enter_address:
<parameters validation> <user permissions check>
func_internal_address:
<critical work>
Kernel level code
<parameters setting>
call func_enter_address
User code OK
<parameters setting>
call func_internal_address
User code NO
(protection bypassed)
Interface
OS functions called by applications
Application Programming Interface (API)
standard routine call system calls (syscalls)
not a standard function call is the “door” for the kernel level usually “wrapped” by library functions
- pen (library routine)
- pen (OS routine)
Application Library OS libraries provide a further abstraction (abstraction from OS)
syscall
Kernel level User level
standard routine call
System calls
Architecture dependent
software interrupt / trap
Call # Routine address 2 System routine ... /* parameters in registers */ ... mov r7, 2 /* syscall no. */ SVC 0 /* syscall */ ... /* results managing */ ...
user code
syscall table can be modified
Example: ARM – Linux
System calls
Architecture dependent
software interrupt / trap
Call # Routine address 2 System routine ... /* parameters in registers */ ... SVC 2 /* syscall */ ... /* results managing */ ...
user code
syscall table can be modified
Example: ARM – Linux (old ABI)