Skip to content

Commit 11ed3e0

Browse files
ralfbaechletorvalds
authored andcommitted
MIPS: Wire up new pkey_{mprotect,alloc,free} syscalls
Signed-off-by: Marcin Nowakowski <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/14380/ Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 29fbff8 commit 11ed3e0

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

arch/mips/include/uapi/asm/unistd.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,16 +383,20 @@
383383
#define __NR_copy_file_range (__NR_Linux + 360)
384384
#define __NR_preadv2 (__NR_Linux + 361)
385385
#define __NR_pwritev2 (__NR_Linux + 362)
386+
#define __NR_pkey_mprotect (__NR_Linux + 363)
387+
#define __NR_pkey_alloc (__NR_Linux + 364)
388+
#define __NR_pkey_free (__NR_Linux + 365)
389+
386390

387391
/*
388392
* Offset of the last Linux o32 flavoured syscall
389393
*/
390-
#define __NR_Linux_syscalls 362
394+
#define __NR_Linux_syscalls 365
391395

392396
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
393397

394398
#define __NR_O32_Linux 4000
395-
#define __NR_O32_Linux_syscalls 362
399+
#define __NR_O32_Linux_syscalls 365
396400

397401
#if _MIPS_SIM == _MIPS_SIM_ABI64
398402

@@ -723,16 +727,19 @@
723727
#define __NR_copy_file_range (__NR_Linux + 320)
724728
#define __NR_preadv2 (__NR_Linux + 321)
725729
#define __NR_pwritev2 (__NR_Linux + 322)
730+
#define __NR_pkey_mprotect (__NR_Linux + 323)
731+
#define __NR_pkey_alloc (__NR_Linux + 324)
732+
#define __NR_pkey_free (__NR_Linux + 325)
726733

727734
/*
728735
* Offset of the last Linux 64-bit flavoured syscall
729736
*/
730-
#define __NR_Linux_syscalls 322
737+
#define __NR_Linux_syscalls 325
731738

732739
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
733740

734741
#define __NR_64_Linux 5000
735-
#define __NR_64_Linux_syscalls 322
742+
#define __NR_64_Linux_syscalls 325
736743

737744
#if _MIPS_SIM == _MIPS_SIM_NABI32
738745

@@ -1067,15 +1074,18 @@
10671074
#define __NR_copy_file_range (__NR_Linux + 324)
10681075
#define __NR_preadv2 (__NR_Linux + 325)
10691076
#define __NR_pwritev2 (__NR_Linux + 326)
1077+
#define __NR_pkey_mprotect (__NR_Linux + 327)
1078+
#define __NR_pkey_alloc (__NR_Linux + 328)
1079+
#define __NR_pkey_free (__NR_Linux + 329)
10701080

10711081
/*
10721082
* Offset of the last N32 flavoured syscall
10731083
*/
1074-
#define __NR_Linux_syscalls 326
1084+
#define __NR_Linux_syscalls 329
10751085

10761086
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
10771087

10781088
#define __NR_N32_Linux 6000
1079-
#define __NR_N32_Linux_syscalls 326
1089+
#define __NR_N32_Linux_syscalls 329
10801090

10811091
#endif /* _UAPI_ASM_UNISTD_H */

arch/mips/kernel/scall32-o32.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,3 +597,6 @@ EXPORT(sys_call_table)
597597
PTR sys_copy_file_range /* 4360 */
598598
PTR sys_preadv2
599599
PTR sys_pwritev2
600+
PTR sys_pkey_mprotect
601+
PTR sys_pkey_alloc
602+
PTR sys_pkey_free /* 4365 */

arch/mips/kernel/scall64-64.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,7 @@ EXPORT(sys_call_table)
435435
PTR sys_copy_file_range /* 5320 */
436436
PTR sys_preadv2
437437
PTR sys_pwritev2
438+
PTR sys_pkey_mprotect
439+
PTR sys_pkey_alloc
440+
PTR sys_pkey_free /* 5325 */
438441
.size sys_call_table,.-sys_call_table

arch/mips/kernel/scall64-n32.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,7 @@ EXPORT(sysn32_call_table)
430430
PTR sys_copy_file_range
431431
PTR compat_sys_preadv2 /* 6325 */
432432
PTR compat_sys_pwritev2
433+
PTR sys_pkey_mprotect
434+
PTR sys_pkey_alloc
435+
PTR sys_pkey_free
433436
.size sysn32_call_table,.-sysn32_call_table

arch/mips/kernel/scall64-o32.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,4 +585,7 @@ EXPORT(sys32_call_table)
585585
PTR sys_copy_file_range /* 4360 */
586586
PTR compat_sys_preadv2
587587
PTR compat_sys_pwritev2
588+
PTR sys_pkey_mprotect
589+
PTR sys_pkey_alloc
590+
PTR sys_pkey_free /* 4365 */
588591
.size sys32_call_table,.-sys32_call_table

0 commit comments

Comments
 (0)