函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ns_revision_read

函数原型:static ssize_t ns_revision_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tsize
loff_t *ppos
565  rev等于 needed for tty driver, and maybe others
570  mutex_lock_nested( & lock, level)
571  last_read等于last_read
572  如果last_read恒等于revision
573  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.
574  如果f_flags按位与O_NONBLOCK则返回:负EAGAIN
576  如果wait_event_interruptible - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(wait, last_read != READ_ONCE(revision))则返回:负These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see.
580  mutex_lock_nested( & lock, level)
583  avail等于输出格式化串
584  如果ppossize大于avail
585  last_read等于revision
586  ppos等于0
588  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.
590  返回:simple_read_from_buffer(buf, size, ppos, buffer, avail)