11da177e4SLinus Torvalds/* 21da177e4SLinus Torvalds * This file is subject to the terms and conditions of the GNU General Public 31da177e4SLinus Torvalds * License. See the file "COPYING" in the main directory of this archive 41da177e4SLinus Torvalds * for more details. 51da177e4SLinus Torvalds * 6192ef366SRalf Baechle * Copyright (C) 1995-99, 2000- 02, 06 Ralf Baechle <ralf@linux-mips.org> 71da177e4SLinus Torvalds * Copyright (C) 2001 MIPS Technologies, Inc. 81da177e4SLinus Torvalds * Copyright (C) 2004 Thiemo Seufer 986bdb277SMarkos Chandras * Copyright (C) 2014 Imagination Technologies Ltd. 101da177e4SLinus Torvalds */ 111da177e4SLinus Torvalds#include <linux/errno.h> 121da177e4SLinus Torvalds#include <asm/asm.h> 131da177e4SLinus Torvalds#include <asm/asmmacro.h> 14192ef366SRalf Baechle#include <asm/irqflags.h> 151da177e4SLinus Torvalds#include <asm/mipsregs.h> 161da177e4SLinus Torvalds#include <asm/regdef.h> 171da177e4SLinus Torvalds#include <asm/stackframe.h> 181da177e4SLinus Torvalds#include <asm/isadep.h> 191da177e4SLinus Torvalds#include <asm/sysmips.h> 201da177e4SLinus Torvalds#include <asm/thread_info.h> 211da177e4SLinus Torvalds#include <asm/unistd.h> 221da177e4SLinus Torvalds#include <asm/war.h> 23048eb582SSam Ravnborg#include <asm/asm-offsets.h> 241da177e4SLinus Torvalds 251da177e4SLinus Torvalds/* Highest syscall used of any syscall flavour */ 261da177e4SLinus Torvalds#define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls 271da177e4SLinus Torvalds 281da177e4SLinus Torvalds .align 5 291da177e4SLinus TorvaldsNESTED(handle_sys, PT_SIZE, sp) 301da177e4SLinus Torvalds .set noat 311da177e4SLinus Torvalds SAVE_SOME 32eae6c0daSAtsushi Nemoto TRACE_IRQS_ON_RELOAD 331da177e4SLinus Torvalds STI 341da177e4SLinus Torvalds .set at 351da177e4SLinus Torvalds 361da177e4SLinus Torvalds lw t1, PT_EPC(sp) # skip syscall on return 371da177e4SLinus Torvalds 381da177e4SLinus Torvalds addiu t1, 4 # skip to next instruction 391da177e4SLinus Torvalds sw t1, PT_EPC(sp) 401da177e4SLinus Torvalds 411da177e4SLinus Torvalds sw a3, PT_R26(sp) # save a3 for syscall restarting 421da177e4SLinus Torvalds 4346e12c07SRalf Baechle /* 4446e12c07SRalf Baechle * More than four arguments. Try to deal with it by copying the 4546e12c07SRalf Baechle * stack arguments from the user stack to the kernel stack. 4646e12c07SRalf Baechle * This Sucks (TM). 4746e12c07SRalf Baechle */ 4846e12c07SRalf Baechle lw t0, PT_R29(sp) # get old user stack pointer 4946e12c07SRalf Baechle 5046e12c07SRalf Baechle /* 5146e12c07SRalf Baechle * We intentionally keep the kernel stack a little below the top of 5246e12c07SRalf Baechle * userspace so we don't have to do a slower byte accurate check here. 5346e12c07SRalf Baechle */ 5446e12c07SRalf Baechle lw t5, TI_ADDR_LIMIT($28) 5546e12c07SRalf Baechle addu t4, t0, 32 5646e12c07SRalf Baechle and t5, t4 5746e12c07SRalf Baechle bltz t5, bad_stack # -> sp is bad 5846e12c07SRalf Baechle 5946e12c07SRalf Baechle /* 6046e12c07SRalf Baechle * Ok, copy the args from the luser stack to the kernel stack. 6146e12c07SRalf Baechle */ 6246e12c07SRalf Baechle 6346e12c07SRalf Baechle .set push 6446e12c07SRalf Baechle .set noreorder 6546e12c07SRalf Baechle .set nomacro 6646e12c07SRalf Baechle 677928eb03SRalf Baechleload_a4: user_lw(t5, 16(t0)) # argument #5 from usp 687928eb03SRalf Baechleload_a5: user_lw(t6, 20(t0)) # argument #6 from usp 697928eb03SRalf Baechleload_a6: user_lw(t7, 24(t0)) # argument #7 from usp 707928eb03SRalf Baechleload_a7: user_lw(t8, 28(t0)) # argument #8 from usp 717928eb03SRalf Baechleloads_done: 7246e12c07SRalf Baechle 7346e12c07SRalf Baechle sw t5, 16(sp) # argument #5 to ksp 7446e12c07SRalf Baechle sw t6, 20(sp) # argument #6 to ksp 7546e12c07SRalf Baechle sw t7, 24(sp) # argument #7 to ksp 7646e12c07SRalf Baechle sw t8, 28(sp) # argument #8 to ksp 7746e12c07SRalf Baechle .set pop 7846e12c07SRalf Baechle 7946e12c07SRalf Baechle .section __ex_table,"a" 807928eb03SRalf Baechle PTR load_a4, bad_stack_a4 817928eb03SRalf Baechle PTR load_a5, bad_stack_a5 827928eb03SRalf Baechle PTR load_a6, bad_stack_a6 837928eb03SRalf Baechle PTR load_a7, bad_stack_a7 8446e12c07SRalf Baechle .previous 8546e12c07SRalf Baechle 861da177e4SLinus Torvalds lw t0, TI_FLAGS($28) # syscall tracing enabled? 87e7f3b48aSRalf Baechle li t1, _TIF_WORK_SYSCALL_ENTRY 881da177e4SLinus Torvalds and t0, t1 891da177e4SLinus Torvalds bnez t0, syscall_trace_entry # -> yes 90d218af78SMarkos Chandrassyscall_common: 91*a400bed6SMatt Redfearn subu v0, v0, __NR_O32_Linux # check syscall number 92d218af78SMarkos Chandras sltiu t0, v0, __NR_O32_Linux_syscalls + 1 93d218af78SMarkos Chandras beqz t0, illegal_syscall 94d218af78SMarkos Chandras 95d218af78SMarkos Chandras sll t0, v0, 2 96d218af78SMarkos Chandras la t1, sys_call_table 97d218af78SMarkos Chandras addu t1, t0 98d218af78SMarkos Chandras lw t2, (t1) # syscall routine 99d218af78SMarkos Chandras 100d218af78SMarkos Chandras beqz t2, illegal_syscall 1011da177e4SLinus Torvalds 1021da177e4SLinus Torvalds jalr t2 # Do The Real Thing (TM) 1031da177e4SLinus Torvalds 1041da177e4SLinus Torvalds li t0, -EMAXERRNO - 1 # error? 1051da177e4SLinus Torvalds sltu t0, t0, v0 1061da177e4SLinus Torvalds sw t0, PT_R7(sp) # set error flag 1071da177e4SLinus Torvalds beqz t0, 1f 1081da177e4SLinus Torvalds 1098f5a00ebSAl Viro lw t1, PT_R2(sp) # syscall number 1101da177e4SLinus Torvalds negu v0 # error 1118f5a00ebSAl Viro sw t1, PT_R0(sp) # save it for syscall restarting 1121da177e4SLinus Torvalds1: sw v0, PT_R2(sp) # result 1131da177e4SLinus Torvalds 1141da177e4SLinus Torvaldso32_syscall_exit: 11502f884edSAl Viro j syscall_exit_partial 1161da177e4SLinus Torvalds 1171da177e4SLinus Torvalds/* ------------------------------------------------------------------------ */ 1181da177e4SLinus Torvalds 1191da177e4SLinus Torvaldssyscall_trace_entry: 1201da177e4SLinus Torvalds SAVE_STATIC 1211da177e4SLinus Torvalds move a0, sp 1224c21b8fdSMarkos Chandras 1234c21b8fdSMarkos Chandras /* 1244c21b8fdSMarkos Chandras * syscall number is in v0 unless we called syscall(__NR_###) 1254c21b8fdSMarkos Chandras * where the real syscall number is in a0 1264c21b8fdSMarkos Chandras */ 127*a400bed6SMatt Redfearn move a1, v0 128*a400bed6SMatt Redfearn subu t2, v0, __NR_O32_Linux 129*a400bed6SMatt Redfearn bnez t2, 1f /* __NR_syscall at offset 0 */ 1304c21b8fdSMarkos Chandras lw a1, PT_R4(sp) 1314c21b8fdSMarkos Chandras 1324c21b8fdSMarkos Chandras1: jal syscall_trace_enter 1331da177e4SLinus Torvalds 134d218af78SMarkos Chandras bltz v0, 1f # seccomp failed? Skip syscall 1359d37c405SMarkos Chandras 13604a7052cSRalf Baechle RESTORE_STATIC 137*a400bed6SMatt Redfearn lw v0, PT_R2(sp) # Restore syscall (maybe modified) 1381da177e4SLinus Torvalds lw a0, PT_R4(sp) # Restore argument registers 1391da177e4SLinus Torvalds lw a1, PT_R5(sp) 1401da177e4SLinus Torvalds lw a2, PT_R6(sp) 1411da177e4SLinus Torvalds lw a3, PT_R7(sp) 142d218af78SMarkos Chandras j syscall_common 1431da177e4SLinus Torvalds 144d218af78SMarkos Chandras1: j syscall_exit 1451da177e4SLinus Torvalds 1461da177e4SLinus Torvalds/* ------------------------------------------------------------------------ */ 1471da177e4SLinus Torvalds 1481da177e4SLinus Torvalds /* 1497928eb03SRalf Baechle * Our open-coded access area sanity test for the stack pointer 1507928eb03SRalf Baechle * failed. We probably should handle this case a bit more drastic. 1511da177e4SLinus Torvalds */ 1521da177e4SLinus Torvaldsbad_stack: 1535b89c004SAl Viro li v0, EFAULT 1541da177e4SLinus Torvalds sw v0, PT_R2(sp) 1551da177e4SLinus Torvalds li t0, 1 # set error flag 1561da177e4SLinus Torvalds sw t0, PT_R7(sp) 1571da177e4SLinus Torvalds j o32_syscall_exit 1581da177e4SLinus Torvalds 1597928eb03SRalf Baechlebad_stack_a4: 1607928eb03SRalf Baechle li t5, 0 1617928eb03SRalf Baechle b load_a5 1627928eb03SRalf Baechle 1637928eb03SRalf Baechlebad_stack_a5: 1647928eb03SRalf Baechle li t6, 0 1657928eb03SRalf Baechle b load_a6 1667928eb03SRalf Baechle 1677928eb03SRalf Baechlebad_stack_a6: 1687928eb03SRalf Baechle li t7, 0 1697928eb03SRalf Baechle b load_a7 1707928eb03SRalf Baechle 1717928eb03SRalf Baechlebad_stack_a7: 1727928eb03SRalf Baechle li t8, 0 1737928eb03SRalf Baechle b loads_done 1747928eb03SRalf Baechle 1751da177e4SLinus Torvalds /* 1761da177e4SLinus Torvalds * The system call does not exist in this kernel 1771da177e4SLinus Torvalds */ 1781da177e4SLinus Torvaldsillegal_syscall: 179bda8229bSAtsushi Nemoto li v0, ENOSYS # error 1801da177e4SLinus Torvalds sw v0, PT_R2(sp) 1811da177e4SLinus Torvalds li t0, 1 # set error flag 1821da177e4SLinus Torvalds sw t0, PT_R7(sp) 1831da177e4SLinus Torvalds j o32_syscall_exit 1841da177e4SLinus Torvalds END(handle_sys) 1851da177e4SLinus Torvalds 1861da177e4SLinus Torvalds LEAF(sys_syscall) 1871da177e4SLinus Torvalds subu t0, a0, __NR_O32_Linux # check syscall number 1881da177e4SLinus Torvalds sltiu v0, t0, __NR_O32_Linux_syscalls + 1 189e807f957SVlad Malov beqz t0, einval # do not recurse 19046e12c07SRalf Baechle sll t1, t0, 2 1911da177e4SLinus Torvalds beqz v0, einval 1921da177e4SLinus Torvalds lw t2, sys_call_table(t1) # syscall routine 193e967ef02SEd Swierk sw a0, PT_R2(sp) # call routine directly on restart 1941da177e4SLinus Torvalds 1951da177e4SLinus Torvalds /* Some syscalls like execve get their arguments from struct pt_regs 1961da177e4SLinus Torvalds and claim zero arguments in the syscall table. Thus we have to 1971da177e4SLinus Torvalds assume the worst case and shuffle around all potential arguments. 1981da177e4SLinus Torvalds If you want performance, don't use indirect syscalls. */ 1991da177e4SLinus Torvalds 2001da177e4SLinus Torvalds move a0, a1 # shift argument registers 2011da177e4SLinus Torvalds move a1, a2 2021da177e4SLinus Torvalds move a2, a3 2031da177e4SLinus Torvalds lw a3, 16(sp) 2041da177e4SLinus Torvalds lw t4, 20(sp) 2051da177e4SLinus Torvalds lw t5, 24(sp) 2061da177e4SLinus Torvalds lw t6, 28(sp) 2071da177e4SLinus Torvalds sw t4, 16(sp) 2081da177e4SLinus Torvalds sw t5, 20(sp) 2091da177e4SLinus Torvalds sw t6, 24(sp) 2101da177e4SLinus Torvalds sw a0, PT_R4(sp) # .. and push back a0 - a3, some 2111da177e4SLinus Torvalds sw a1, PT_R5(sp) # syscalls expect them there 2121da177e4SLinus Torvalds sw a2, PT_R6(sp) 2131da177e4SLinus Torvalds sw a3, PT_R7(sp) 2141da177e4SLinus Torvalds sw a3, PT_R26(sp) # update a3 for syscall restarting 2151da177e4SLinus Torvalds jr t2 2161da177e4SLinus Torvalds /* Unreached */ 2171da177e4SLinus Torvalds 218fb498e25SAtsushi Nemotoeinval: li v0, -ENOSYS 2191da177e4SLinus Torvalds jr ra 2201da177e4SLinus Torvalds END(sys_syscall) 2211da177e4SLinus Torvalds 22246e12c07SRalf Baechle .align 2 22346e12c07SRalf Baechle .type sys_call_table, @object 22446e12c07SRalf BaechleEXPORT(sys_call_table) 22546e12c07SRalf Baechle PTR sys_syscall /* 4000 */ 22646e12c07SRalf Baechle PTR sys_exit 22746e12c07SRalf Baechle PTR __sys_fork 22846e12c07SRalf Baechle PTR sys_read 22946e12c07SRalf Baechle PTR sys_write 23046e12c07SRalf Baechle PTR sys_open /* 4005 */ 23146e12c07SRalf Baechle PTR sys_close 23246e12c07SRalf Baechle PTR sys_waitpid 23346e12c07SRalf Baechle PTR sys_creat 23446e12c07SRalf Baechle PTR sys_link 23546e12c07SRalf Baechle PTR sys_unlink /* 4010 */ 23646e12c07SRalf Baechle PTR sys_execve 23746e12c07SRalf Baechle PTR sys_chdir 23846e12c07SRalf Baechle PTR sys_time 23946e12c07SRalf Baechle PTR sys_mknod 24046e12c07SRalf Baechle PTR sys_chmod /* 4015 */ 24146e12c07SRalf Baechle PTR sys_lchown 24246e12c07SRalf Baechle PTR sys_ni_syscall 24346e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_stat */ 24446e12c07SRalf Baechle PTR sys_lseek 24546e12c07SRalf Baechle PTR sys_getpid /* 4020 */ 24646e12c07SRalf Baechle PTR sys_mount 24746e12c07SRalf Baechle PTR sys_oldumount 24846e12c07SRalf Baechle PTR sys_setuid 24946e12c07SRalf Baechle PTR sys_getuid 25046e12c07SRalf Baechle PTR sys_stime /* 4025 */ 25146e12c07SRalf Baechle PTR sys_ptrace 25246e12c07SRalf Baechle PTR sys_alarm 25346e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_fstat */ 25446e12c07SRalf Baechle PTR sys_pause 25546e12c07SRalf Baechle PTR sys_utime /* 4030 */ 25646e12c07SRalf Baechle PTR sys_ni_syscall 25746e12c07SRalf Baechle PTR sys_ni_syscall 25846e12c07SRalf Baechle PTR sys_access 25946e12c07SRalf Baechle PTR sys_nice 26046e12c07SRalf Baechle PTR sys_ni_syscall /* 4035 */ 26146e12c07SRalf Baechle PTR sys_sync 26246e12c07SRalf Baechle PTR sys_kill 26346e12c07SRalf Baechle PTR sys_rename 26446e12c07SRalf Baechle PTR sys_mkdir 26546e12c07SRalf Baechle PTR sys_rmdir /* 4040 */ 26646e12c07SRalf Baechle PTR sys_dup 26746e12c07SRalf Baechle PTR sysm_pipe 26846e12c07SRalf Baechle PTR sys_times 26946e12c07SRalf Baechle PTR sys_ni_syscall 27046e12c07SRalf Baechle PTR sys_brk /* 4045 */ 27146e12c07SRalf Baechle PTR sys_setgid 27246e12c07SRalf Baechle PTR sys_getgid 27346e12c07SRalf Baechle PTR sys_ni_syscall /* was signal(2) */ 27446e12c07SRalf Baechle PTR sys_geteuid 27546e12c07SRalf Baechle PTR sys_getegid /* 4050 */ 27646e12c07SRalf Baechle PTR sys_acct 27746e12c07SRalf Baechle PTR sys_umount 27846e12c07SRalf Baechle PTR sys_ni_syscall 27946e12c07SRalf Baechle PTR sys_ioctl 28046e12c07SRalf Baechle PTR sys_fcntl /* 4055 */ 28146e12c07SRalf Baechle PTR sys_ni_syscall 28246e12c07SRalf Baechle PTR sys_setpgid 28346e12c07SRalf Baechle PTR sys_ni_syscall 28446e12c07SRalf Baechle PTR sys_olduname 28546e12c07SRalf Baechle PTR sys_umask /* 4060 */ 28646e12c07SRalf Baechle PTR sys_chroot 28746e12c07SRalf Baechle PTR sys_ustat 28846e12c07SRalf Baechle PTR sys_dup2 28946e12c07SRalf Baechle PTR sys_getppid 29046e12c07SRalf Baechle PTR sys_getpgrp /* 4065 */ 29146e12c07SRalf Baechle PTR sys_setsid 29246e12c07SRalf Baechle PTR sys_sigaction 29346e12c07SRalf Baechle PTR sys_sgetmask 29446e12c07SRalf Baechle PTR sys_ssetmask 29546e12c07SRalf Baechle PTR sys_setreuid /* 4070 */ 29646e12c07SRalf Baechle PTR sys_setregid 29746e12c07SRalf Baechle PTR sys_sigsuspend 29846e12c07SRalf Baechle PTR sys_sigpending 29946e12c07SRalf Baechle PTR sys_sethostname 30046e12c07SRalf Baechle PTR sys_setrlimit /* 4075 */ 30146e12c07SRalf Baechle PTR sys_getrlimit 30246e12c07SRalf Baechle PTR sys_getrusage 30346e12c07SRalf Baechle PTR sys_gettimeofday 30446e12c07SRalf Baechle PTR sys_settimeofday 30546e12c07SRalf Baechle PTR sys_getgroups /* 4080 */ 30646e12c07SRalf Baechle PTR sys_setgroups 30746e12c07SRalf Baechle PTR sys_ni_syscall /* old_select */ 30846e12c07SRalf Baechle PTR sys_symlink 30946e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_lstat */ 31046e12c07SRalf Baechle PTR sys_readlink /* 4085 */ 31146e12c07SRalf Baechle PTR sys_uselib 31246e12c07SRalf Baechle PTR sys_swapon 31346e12c07SRalf Baechle PTR sys_reboot 31446e12c07SRalf Baechle PTR sys_old_readdir 31546e12c07SRalf Baechle PTR sys_mips_mmap /* 4090 */ 31646e12c07SRalf Baechle PTR sys_munmap 31746e12c07SRalf Baechle PTR sys_truncate 31846e12c07SRalf Baechle PTR sys_ftruncate 31946e12c07SRalf Baechle PTR sys_fchmod 32046e12c07SRalf Baechle PTR sys_fchown /* 4095 */ 32146e12c07SRalf Baechle PTR sys_getpriority 32246e12c07SRalf Baechle PTR sys_setpriority 32346e12c07SRalf Baechle PTR sys_ni_syscall 32446e12c07SRalf Baechle PTR sys_statfs 32546e12c07SRalf Baechle PTR sys_fstatfs /* 4100 */ 32646e12c07SRalf Baechle PTR sys_ni_syscall /* was ioperm(2) */ 32746e12c07SRalf Baechle PTR sys_socketcall 32846e12c07SRalf Baechle PTR sys_syslog 32946e12c07SRalf Baechle PTR sys_setitimer 33046e12c07SRalf Baechle PTR sys_getitimer /* 4105 */ 33146e12c07SRalf Baechle PTR sys_newstat 33246e12c07SRalf Baechle PTR sys_newlstat 33346e12c07SRalf Baechle PTR sys_newfstat 33446e12c07SRalf Baechle PTR sys_uname 33546e12c07SRalf Baechle PTR sys_ni_syscall /* 4110 was iopl(2) */ 33646e12c07SRalf Baechle PTR sys_vhangup 33746e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_idle() */ 33846e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_vm86 */ 33946e12c07SRalf Baechle PTR sys_wait4 34046e12c07SRalf Baechle PTR sys_swapoff /* 4115 */ 34146e12c07SRalf Baechle PTR sys_sysinfo 34246e12c07SRalf Baechle PTR sys_ipc 34346e12c07SRalf Baechle PTR sys_fsync 34446e12c07SRalf Baechle PTR sys_sigreturn 34546e12c07SRalf Baechle PTR __sys_clone /* 4120 */ 34646e12c07SRalf Baechle PTR sys_setdomainname 34746e12c07SRalf Baechle PTR sys_newuname 34846e12c07SRalf Baechle PTR sys_ni_syscall /* sys_modify_ldt */ 34946e12c07SRalf Baechle PTR sys_adjtimex 35046e12c07SRalf Baechle PTR sys_mprotect /* 4125 */ 35146e12c07SRalf Baechle PTR sys_sigprocmask 35246e12c07SRalf Baechle PTR sys_ni_syscall /* was create_module */ 35346e12c07SRalf Baechle PTR sys_init_module 35446e12c07SRalf Baechle PTR sys_delete_module 35546e12c07SRalf Baechle PTR sys_ni_syscall /* 4130 was get_kernel_syms */ 35646e12c07SRalf Baechle PTR sys_quotactl 35746e12c07SRalf Baechle PTR sys_getpgid 35846e12c07SRalf Baechle PTR sys_fchdir 35946e12c07SRalf Baechle PTR sys_bdflush 36046e12c07SRalf Baechle PTR sys_sysfs /* 4135 */ 36146e12c07SRalf Baechle PTR sys_personality 36246e12c07SRalf Baechle PTR sys_ni_syscall /* for afs_syscall */ 36346e12c07SRalf Baechle PTR sys_setfsuid 36446e12c07SRalf Baechle PTR sys_setfsgid 36546e12c07SRalf Baechle PTR sys_llseek /* 4140 */ 36646e12c07SRalf Baechle PTR sys_getdents 36746e12c07SRalf Baechle PTR sys_select 36846e12c07SRalf Baechle PTR sys_flock 36946e12c07SRalf Baechle PTR sys_msync 37046e12c07SRalf Baechle PTR sys_readv /* 4145 */ 37146e12c07SRalf Baechle PTR sys_writev 37246e12c07SRalf Baechle PTR sys_cacheflush 37346e12c07SRalf Baechle PTR sys_cachectl 37446e12c07SRalf Baechle PTR sys_sysmips 37546e12c07SRalf Baechle PTR sys_ni_syscall /* 4150 */ 37646e12c07SRalf Baechle PTR sys_getsid 37746e12c07SRalf Baechle PTR sys_fdatasync 37846e12c07SRalf Baechle PTR sys_sysctl 37946e12c07SRalf Baechle PTR sys_mlock 38046e12c07SRalf Baechle PTR sys_munlock /* 4155 */ 38146e12c07SRalf Baechle PTR sys_mlockall 38246e12c07SRalf Baechle PTR sys_munlockall 38346e12c07SRalf Baechle PTR sys_sched_setparam 38446e12c07SRalf Baechle PTR sys_sched_getparam 38546e12c07SRalf Baechle PTR sys_sched_setscheduler /* 4160 */ 38646e12c07SRalf Baechle PTR sys_sched_getscheduler 38746e12c07SRalf Baechle PTR sys_sched_yield 38846e12c07SRalf Baechle PTR sys_sched_get_priority_max 38946e12c07SRalf Baechle PTR sys_sched_get_priority_min 39046e12c07SRalf Baechle PTR sys_sched_rr_get_interval /* 4165 */ 39146e12c07SRalf Baechle PTR sys_nanosleep 39246e12c07SRalf Baechle PTR sys_mremap 39346e12c07SRalf Baechle PTR sys_accept 39446e12c07SRalf Baechle PTR sys_bind 39546e12c07SRalf Baechle PTR sys_connect /* 4170 */ 39646e12c07SRalf Baechle PTR sys_getpeername 39746e12c07SRalf Baechle PTR sys_getsockname 39846e12c07SRalf Baechle PTR sys_getsockopt 39946e12c07SRalf Baechle PTR sys_listen 40046e12c07SRalf Baechle PTR sys_recv /* 4175 */ 40146e12c07SRalf Baechle PTR sys_recvfrom 40246e12c07SRalf Baechle PTR sys_recvmsg 40346e12c07SRalf Baechle PTR sys_send 40446e12c07SRalf Baechle PTR sys_sendmsg 40546e12c07SRalf Baechle PTR sys_sendto /* 4180 */ 40646e12c07SRalf Baechle PTR sys_setsockopt 40746e12c07SRalf Baechle PTR sys_shutdown 40846e12c07SRalf Baechle PTR sys_socket 40946e12c07SRalf Baechle PTR sys_socketpair 41046e12c07SRalf Baechle PTR sys_setresuid /* 4185 */ 41146e12c07SRalf Baechle PTR sys_getresuid 41246e12c07SRalf Baechle PTR sys_ni_syscall /* was sys_query_module */ 41346e12c07SRalf Baechle PTR sys_poll 41446e12c07SRalf Baechle PTR sys_ni_syscall /* was nfsservctl */ 41546e12c07SRalf Baechle PTR sys_setresgid /* 4190 */ 41646e12c07SRalf Baechle PTR sys_getresgid 41746e12c07SRalf Baechle PTR sys_prctl 41846e12c07SRalf Baechle PTR sys_rt_sigreturn 41946e12c07SRalf Baechle PTR sys_rt_sigaction 42046e12c07SRalf Baechle PTR sys_rt_sigprocmask /* 4195 */ 42146e12c07SRalf Baechle PTR sys_rt_sigpending 42246e12c07SRalf Baechle PTR sys_rt_sigtimedwait 42346e12c07SRalf Baechle PTR sys_rt_sigqueueinfo 42446e12c07SRalf Baechle PTR sys_rt_sigsuspend 42546e12c07SRalf Baechle PTR sys_pread64 /* 4200 */ 42646e12c07SRalf Baechle PTR sys_pwrite64 42746e12c07SRalf Baechle PTR sys_chown 42846e12c07SRalf Baechle PTR sys_getcwd 42946e12c07SRalf Baechle PTR sys_capget 43046e12c07SRalf Baechle PTR sys_capset /* 4205 */ 43146e12c07SRalf Baechle PTR sys_sigaltstack 43246e12c07SRalf Baechle PTR sys_sendfile 43346e12c07SRalf Baechle PTR sys_ni_syscall 43446e12c07SRalf Baechle PTR sys_ni_syscall 43546e12c07SRalf Baechle PTR sys_mips_mmap2 /* 4210 */ 43646e12c07SRalf Baechle PTR sys_truncate64 43746e12c07SRalf Baechle PTR sys_ftruncate64 43846e12c07SRalf Baechle PTR sys_stat64 43946e12c07SRalf Baechle PTR sys_lstat64 44046e12c07SRalf Baechle PTR sys_fstat64 /* 4215 */ 44146e12c07SRalf Baechle PTR sys_pivot_root 44246e12c07SRalf Baechle PTR sys_mincore 44346e12c07SRalf Baechle PTR sys_madvise 44446e12c07SRalf Baechle PTR sys_getdents64 44546e12c07SRalf Baechle PTR sys_fcntl64 /* 4220 */ 44646e12c07SRalf Baechle PTR sys_ni_syscall 44746e12c07SRalf Baechle PTR sys_gettid 44846e12c07SRalf Baechle PTR sys_readahead 44946e12c07SRalf Baechle PTR sys_setxattr 45046e12c07SRalf Baechle PTR sys_lsetxattr /* 4225 */ 45146e12c07SRalf Baechle PTR sys_fsetxattr 45246e12c07SRalf Baechle PTR sys_getxattr 45346e12c07SRalf Baechle PTR sys_lgetxattr 45446e12c07SRalf Baechle PTR sys_fgetxattr 45546e12c07SRalf Baechle PTR sys_listxattr /* 4230 */ 45646e12c07SRalf Baechle PTR sys_llistxattr 45746e12c07SRalf Baechle PTR sys_flistxattr 45846e12c07SRalf Baechle PTR sys_removexattr 45946e12c07SRalf Baechle PTR sys_lremovexattr 46046e12c07SRalf Baechle PTR sys_fremovexattr /* 4235 */ 46146e12c07SRalf Baechle PTR sys_tkill 46246e12c07SRalf Baechle PTR sys_sendfile64 46346e12c07SRalf Baechle PTR sys_futex 464f088fc84SRalf Baechle#ifdef CONFIG_MIPS_MT_FPAFF 465f088fc84SRalf Baechle /* 466f088fc84SRalf Baechle * For FPU affinity scheduling on MIPS MT processors, we need to 467f088fc84SRalf Baechle * intercept sys_sched_xxxaffinity() calls until we get a proper hook 4680a0fca9dSViresh Kumar * in kernel/sched/core.c. Considered only temporary we only support 4690a0fca9dSViresh Kumar * these hooks for the 32-bit kernel - there is no MIPS64 MT processor 4700a0fca9dSViresh Kumar * atm. 471f088fc84SRalf Baechle */ 47246e12c07SRalf Baechle PTR mipsmt_sys_sched_setaffinity 47346e12c07SRalf Baechle PTR mipsmt_sys_sched_getaffinity 474f088fc84SRalf Baechle#else 47546e12c07SRalf Baechle PTR sys_sched_setaffinity 47646e12c07SRalf Baechle PTR sys_sched_getaffinity /* 4240 */ 477f088fc84SRalf Baechle#endif /* CONFIG_MIPS_MT_FPAFF */ 47846e12c07SRalf Baechle PTR sys_io_setup 47946e12c07SRalf Baechle PTR sys_io_destroy 48046e12c07SRalf Baechle PTR sys_io_getevents 48146e12c07SRalf Baechle PTR sys_io_submit 48246e12c07SRalf Baechle PTR sys_io_cancel /* 4245 */ 48346e12c07SRalf Baechle PTR sys_exit_group 48446e12c07SRalf Baechle PTR sys_lookup_dcookie 48546e12c07SRalf Baechle PTR sys_epoll_create 48646e12c07SRalf Baechle PTR sys_epoll_ctl 48746e12c07SRalf Baechle PTR sys_epoll_wait /* 4250 */ 48846e12c07SRalf Baechle PTR sys_remap_file_pages 48946e12c07SRalf Baechle PTR sys_set_tid_address 49046e12c07SRalf Baechle PTR sys_restart_syscall 49146e12c07SRalf Baechle PTR sys_fadvise64_64 49246e12c07SRalf Baechle PTR sys_statfs64 /* 4255 */ 49346e12c07SRalf Baechle PTR sys_fstatfs64 49446e12c07SRalf Baechle PTR sys_timer_create 49546e12c07SRalf Baechle PTR sys_timer_settime 49646e12c07SRalf Baechle PTR sys_timer_gettime 49746e12c07SRalf Baechle PTR sys_timer_getoverrun /* 4260 */ 49846e12c07SRalf Baechle PTR sys_timer_delete 49946e12c07SRalf Baechle PTR sys_clock_settime 50046e12c07SRalf Baechle PTR sys_clock_gettime 50146e12c07SRalf Baechle PTR sys_clock_getres 50246e12c07SRalf Baechle PTR sys_clock_nanosleep /* 4265 */ 50346e12c07SRalf Baechle PTR sys_tgkill 50446e12c07SRalf Baechle PTR sys_utimes 50546e12c07SRalf Baechle PTR sys_mbind 5061ff1ad6bSHuacai Chen PTR sys_get_mempolicy 5071ff1ad6bSHuacai Chen PTR sys_set_mempolicy /* 4270 */ 50846e12c07SRalf Baechle PTR sys_mq_open 50946e12c07SRalf Baechle PTR sys_mq_unlink 51046e12c07SRalf Baechle PTR sys_mq_timedsend 51146e12c07SRalf Baechle PTR sys_mq_timedreceive 51246e12c07SRalf Baechle PTR sys_mq_notify /* 4275 */ 51346e12c07SRalf Baechle PTR sys_mq_getsetattr 51446e12c07SRalf Baechle PTR sys_ni_syscall /* sys_vserver */ 51546e12c07SRalf Baechle PTR sys_waitid 51646e12c07SRalf Baechle PTR sys_ni_syscall /* available, was setaltroot */ 51746e12c07SRalf Baechle PTR sys_add_key /* 4280 */ 51846e12c07SRalf Baechle PTR sys_request_key 51946e12c07SRalf Baechle PTR sys_keyctl 52046e12c07SRalf Baechle PTR sys_set_thread_area 52146e12c07SRalf Baechle PTR sys_inotify_init 52246e12c07SRalf Baechle PTR sys_inotify_add_watch /* 4285 */ 52346e12c07SRalf Baechle PTR sys_inotify_rm_watch 52446e12c07SRalf Baechle PTR sys_migrate_pages 52546e12c07SRalf Baechle PTR sys_openat 52646e12c07SRalf Baechle PTR sys_mkdirat 52746e12c07SRalf Baechle PTR sys_mknodat /* 4290 */ 52846e12c07SRalf Baechle PTR sys_fchownat 52946e12c07SRalf Baechle PTR sys_futimesat 53046e12c07SRalf Baechle PTR sys_fstatat64 53146e12c07SRalf Baechle PTR sys_unlinkat 53246e12c07SRalf Baechle PTR sys_renameat /* 4295 */ 53346e12c07SRalf Baechle PTR sys_linkat 53446e12c07SRalf Baechle PTR sys_symlinkat 53546e12c07SRalf Baechle PTR sys_readlinkat 53646e12c07SRalf Baechle PTR sys_fchmodat 53746e12c07SRalf Baechle PTR sys_faccessat /* 4300 */ 53846e12c07SRalf Baechle PTR sys_pselect6 53946e12c07SRalf Baechle PTR sys_ppoll 54046e12c07SRalf Baechle PTR sys_unshare 54146e12c07SRalf Baechle PTR sys_splice 54246e12c07SRalf Baechle PTR sys_sync_file_range /* 4305 */ 54346e12c07SRalf Baechle PTR sys_tee 54446e12c07SRalf Baechle PTR sys_vmsplice 54546e12c07SRalf Baechle PTR sys_move_pages 54646e12c07SRalf Baechle PTR sys_set_robust_list 54746e12c07SRalf Baechle PTR sys_get_robust_list /* 4310 */ 54846e12c07SRalf Baechle PTR sys_kexec_load 54946e12c07SRalf Baechle PTR sys_getcpu 55046e12c07SRalf Baechle PTR sys_epoll_pwait 55146e12c07SRalf Baechle PTR sys_ioprio_set 55246e12c07SRalf Baechle PTR sys_ioprio_get /* 4315 */ 55346e12c07SRalf Baechle PTR sys_utimensat 55446e12c07SRalf Baechle PTR sys_signalfd 55546e12c07SRalf Baechle PTR sys_ni_syscall /* was timerfd */ 55646e12c07SRalf Baechle PTR sys_eventfd 55746e12c07SRalf Baechle PTR sys_fallocate /* 4320 */ 55846e12c07SRalf Baechle PTR sys_timerfd_create 55946e12c07SRalf Baechle PTR sys_timerfd_gettime 56046e12c07SRalf Baechle PTR sys_timerfd_settime 56146e12c07SRalf Baechle PTR sys_signalfd4 56246e12c07SRalf Baechle PTR sys_eventfd2 /* 4325 */ 56346e12c07SRalf Baechle PTR sys_epoll_create1 56446e12c07SRalf Baechle PTR sys_dup3 56546e12c07SRalf Baechle PTR sys_pipe2 56646e12c07SRalf Baechle PTR sys_inotify_init1 56746e12c07SRalf Baechle PTR sys_preadv /* 4330 */ 56846e12c07SRalf Baechle PTR sys_pwritev 56946e12c07SRalf Baechle PTR sys_rt_tgsigqueueinfo 57046e12c07SRalf Baechle PTR sys_perf_event_open 57146e12c07SRalf Baechle PTR sys_accept4 57246e12c07SRalf Baechle PTR sys_recvmmsg /* 4335 */ 57346e12c07SRalf Baechle PTR sys_fanotify_init 57446e12c07SRalf Baechle PTR sys_fanotify_mark 57546e12c07SRalf Baechle PTR sys_prlimit64 57646e12c07SRalf Baechle PTR sys_name_to_handle_at 57746e12c07SRalf Baechle PTR sys_open_by_handle_at /* 4340 */ 57846e12c07SRalf Baechle PTR sys_clock_adjtime 57946e12c07SRalf Baechle PTR sys_syncfs 58046e12c07SRalf Baechle PTR sys_sendmmsg 58146e12c07SRalf Baechle PTR sys_setns 58246e12c07SRalf Baechle PTR sys_process_vm_readv /* 4345 */ 58346e12c07SRalf Baechle PTR sys_process_vm_writev 58446e12c07SRalf Baechle PTR sys_kcmp 58546e12c07SRalf Baechle PTR sys_finit_module 5866776254bSJames Hogan PTR sys_sched_setattr 5876776254bSJames Hogan PTR sys_sched_getattr /* 4350 */ 588367f0b50SRalf Baechle PTR sys_renameat2 5898855d608SKees Cook PTR sys_seccomp 59042944521SRalf Baechle PTR sys_getrandom 59142944521SRalf Baechle PTR sys_memfd_create 5925df4c8dbSRalf Baechle PTR sys_bpf /* 4355 */ 593389cdc5dSRalf Baechle PTR sys_execveat 59496fc7a9cSRalf Baechle PTR sys_userfaultfd 59596fc7a9cSRalf Baechle PTR sys_membarrier 596784567f4SEric B Munson PTR sys_mlock2 597e6c058f9SRalf Baechle PTR sys_copy_file_range /* 4360 */ 59862d8e644SRalf Baechle PTR sys_preadv2 59962d8e644SRalf Baechle PTR sys_pwritev2 600