Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_MM_START_STACK.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_START_STACK 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_SET_MM_START_STACK
10 \-
11 modify kernel memory map descriptor fields
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_SET_MM, PR_SET_MM_START_STACK, unsigned long " addr ", 0L, 0L);"
21 .fi
22 .SH DESCRIPTION
23 Set the start address of the stack.
24 The corresponding memory area must be readable and writable.
25 .SH RETURN VALUE
26 On success,
27 0 is returned.
28 On error, \-1 is returned, and
29 .I errno
30 is set to indicate the error.
31 .SH ERRORS
32 .TP
33 .B EINVAL
34 .I addr
35 is greater than
36 .B TASK_SIZE
37 (the limit on the size of the user address space for this architecture).
38 .TP
39 .B EINVAL
40 The permissions of the corresponding memory area are not as required.
41 .SH STANDARDS
42 Linux.
43 .SH HISTORY
44 Linux 3.3.
45 .\" commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
46 .SH SEE ALSO
47 .BR prctl (2),
48 .BR PR_SET_MM (2const)