Debian Codegraph @

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

raw
1 .\" Copyright 2012, Cyrill Gorcunov <[email protected]>
2 .\" Copyright 2012, 2013, 2015, Michael Kerrisk <[email protected]>
3 .\" Copyright 2024, Alejandro Colomar <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_MM_MAP 2const 2024-06-01 "Linux man-pages 6.9.1"
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 \fI<linux/prctl.h>\fP).
33 The
34 .I size
35 argument should provide the size of the struct.
36 .TP
37 .B PR_SET_MM_MAP_SIZE
38 Returns
39 (via the
40 .I size
41 argument)
42 the size of the
43 .I struct prctl_mm_map
44 the kernel expects.
45 This allows user space to find a compatible struct.
46 .P
47 These features are available only if the kernel is built with the
48 .B CONFIG_CHECKPOINT_RESTORE
49 option enabled.
50 .SH RETURN VALUE
51 On success,
52 0 is returned.
53 On error, \-1 is returned, and
54 .I errno
55 is set to indicate the error.
56 .SH ERRORS
57 .TP
58 .B EINVAL
59 The third argument
60 is an invalid address.
61 .SH STANDARDS
62 Linux.
63 .SH HISTORY
64 Linux 3.18.
65 .\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
66 .SH SEE ALSO
67 .BR prctl (2),
68 .BR PR_SET_MM (2const),
69 .BR PR_SET_MM_START_CODE (2const),
70 .BR PR_SET_MM_END_CODE (2const),
71 .BR PR_SET_MM_START_DATA (2const),
72 .BR PR_SET_MM_END_DATA (2const),
73 .BR PR_SET_MM_START_STACK (2const),
74 .BR PR_SET_MM_START_BRK (2const),
75 .BR PR_SET_MM_BRK (2const),
76 .BR PR_SET_MM_ARG_START (2const),
77 .BR PR_SET_MM_ARG_END (2const),
78 .BR PR_SET_MM_ENV_START (2const),
79 .BR PR_SET_MM_ENV_END (2const),
80 .BR PR_SET_MM_EXE_FILE (2const)