kernel: hook new system calls to userland

This commit is contained in:
Matheus
2023-09-07 15:48:04 -03:00
parent 712aa9fbc0
commit 1520bb4e01
3 changed files with 69 additions and 10 deletions
+5 -1
View File
@@ -37,6 +37,8 @@ extern syscall_poll
extern syscall_nanosleep
extern syscall_ftruncate
extern syscall_mount
extern syscall_fchownat
extern syscall_utimensat
syscalltab:
dq syscall_print
dq syscall_mmap
@@ -76,7 +78,9 @@ dq syscall_poll
dq syscall_nanosleep
dq syscall_ftruncate
dq syscall_mount
syscallcount equ 38
dq syscall_fchownat
dq syscall_utimensat
syscallcount equ 40
section .text
global arch_syscall_entry
; on entry:
+7 -3
View File
@@ -4,7 +4,7 @@
#ifdef SYSCALL_LOGGING
#define SYSCALL_COUNT 38
#define SYSCALL_COUNT 40
#define LOGSTR(x) arch_e9_puts(x)
static char *name[] = {
@@ -45,7 +45,9 @@ static char *name[] = {
"poll",
"nanosleep",
"ftruncate",
"mount"
"mount",
"fchownat",
"utimensat",
};
static char *args[] = {
@@ -86,7 +88,9 @@ static char *args[] = {
"fds %p nfds %d timeout %d", // poll
"time %p remaining %p", // nanosleep
"fd %d size %lu", // ftruncate
"backing %p mountpoint %s fs %s flags %d data %p" // mount
"backing %p mountpoint %s fs %s flags %d data %p", // mount
"fd %d path %s owner %d group %d flags %x", // fchownat
"dirfd %d path %s times %p flags %x" // utimensat
};
#endif