Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:validate_range

Proto:static __always_inline int validate_range(struct mm_struct *mm, __u64 *start, __u64 len)

Type:int

Parameter:

TypeParameterName
struct mm_struct *mm
__u64 *start
__u64len
1277  task_size = size of task vm space
1279  start = Architectures that support memory tagging (assigning tags to memory regions,* embedding these tags into addresses that point to these memory regions, and* checking that the memory and the pointer tags match on memory accesses)( * start)
1281  If start & ~PAGE_MASK Then Return -EINVAL
1283  If len & ~PAGE_MASK Then Return -EINVAL
1285  If Not len Then Return -EINVAL
1287  If start < mmap_min_addr Then Return -EINVAL
1289  If start >= task_size Then Return -EINVAL
1291  If len > task_size - start Then Return -EINVAL
1293  Return 0
Caller
NameDescribe
userfaultfd_register
userfaultfd_unregister
userfaultfd_wakeserfaultfd_wake may be used in combination with the* UFFDIO_*_MODE_DONTWAKE to wakeup userfaults in batches.
userfaultfd_copy
userfaultfd_zeropage