From dd10667c56b943c19436c6540946f9ad0f71d257 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 8 Jun 2023 18:43:18 +0300 Subject: add fast userspace return to do_ipc --- include/arch/proc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/arch') diff --git a/include/arch/proc.h b/include/arch/proc.h index 493b168..c9b54db 100644 --- a/include/arch/proc.h +++ b/include/arch/proc.h @@ -113,4 +113,14 @@ void adjust_syscall(struct tcb *t); */ __noreturn void run_init(struct tcb *t, void *fdt); +/** + * Return to userspace fast. + * Doesn't load registers besides arguments. + * Mainly for do_ipc(). + * Note that this skips canary checking, + * but at least do_ipc() uses basically zero stack space + * so I'm not too worried. + */ +__noreturn void ret_userspace_fast(); + #endif /* KMI_ARCH_PROC_H */ -- cgit v1.3