函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:compat_put_bitmap

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

返回类型:long

参数:

类型参数名称
compat_ulong_t __user *umask
unsigned long *mask
unsigned longbitmap_size
292  bitmap_size等于@a is a power of 2 value (bitmap_size, BITS_PER_COMPAT_LONG)
293  nr_compat_longs等于BITS_TO_COMPAT_LONGS(bitmap_size)
295  如果非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
298 nr_compat_longs大于1循环
299  m等于mask自加
300  unsafe_put_user((compat_ulong_t)m, umask++, Efault)
301  unsafe_put_user(m >> BITS_PER_COMPAT_LONG, umask++, Efault)
302  nr_compat_longs减等于2
304  如果nr_compat_longsunsafe_put_user((compat_ulong_t) * mask, umask++, Efault)
306  user_access_end()
307  返回:0
308  Efault :
309  user_access_end()
310  返回:负EFAULT
调用者
名称描述
COMPAT_SYSCALL_DEFINE3
COMPAT_SYSCALL_DEFINE5
compat_set_fd_set