函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-27 11:54:02
Last Modify:2020-03-17 15:28:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:futex_atomic_op_inuser

函数原型:static int futex_atomic_op_inuser(unsigned int encoded_op, unsigned int __user *uaddr)

返回类型:int

参数:

类型参数名称
unsigned intencoded_op
unsigned int __user *uaddr
1706  op等于encoded_op按位与0x70000000的值右移28位
1707  cmp等于encoded_op按位与0x0f000000的值右移24位
1708  oparg等于sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit*@value: value to sign extend*@index: 0 based bit index (0<=index<32) to sign bit* This is safe to use for 16- and 8-bit types as well.
1709  cmparg等于sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit*@value: value to sign extend*@index: 0 based bit index (0<=index<32) to sign bit* This is safe to use for 16- and 8-bit types as well.
1712  如果encoded_op按位与Use (1 << OPARG) instead of OPARG. 左移28位则
1713  如果oparg小于0或oparg大于31则
1719  pr_info_ratelimited("futex_wake_op: %s tries to shift op by %d; fix this program\n", get_task_comm(comm, 当前进程), oparg)
1721  oparg与等于31
1723  oparg等于1左移oparg
1726  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(uaddr, sizeof(u32))则返回:负EFAULT
1729  ret等于arch_futex_atomic_op_inuser(op, oparg, & oldval, uaddr)
1730  如果ret则返回:ret
1734  :cmp恒等于 (oldval == CMPARG) wake
1735  返回:oldval恒等于cmparg
1736  :cmp恒等于 (oldval != CMPARG) wake
1737  返回:oldval不等于cmparg
1738  :cmp恒等于 (oldval < CMPARG) wake
1739  返回:oldval小于cmparg
1740  :cmp恒等于 (oldval >= CMPARG) wake
1741  返回:oldval大于等于cmparg
1742  :cmp恒等于 (oldval <= CMPARG) wake
1743  返回:oldval小于等于cmparg
1744  :cmp恒等于 (oldval > CMPARG) wake
1745  返回:oldval大于cmparg
1746  默认
1747  返回:负ENOSYS
调用者
名称描述
futex_wake_opWake up all waiters hashed on the physical page that is mapped* to this virtual address: