函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-27 10:21:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:SYSCALL_DEFINE5

函数原型:SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5)

返回类型:

参数:

2267  me等于当前进程
2271  error等于security_task_prctl(option, arg2, arg3, arg4, arg5)
2272  如果error不等于负ENOSYS则返回:error
2275  error等于0
2277  :option恒等于Second arg is a signal
2279  error等于负EINVAL
2280  退出
2282  父进程终止时发出的信号等于arg2
2283  退出
2284  :option恒等于Second arg is a ptr to return the signal
2285  error等于put_user - Write a simple value into user space(父进程终止时发出的信号, (int__user * )arg2)
2286  退出
2287  :option恒等于Get/set current->mm->dumpable
2288  error等于get_dumpable(内存信息)
2289  退出
2290  :option恒等于PR_SET_DUMPABLE
2291  如果arg2不等于No setuid dumping arg2不等于Dump as user of process
2292  error等于负EINVAL
2293  退出
2295  set_dumpable(内存信息, arg2)
2296  退出
2298  :option恒等于PR_SET_UNALIGN
2299  error等于SET_UNALIGN_CTL(me, arg2)
2300  退出
2301  :option恒等于Get/set unaligned access control bits (if meaningful)
2302  error等于GET_UNALIGN_CTL(me, arg2)
2303  退出
2304  :option恒等于PR_SET_FPEMU
2305  error等于SET_FPEMU_CTL(me, arg2)
2306  退出
2307  :option恒等于Get/set floating-point emulation control bits (if meaningful)
2308  error等于GET_FPEMU_CTL(me, arg2)
2309  退出
2310  :option恒等于PR_SET_FPEXC
2311  error等于SET_FPEXC_CTL(me, arg2)
2312  退出
2313  :option恒等于Get/set floating-point exception mode (if meaningful)
2314  error等于GET_FPEXC_CTL(me, arg2)
2315  退出
2316  :option恒等于Get/set whether we use statistical process timing or accurate timestamp* based process timing
2317  error等于Normal, traditional,statistical process timing
2318  退出
2319  :option恒等于PR_SET_TIMING
2320  如果arg2不等于Normal, traditional,statistical process timing error等于负EINVAL
2322  退出
2323  :option恒等于Set process name
2324  comm[是否使用FPU的长度 - 1]等于0
2325  如果复制用户字符串小于0则返回:负EFAULT
2328  set_task_comm(me, comm)
2329  proc_comm_connector(me)
2330  退出
2331  :option恒等于Get process name
2332  get_task_comm(comm, me)
2333  如果copy_to_user((char__user * )arg2, comm, comm的长度)则返回:负EFAULT
2335  退出
2336  :option恒等于Get/set process endian
2337  error等于GET_ENDIAN(me, arg2)
2338  退出
2339  :option恒等于PR_SET_ENDIAN
2340  error等于SET_ENDIAN(me, arg2)
2341  退出
2342  :option恒等于Get/set process seccomp mode
2343  error等于prctl_get_seccomp()
2344  退出
2345  :option恒等于PR_SET_SECCOMP
2346  error等于prctl_set_seccomp(arg2, (char__user * )arg3)
2347  退出
2348  :option恒等于Get/set the process' ability to use the timestamp counter instruction
2349  error等于Get/set a process' ability to use the timestamp counter instruction (arg2)
2350  退出
2351  :option恒等于PR_SET_TSC
2352  error等于SET_TSC_CTL(arg2)
2353  退出
2354  :option恒等于PR_TASK_PERF_EVENTS_DISABLE
2355  error等于perf_event_task_disable()
2356  退出
2357  :option恒等于PR_TASK_PERF_EVENTS_ENABLE
2358  error等于perf_event_task_enable()
2359  退出
2360  :option恒等于PR_GET_TIMERSLACK
2361  如果timer_slack_ns大于ULONG_MAXerror等于ULONG_MAX
2363  否则error等于timer_slack_ns
2365  退出
2366  :option恒等于Get/set the timerslack as used by poll/select/nanosleep* A value of 0 means "use default"
2367  如果arg2小于等于0则timer_slack_ns等于default_timer_slack_ns
2370  否则timer_slack_ns等于arg2
2372  退出
2373  :option恒等于Set early/late kill mode for hwpoison memory corruption.* This influences when the process gets killed on a memory corruption.
2374  如果arg4按位或arg5则返回:负EINVAL
2377  :arg2恒等于PR_MCE_KILL_CLEAR
2378  如果arg3不等于0则返回:负EINVAL
2380  flags与等于Process policy on mce errors 的反
2381  退出
2382  :arg2恒等于PR_MCE_KILL_SET
2386  否则如果arg3恒等于PR_MCE_KILL_LATEflags与等于Early kill for mce process policy 的反
2388  否则如果arg3恒等于PR_MCE_KILL_DEFAULTflags与等于Early kill for mce process policy 按位或Process policy on mce errors 的值的反
2391  否则返回:负EINVAL
2393  退出
2394  默认
2395  返回:负EINVAL
2397  退出
2398  :option恒等于PR_MCE_KILL_GET
2399  如果arg2按位或arg3按位或arg4按位或arg5则返回:负EINVAL
2401  如果flags按位与Process policy on mce errors error等于如果flags按位与Early kill for mce process policy PR_MCE_KILL_EARLY否则PR_MCE_KILL_LATE
2404  否则error等于PR_MCE_KILL_DEFAULT
2406  退出
2407  :option恒等于Tune up process memory map specifics.
2408  error等于prctl_set_mm(arg2, arg3, arg4, arg5)
2409  退出
2410  :option恒等于PR_GET_TID_ADDRESS
2411  error等于prctl_get_tid_address(me, (int__user * * )arg2)
2412  退出
2413  :option恒等于PR_SET_CHILD_SUBREAPER
2414  is_child_subreaper等于非非arg2
2415  如果非arg2退出
2418  walk_process_tree(me, propagate_has_child_subreaper, NULL)
2419  退出
2420  :option恒等于PR_GET_CHILD_SUBREAPER
2421  error等于put_user - Write a simple value into user space(is_child_subreaper, (int__user * )arg2)
2423  退出
2424  :option恒等于If no_new_privs is set, then operations that grant new privileges (i.e.* execve) will either fail or not grant them. This affects suid/sgid,* file capabilities, and LSMs.* Operations that merely manipulate or drop existing privileges (setresuid,
2425  如果arg2不等于1或arg3arg4arg5则返回:负EINVAL
2428  task_set_no_new_privs(当前进程)
2429  退出
2430  :option恒等于PR_GET_NO_NEW_PRIVS
2431  如果arg2arg3arg4arg5则返回:负EINVAL
2433  返回:如果task_no_new_privs(当前进程)则1否则0
2434  :option恒等于PR_GET_THP_DISABLE
2435  如果arg2arg3arg4arg5则返回:负EINVAL
2437  error等于非非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
2438  退出
2439  :option恒等于PR_SET_THP_DISABLE
2440  如果arg3arg4arg5则返回:负EINVAL
2442  如果down_write_killable( & mmap_sem)则返回:负EINTR
2444  如果arg2设置内存位
2446  否则lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
2448  lease a write lock
2449  退出
2450  :option恒等于No longer implemented, but left here to ensure the numbers stay reserved:
2451  :option恒等于PR_MPX_DISABLE_MANAGEMENT
2453  返回:负EINVAL
2454  :option恒等于PR_SET_FP_MODE
2455  error等于SET_FP_MODE(me, arg2)
2456  退出
2457  :option恒等于PR_GET_FP_MODE
2458  error等于GET_FP_MODE(me)
2459  退出
2460  :option恒等于set task vector length
2461  error等于SVE_SET_VL(arg2)
2462  退出
2463  :option恒等于get task vector length
2464  error等于SVE_GET_VL()
2465  退出
2466  :option恒等于Per task speculation control
2467  如果arg3arg4arg5则返回:负EINVAL
2469  error等于arch_prctl_spec_ctrl_get(me, arg2)
2470  退出
2471  :option恒等于PR_SET_SPECULATION_CTRL
2472  如果arg4arg5则返回:负EINVAL
2474  error等于arch_prctl_spec_ctrl_set(me, arg2, arg3)
2475  退出
2476  :option恒等于Reset arm64 pointer authentication keys
2477  如果arg3arg4arg5则返回:负EINVAL
2479  error等于PAC_RESET_KEYS(me, arg2)
2480  退出
2481  :option恒等于Tagged user address controls for arm64
2482  如果arg3arg4arg5则返回:负EINVAL
2484  error等于SET_TAGGED_ADDR_CTRL(arg2)
2485  退出
2486  :option恒等于PR_GET_TAGGED_ADDR_CTRL
2487  如果arg2arg3arg4arg5则返回:负EINVAL
2489  error等于GET_TAGGED_ADDR_CTRL()
2490  退出
2491  默认
2492  error等于负EINVAL
2493  退出
2495  返回:error