Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_MM_MAP.2const

raw
1 .\" Copyright 2012, Cyrill Gorcunov <[email protected]>
2 .\" Copyright 2012-2015, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_MM_MAP 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_SET_MM_MAP,
10 PR_SET_MM_MAP_SIZE
11 \-
12 modify kernel memory map descriptor fields
13 .SH LIBRARY
14 Standard C library
15 .RI ( libc ,\~ \-lc )
16 .SH SYNOPSIS
17 .nf
18 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
19 .B #include <sys/prctl.h>
20 .P
21 .B int prctl(PR_SET_MM, PR_SET_MM_MAP,
22 .BI " struct prctl_mm_map *" map ", unsigned long " size ", 0L);"
23 .BI "int prctl(PR_SET_MM, PR_SET_MM_MAP_SIZE, unsigned int *" size ", 0L, 0L);"
24 .fi
25 .SH DESCRIPTION
26 .TP
27 .B PR_SET_MM_MAP
28 Provides one-shot access to all the addresses modifyable with
29 .BR PR_SET_MM (2const)
30 by passing in a
31 .I struct prctl_mm_map
32 (as defined in
33 .IR <linux/prctl.h> ).
34 The
35 .I size
36 argument should provide the size of the struct.
37 .TP
38 .B PR_SET_MM_MAP_SIZE
39 Returns
40 (via the
41 .I size
42 argument)
43 the size of the
44 .I struct prctl_mm_map
45 the kernel expects.
46 This allows user space to find a compatible struct.
47 .P
48 These features are available only if the kernel is built with the
49 .B CONFIG_CHECKPOINT_RESTORE
50 option enabled.
51 .SH RETURN VALUE
52 On success,
53 0 is returned.
54 On error, \-1 is returned, and
55 .I errno
56 is set to indicate the error.
57 .SH ERRORS
58 .TP
59 .B EINVAL
60 The third argument
61 is an invalid address.
62 .SH STANDARDS
63 Linux.
64 .SH HISTORY
65 Linux 3.18.
66 .\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
67 .SH SEE ALSO
68 .BR prctl (2),
69 .BR PR_SET_MM (2const),
70 .BR PR_SET_MM_START_CODE (2const),
71 .BR PR_SET_MM_END_CODE (2const),
72 .BR PR_SET_MM_START_DATA (2const),
73 .BR PR_SET_MM_END_DATA (2const),
74 .BR PR_SET_MM_START_STACK (2const),
75 .BR PR_SET_MM_START_BRK (2const),
76 .BR PR_SET_MM_BRK (2const),
77 .BR PR_SET_MM_ARG_START (2const),
78 .BR PR_SET_MM_ARG_END (2const),
79 .BR PR_SET_MM_ENV_START (2const),
80 .BR PR_SET_MM_ENV_END (2const),
81 .BR PR_SET_MM_EXE_FILE (2const)