Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\yama\yama_lsm.c Create Date:2022-07-28 19:55:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:yama_task_prctl - check for Yama-specific prctl operations*@option: operation*@arg2: argument*@arg3: argument*@arg4: argument*@arg5: argument* Return 0 on success, -ve on error. -ENOSYS is returned when Yama* does not handle the given option.

Proto:static int yama_task_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)

Type:int

Parameter:

TypeParameterName
intoption
unsigned longarg2
unsigned longarg3
unsigned longarg4
unsigned longarg5
224  rc = -ENOSYS
225  myself = current process
228  Case option == Set specific pid that is allowed to ptrace the current task.* A value of 0 mean "no process".
235  _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
236  If Not thread_group_leader(myself) Then myself = fetch RCU-protected pointer for dereferencing(group_leader)
238  get_task_struct(myself)
239  _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()
241  If arg2 == 0 Then
243  rc = 0
244  Else if arg2 == PR_SET_PTRACER_ANY || arg2 == -1 Then
246  Else
250  If Not tracer Then
251  rc = -EINVAL
252  Else
258  put_task_struct(myself)
259  Break
262  Return rc