Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\compat.c Create Date:2022-07-28 11:05:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:compat_get_bitmap

Proto:long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask, unsigned long bitmap_size)

Type:long

Parameter:

TypeParameterName
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  If Not 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. Then Return -EFAULT
269  When nr_compat_longs > 1 cycle
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  If nr_compat_longs Then unsafe_get_user( * mask, umask++, Efault)
278  user_access_end()
279  Return 0
281  Efault :
282  user_access_end()
283  Return -EFAULT
Caller
NameDescribe
compat_get_user_cpu_mask
COMPAT_SYSCALL_DEFINE6
COMPAT_SYSCALL_DEFINE4