| 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_ARG_START 2const 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
PR_SET_MM_ARG_START, |
| 10 |
PR_SET_MM_ARG_END, |
| 11 |
PR_SET_MM_ENV_START, |
| 12 |
PR_SET_MM_ENV_END |
| 13 |
\- |
| 14 |
modify kernel memory map descriptor fields |
| 15 |
.SH LIBRARY |
| 16 |
Standard C library |
| 17 |
.RI ( libc ,\~ \-lc ) |
| 18 |
.SH SYNOPSIS |
| 19 |
.nf |
| 20 |
.BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */" |
| 21 |
.B #include <sys/prctl.h> |
| 22 |
.P |
| 23 |
.BI "int prctl(PR_SET_MM, PR_SET_MM_ARG_START, unsigned long " addr ", 0L, 0L);" |
| 24 |
.BI "int prctl(PR_SET_MM, PR_SET_MM_ARG_END, unsigned long " addr ", 0L, 0L);" |
| 25 |
.BI "int prctl(PR_SET_MM, PR_SET_MM_ENV_START, unsigned long " addr ", 0L, 0L);" |
| 26 |
.BI "int prctl(PR_SET_MM, PR_SET_MM_ENV_END, unsigned long " addr ", 0L, 0L);" |
| 27 |
.fi |
| 28 |
.SH DESCRIPTION |
| 29 |
.TP |
| 30 |
.B PR_SET_MM_ARG_START |
| 31 |
Set the address above which the program command line is placed. |
| 32 |
.TP |
| 33 |
.B PR_SET_MM_ARG_END |
| 34 |
Set the address below which the program command line is placed. |
| 35 |
.TP |
| 36 |
.B PR_SET_MM_ENV_START |
| 37 |
Set the address above which the program environment is placed. |
| 38 |
.TP |
| 39 |
.B PR_SET_MM_ENV_END |
| 40 |
Set the address below which the program environment is placed. |
| 41 |
.P |
| 42 |
The address passed with these calls |
| 43 |
should belong to a process stack area. |
| 44 |
Thus, the corresponding memory area must be readable, writable, and |
| 45 |
(depending on the kernel configuration) have the |
| 46 |
.B MAP_GROWSDOWN |
| 47 |
attribute set (see |
| 48 |
.BR mmap (2)). |
| 49 |
.SH RETURN VALUE |
| 50 |
On success, |
| 51 |
0 is returned. |
| 52 |
On error, \-1 is returned, and |
| 53 |
.I errno |
| 54 |
is set to indicate the error. |
| 55 |
.SH ERRORS |
| 56 |
.TP |
| 57 |
.B EINVAL |
| 58 |
.I addr |
| 59 |
is greater than |
| 60 |
.B TASK_SIZE |
| 61 |
(the limit on the size of the user address space for this architecture). |
| 62 |
.SH STANDARDS |
| 63 |
Linux. |
| 64 |
.SH HISTORY |
| 65 |
Linux 3.5. |
| 66 |
.\" commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7 |
| 67 |
.SH SEE ALSO |
| 68 |
.BR prctl (2), |
| 69 |
.BR PR_SET_MM (2const) |