From ae4cef9a9a3ae16a470fd0bc800f0ad2b3f7d0d3 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Mon, 24 Mar 2025 18:58:57 +0200 Subject: [PATCH] lib/posix-process: Fix `vfork` signature A minor oversight during merging of the `vfork` functionality ended up defining `vfork` with an invalid signature that takes two arguments. Fix this by defining `vfork` as a syscall that takes no arguments. Signed-off-by: Sergiu Moga Approved-by: Michalis Pappas Reviewed-by: Michalis Pappas Reviewed-by: Andrei Tatar GitHub-Closes: #1618 --- lib/posix-process/Makefile.uk | 2 +- lib/posix-process/vfork.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/posix-process/Makefile.uk b/lib/posix-process/Makefile.uk index 440f0824d..75c690dcf 100644 --- a/lib/posix-process/Makefile.uk +++ b/lib/posix-process/Makefile.uk @@ -67,7 +67,7 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += rt_sigtimedwait-4 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += kill-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += tgkill-3 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += tkill-2 -UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS_VFORK) += vfork-2e +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS_VFORK) += vfork-0e UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += wait4-4 waitid-4 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += getpgid-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += setpgid-2 diff --git a/lib/posix-process/vfork.c b/lib/posix-process/vfork.c index 99bef4e76..733d2228d 100644 --- a/lib/posix-process/vfork.c +++ b/lib/posix-process/vfork.c @@ -16,9 +16,7 @@ #include "process.h" -UK_LLSYSCALL_R_E_DEFINE(pid_t, vfork, - unsigned long __unused, a0, - unsigned long __unused, a1) +UK_LLSYSCALL_R_E_DEFINE(pid_t, vfork) { struct posix_process *child_proc; struct clone_args cl_args = {0}; -- 2.39.5