Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:32:31
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:COMPAT_SYSCALL_DEFINE3

Proto:COMPAT_SYSCALL_DEFINE3(set_mempolicy, int, mode, compat_ulong_t __user *, nmask, compat_ulong_t, maxnode)

Type:

Parameter:Nothing

1642  unsigned long __user * nm = NULL
1644  DECLARE_BITMAP(bm, MAX_NUMNODES)
1646  nr_bits = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, maxnode - 1, MAX_NUMNODES)
1647  alloc_size = @a is a power of 2 value (nr_bits, BITS_PER_LONG) / 8
1649  If nmask Then
1650  If compat_get_bitmap(bm, nmask, nr_bits) Then Return -EFAULT
1652  nm = Allocate user-space memory for the duration of a single system call,* in order to marshall parameters inside a compat thunk.
1653  If copy_to_user(nm, bm, alloc_size) Then Return -EFAULT
1657  Return Set the process memory policy