mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: hook new system calls to userland
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user