Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: lock must be held

Proto:static int check_prlimit_permission(struct task_struct *task, unsigned int flags)

Type:int

Parameter:

TypeParameterName
struct task_struct *task
unsigned intflags
1589  cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
1592  If current process == task Then Return 0
1595  tcred = __task_cred - Access a task's objective credentials*@task: The task to query* Access the objective credentials of a task. The caller must hold the RCU* readlock.* The result of this function should not be passed directly to get_cred();(task)
1596  id_match = uid_eq( real UID of the task , effective UID of the task ) && uid_eq( real UID of the task , saved UID of the task ) && uid_eq( real UID of the task , real UID of the task ) && gid_eq( real GID of the task , effective GID of the task ) && gid_eq( real GID of the task , saved GID of the task ) && gid_eq( real GID of the task , real GID of the task )
1602  If Not id_match && Not ns_capable( user_ns the caps and keyrings are relative to. , Override max number of keymaps ) Then Return -EPERM
1605  Return security_task_prlimit(cred, tcred, flags)
Caller
NameDescribe
SYSCALL_DEFINE4