diff --git a/etc/syscalls_linux_aarch64.md b/etc/syscalls_linux_aarch64.md index acb9369..40ff53f 100644 --- a/etc/syscalls_linux_aarch64.md +++ b/etc/syscalls_linux_aarch64.md @@ -277,7 +277,7 @@ | 0x122 (290) | pkey_free | (int pkey) | __arm64_sys_pkey_free | false | | 0x123 (291) | statx | (int dfd, const char *filename, unsigned flags, unsigned int mask, struct statx *buffer) | __arm64_sys_statx | false | | 0x124 (292) | io_pgetevents | (aio_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct __kernel_timespec *timeout, const struct __aio_sigset *usig) | __arm64_sys_io_pgetevents | false | -| 0x125 (293) | rseq | (struct rseq *rseq, u32 rseq_len, int flags, u32 sig) | __arm64_sys_rseq | false | +| 0x125 (293) | rseq | (struct rseq *rseq, u32 rseq_len, int flags, u32 sig) | __arm64_sys_rseq | ENOSYS | | 0x126 (294) | kexec_file_load | (int kernel_fd, int initrd_fd, unsigned long cmdline_len, const char *cmdline_ptr, unsigned long flags) | __arm64_sys_kexec_file_load | false | | 0x1a8 (424) | pidfd_send_signal | (int pidfd, int sig, siginfo_t *info, unsigned int flags) | __arm64_sys_pidfd_send_signal | false | | 0x1a9 (425) | io_uring_setup | (u32 entries, struct io_uring_params *params) | __arm64_sys_io_uring_setup | false | diff --git a/libkernel/src/error/syscall_error.rs b/libkernel/src/error/syscall_error.rs index 4d0783d..ee01986 100644 --- a/libkernel/src/error/syscall_error.rs +++ b/libkernel/src/error/syscall_error.rs @@ -37,6 +37,7 @@ pub const EPIPE: isize = -32; pub const EDOM: isize = -33; pub const ERANGE: isize = -34; pub const EWOULDBLOCK: isize = -EAGAIN; +pub const ENOSYS: isize = -38; pub fn kern_err_to_syscall(err: KernelError) -> isize { match err { @@ -47,7 +48,7 @@ pub fn kern_err_to_syscall(err: KernelError) -> isize { KernelError::Fs(FsError::NotFound) => ENOENT, KernelError::NotATty => ENOTTY, KernelError::SeekPipe => ESPIPE, - KernelError::NotSupported => EINVAL, + KernelError::NotSupported => ENOSYS, _ => todo!(), } } diff --git a/src/arch/arm64/exceptions/syscall.rs b/src/arch/arm64/exceptions/syscall.rs index 2563633..a5824cb 100644 --- a/src/arch/arm64/exceptions/syscall.rs +++ b/src/arch/arm64/exceptions/syscall.rs @@ -260,6 +260,7 @@ pub async fn handle_syscall() { ) .await } + 0x125 => Err(KernelError::NotSupported), 0x1b7 => { sys_faccessat2( arg1.into(),