函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:compat_get_bitmap

函数原型:long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask, unsigned long bitmap_size)

返回类型:long

参数:

类型参数名称
unsigned long *mask
const compat_ulong_t __user *umask
unsigned longbitmap_size
263  bitmap_size等于@a is a power of 2 value (bitmap_size, BITS_PER_COMPAT_LONG)
264  nr_compat_longs等于BITS_TO_COMPAT_LONGS(bitmap_size)
266  如果非The "unsafe" user accesses aren't really "unsafe", but the naming* is a big fat warning: you have to not only do the access_ok()* checking before using them, but you have to surround them with the* user_access_begin/end() pair.则返回:负EFAULT
269 nr_compat_longs大于1循环
271  unsafe_get_user(l1, umask++, Efault)
272  unsafe_get_user(l2, umask++, Efault)
273  mask自加等于l2左移BITS_PER_COMPAT_LONG位按位或l1
274  nr_compat_longs减等于2
276  如果nr_compat_longsunsafe_get_user( * mask, umask++, Efault)
278  user_access_end()
279  返回:0
281  Efault :
282  user_access_end()
283  返回:负EFAULT
调用者
名称描述
compat_get_user_cpu_mask
COMPAT_SYSCALL_DEFINE6
COMPAT_SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE3
compat_get_fd_setOoo, nasty. We need here to frob 32-bit unsigned longs to* 64-bit unsigned longs.