Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Add generic stub_syscall1 function

The 64bit version did not have a stub_syscall1 function yet. Add it as
it will be useful to implement a static binary for stub loading.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240919124511.282088-2-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Benjamin Berg and committed by
Johannes Berg
cbb8e65e c6ce7200

+11
+11
arch/x86/um/shared/sysdep/stub_64.h
··· 28 28 return ret; 29 29 } 30 30 31 + static __always_inline long stub_syscall1(long syscall, long arg1) 32 + { 33 + long ret; 34 + 35 + __asm__ volatile (__syscall 36 + : "=a" (ret) 37 + : "0" (syscall), "D" (arg1) : __syscall_clobber ); 38 + 39 + return ret; 40 + } 41 + 31 42 static __always_inline long stub_syscall2(long syscall, long arg1, long arg2) 32 43 { 33 44 long ret;