mirror of https://github.com/mkerrisk/man-pages
migrate_pages.2: Document EFAULT and EINVAL errors
I encountered these errors while writing testcase for migrate_pages syscall for LTP (Linux test project). I checked stable kernel tree 3.5 to see which paths return these. Both can be returned from get_nodes(), which is called from: SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, const unsigned long __user *, old_nodes, const unsigned long __user *, new_nodes) The testcase does following: EFAULT a) old_nodes/new_nodes is area mmaped with PROT_NONE b) old_nodes/new_nodes is area not mmapped in process address space, -1 or area that has been just munmmaped EINVAL a) maxnodes overflows kernel limit b) new_nodes contain node, which has no memory or does not exist or is not returned for get_mempolicy(MPOL_F_MEMS_ALLOWED). Signed-off-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
ec5308ca6e
commit
3d350ba3c9
|
@ -95,6 +95,30 @@ On error, it returns \-1, and sets
|
|||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EFAULT
|
||||
Part or all of the memory range specified by
|
||||
.IR old_nodes / new_nodes
|
||||
and
|
||||
.I maxnode
|
||||
points outside your accessible address space.
|
||||
.TP
|
||||
.B EINVAL
|
||||
The value specified by
|
||||
.I maxnode
|
||||
exceeds a kernel-imposed limit.
|
||||
.\" As at 3.5, this limit is "a page worth of bits", e.g.,
|
||||
.\" 8 * 4096 bits, assuming a 4kB page size.
|
||||
Or,
|
||||
.I old_nodes
|
||||
or
|
||||
.I new_nodes
|
||||
specifies one or more node IDs that are
|
||||
greater than the maximum supported node ID.
|
||||
Or, none of the node IDs specified by
|
||||
.I new_nodes
|
||||
are on-line and allowed by the process's current cpuset context,
|
||||
or none of the specified nodes contain memory.
|
||||
.TP
|
||||
.B EPERM
|
||||
Insufficient privilege
|
||||
.RB ( CAP_SYS_NICE )
|
||||
|
|
Loading…
Reference in New Issue