Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:safesetid_file_read

Proto:static ssize_t safesetid_file_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tlen
loff_t *ppos
212  res = 0
216  mutex_lock( & policy_update_lock)
217  pol = cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(safesetid_setuid_rules, lockdep_is_held( & policy_update_lock))
219  If pol Then
220  kbuf = policy_str
221  res = simple_read_from_buffer(buf, len, ppos, kbuf, strlen - Find the length of a string*@s: The string to be sized)
224  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
225  Return res