Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-28 09:20:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:SYSCALL_DEFINE4

Proto:SYSCALL_DEFINE4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim)

Type:

Parameter:Nothing

1615  checkflags = 0
1618  If old_rlim Then checkflags |= Flags for security_task_prlimit().
1621  If new_rlim Then
1622  If copy_from_user( & new64, new_rlim, size of new64 ) Then Return -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 : current process
1630  If Not tsk Then
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  Return -ESRCH
1634  ret = lock must be held
1635  If ret Then
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  Return 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  If Not ret && old_rlim Then
1646  rlim_to_rlim64( & old, & old64)
1647  If copy_to_user(old_rlim, & old64, size of old64 ) Then ret = -EFAULT
1651  put_task_struct(tsk)
1652  Return ret