@@ -440,3 +440,4 @@
433 i386 fspick sys_fspick __ia32_sys_fspick
434 i386 pidfd_open sys_pidfd_open __ia32_sys_pidfd_open
435 i386 clone3 sys_clone3 __ia32_sys_clone3
+436 i386 encrypt_mprotect sys_encrypt_mprotect __ia32_sys_encrypt_mprotect
@@ -357,6 +357,7 @@
433 common fspick __x64_sys_fspick
434 common pidfd_open __x64_sys_pidfd_open
435 common clone3 __x64_sys_clone3/ptregs
+436 common encrypt_mprotect __x64_sys_encrypt_mprotect
#
# x32-specific system call numbers start at 512 to avoid cache impact
@@ -1000,6 +1000,8 @@ asmlinkage long sys_fspick(int dfd, const char __user *path, unsigned int flags)
asmlinkage long sys_pidfd_send_signal(int pidfd, int sig,
siginfo_t __user *info,
unsigned int flags);
+asmlinkage long sys_encrypt_mprotect(unsigned long start, size_t len,
+ unsigned long prot, key_serial_t serial);
/*
* Architecture-specific system calls
@@ -850,9 +850,11 @@ __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
#define __NR_clone3 435
__SYSCALL(__NR_clone3, sys_clone3)
#endif
+#define __NR_encrypt_mprotect 436
+__SYSCALL(__NR_encrypt_mprotect, sys_encrypt_mprotect)
#undef __NR_syscalls
-#define __NR_syscalls 436
+#define __NR_syscalls 437
/*
* 32 bit systems traditionally used different
@@ -349,6 +349,8 @@ COND_SYSCALL(pkey_mprotect);
COND_SYSCALL(pkey_alloc);
COND_SYSCALL(pkey_free);
+/* multi-key total memory encryption keys */
+COND_SYSCALL(encrypt_mprotect);
/*
* Architecture specific weak syscall entries.