diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2024-07-03 15:45:28 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-07-03 17:09:49 +0200 |
commit | 76ed9158e1d474e963fc59da7a461b27a2212c5a (patch) | |
tree | 815dd1fd2568cdcc27d75178249cc809027ca80b /arch/um/include/shared/os.h | |
parent | 542dc79f6ea601788704a79ff54283c2bea265e9 (diff) | |
download | linux-76ed9158e1d474e963fc59da7a461b27a2212c5a.tar.gz linux-76ed9158e1d474e963fc59da7a461b27a2212c5a.tar.bz2 linux-76ed9158e1d474e963fc59da7a461b27a2212c5a.zip |
um: Rework syscall handling
Rework syscall handling to be platform independent. Also create a clean
split between queueing of syscalls and flushing them out, removing the
need to keep state in the code that triggers the syscalls.
The code adds syscall_data_len to the global mm_id structure. This will
be used later to allow surrounding code to track whether syscalls still
need to run and if errors occurred.
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Link: https://patch.msgid.link/20240703134536.1161108-5-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/include/shared/os.h')
-rw-r--r-- | arch/um/include/shared/os.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index d269637adcd6..d1331d20fd2b 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -272,19 +272,15 @@ extern long long os_persistent_clock_emulation(void); extern long long os_nsecs(void); /* skas/mem.c */ -extern long run_syscall_stub(struct mm_id * mm_idp, - int syscall, unsigned long *args, long expected, - void **addr, int done); -extern long syscall_stub_data(struct mm_id * mm_idp, - unsigned long *data, int data_count, - void **addr, void **stub_addr); -extern int map(struct mm_id * mm_idp, unsigned long virt, - unsigned long len, int prot, int phys_fd, - unsigned long long offset, int done, void **data); -extern int unmap(struct mm_id * mm_idp, unsigned long addr, unsigned long len, - int done, void **data); -extern int protect(struct mm_id * mm_idp, unsigned long addr, - unsigned long len, unsigned int prot, int done, void **data); +int syscall_stub_flush(struct mm_id *mm_idp); +struct stub_syscall *syscall_stub_alloc(struct mm_id *mm_idp); + +void map(struct mm_id *mm_idp, unsigned long virt, + unsigned long len, int prot, int phys_fd, + unsigned long long offset); +void unmap(struct mm_id *mm_idp, unsigned long addr, unsigned long len); +void protect(struct mm_id *mm_idp, unsigned long addr, + unsigned long len, unsigned int prot); /* skas/process.c */ extern int is_skas_winch(int pid, int fd, void *data); |