@@ -453,3 +453,9 @@
446 i386 landlock_restrict_self sys_landlock_restrict_self
447 i386 memfd_secret sys_memfd_secret
448 i386 process_mrelease sys_process_mrelease
+449 i386 uintr_register_handler sys_uintr_register_handler
+450 i386 uintr_unregister_handler sys_uintr_unregister_handler
+451 i386 uintr_create_fd sys_uintr_create_fd
+452 i386 uintr_register_sender sys_uintr_register_sender
+453 i386 uintr_unregister_sender sys_uintr_unregister_sender
+454 i386 uintr_wait sys_uintr_wait
@@ -370,6 +370,12 @@
446 common landlock_restrict_self sys_landlock_restrict_self
447 common memfd_secret sys_memfd_secret
448 common process_mrelease sys_process_mrelease
+449 common uintr_register_handler sys_uintr_register_handler
+450 common uintr_unregister_handler sys_uintr_unregister_handler
+451 common uintr_create_fd sys_uintr_create_fd
+452 common uintr_register_sender sys_uintr_register_sender
+453 common uintr_unregister_sender sys_uintr_unregister_sender
+454 common uintr_wait sys_uintr_wait
#
# Due to a historical design error, certain syscalls are numbered differently
@@ -1060,6 +1060,14 @@ asmlinkage long sys_memfd_secret(unsigned int flags);
/* arch/x86/kernel/ioport.c */
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on);
+/* arch/x86/kernel/uintr_fd.c */
+asmlinkage long sys_uintr_register_handler(u64 __user *handler, unsigned int flags);
+asmlinkage long sys_uintr_unregister_handler(unsigned int flags);
+asmlinkage long sys_uintr_create_fd(u64 vector, unsigned int flags);
+asmlinkage long sys_uintr_register_sender(int uintr_fd, unsigned int flags);
+asmlinkage long sys_uintr_unregister_sender(int uintr_fd, unsigned int flags);
+asmlinkage long sys_uintr_wait(unsigned int flags);
+
/* pciconfig: alpha, arm, arm64, ia64, sparc */
asmlinkage long sys_pciconfig_read(unsigned long bus, unsigned long dfn,
unsigned long off, unsigned long len,
@@ -880,8 +880,21 @@ __SYSCALL(__NR_memfd_secret, sys_memfd_secret)
#define __NR_process_mrelease 448
__SYSCALL(__NR_process_mrelease, sys_process_mrelease)
+#define __NR_uintr_register_handler 449
+__SYSCALL(__NR_uintr_register_handler, sys_uintr_register_handler)
+#define __NR_uintr_unregister_handler 450
+__SYSCALL(__NR_uintr_unregister_handler, sys_uintr_unregister_handler)
+#define __NR_uintr_create_fd 451
+__SYSCALL(__NR_uintr_create_fd, sys_uintr_create_fd)
+#define __NR_uintr_register_sender 452
+__SYSCALL(__NR_uintr_register_sender, sys_uintr_register_sender)
+#define __NR_uintr_unregister_sender 453
+__SYSCALL(__NR_uintr_unregister_sender, sys_uintr_unregister_sender)
+#define __NR_uintr_wait 454
+__SYSCALL(__NR_uintr_wait, sys_uintr_wait)
+
#undef __NR_syscalls
-#define __NR_syscalls 449
+#define __NR_syscalls 455
/*
* 32 bit systems traditionally used different
@@ -357,6 +357,14 @@ COND_SYSCALL(pkey_free);
/* memfd_secret */
COND_SYSCALL(memfd_secret);
+/* user interrupts */
+COND_SYSCALL(uintr_register_handler);
+COND_SYSCALL(uintr_unregister_handler);
+COND_SYSCALL(uintr_create_fd);
+COND_SYSCALL(uintr_register_sender);
+COND_SYSCALL(uintr_unregister_sender);
+COND_SYSCALL(uintr_wait);
+
/*
* Architecture specific weak syscall entries.
*/
@@ -204,6 +204,12 @@ cat << EOF
#define __IGNORE__sysctl
#define __IGNORE_arch_prctl
#define __IGNORE_nfsservctl
+#define __IGNORE_uintr_register_handler
+#define __IGNORE_uintr_unregister_handler
+#define __IGNORE_uintr_create_fd
+#define __IGNORE_uintr_register_sender
+#define __IGNORE_uintr_unregister_sender
+#define __IGNORE_uintr_wait
/* ... including the "new" 32-bit uid syscalls */
#define __IGNORE_lchown32
Wire up the user interrupt receiver and sender related syscalls for x86_64. For rest of the architectures the syscalls are not implemented. <TODO: Reserve the syscall numbers for other architectures> Signed-off-by: Sohil Mehta <sohil.mehta@intel.com> --- arch/x86/entry/syscalls/syscall_32.tbl | 6 ++++++ arch/x86/entry/syscalls/syscall_64.tbl | 6 ++++++ include/linux/syscalls.h | 8 ++++++++ include/uapi/asm-generic/unistd.h | 15 ++++++++++++++- kernel/sys_ni.c | 8 ++++++++ scripts/checksyscalls.sh | 6 ++++++ 6 files changed, 48 insertions(+), 1 deletion(-)