2 * SYSCALL_DEFINE6(mbind, unsigned long, start, unsigned long, len,
3 unsigned long, mode, unsigned long __user *, nmask,
4 unsigned long, maxnode, unsigned, flags)
7 #include <linux/mempolicy.h>
14 #define MPOL_F_STATIC_NODES (1 << 15)
15 #define MPOL_F_RELATIVE_NODES (1 << 14)
17 static void sanitise_mbind(int childno
)
19 unsigned long maxnode
;
21 (void) common_set_mmap_ptr_len(childno
);
24 shm
->syscall
[childno
].a5
&= ~((page_size
* 8) - 1);
26 maxnode
= shm
->syscall
[childno
].a5
;
28 if (maxnode
< 2 || maxnode
> (page_size
* 8)) {
29 shm
->syscall
[childno
].a5
= rand32();
35 struct syscallentry syscall_mbind
= {
47 .values
= { MPOL_DEFAULT
, MPOL_BIND
, MPOL_INTERLEAVE
, MPOL_PREFERRED
},
51 .arg4type
= ARG_ADDRESS
,
53 .arg5name
= "maxnode",
54 .arg5type
= ARG_RANGE
,
62 .values
= { MPOL_F_STATIC_NODES
, MPOL_F_RELATIVE_NODES
},
64 .sanitise
= sanitise_mbind
,