函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:SYSCALL_DEFINE4

函数原型:SYSCALL_DEFINE4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim)

返回类型:

参数:

1615  checkflags等于0
1618  如果old_rlimcheckflags或等于Flags for security_task_prlimit().
1621  如果new_rlim
1622  如果copy_from_user( & new64, new_rlim, new64的长度)则返回:负EFAULT
1624  rlim64_to_rlim( & new64, & new)
1625  checkflags或等于LSM_PRLIMIT_WRITE
1628  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1629  tsk = pid ? d a task by one of its numerical ids* find_task_by_pid_ns():* finds a task by its pid in the specified namespace* find_task_by_vpid():* finds a task by its virtual pid* see also find_vpid() etc in include/linux/pid.h : 当前进程
1630  如果非tsk
1631  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1632  返回:负ESRCH
1634  ret等于 lock must be held
1635  如果ret
1636  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1637  返回:ret
1639  get_task_struct(tsk)
1640  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1642  ret等于make sure you are allowed to change @tsk limits before calling this
1645  如果非retold_rlim
1646  rlim_to_rlim64( & old, & old64)
1647  如果copy_to_user(old_rlim, & old64, old64的长度)则ret等于负EFAULT
1651  put_task_struct(tsk)
1652  返回:ret