Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:compat_put_bitmap

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

Type:long

Parameter:

TypeParameterName
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  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
298  When nr_compat_longs > 1 cycle
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  If nr_compat_longs Then unsafe_put_user((compat_ulong_t) * mask, umask++, Efault)
306  user_access_end()
307  Return 0
308  Efault :
309  user_access_end()
310  Return -EFAULT
Caller
NameDescribe
COMPAT_SYSCALL_DEFINE3