Print this page
7029 want per-process exploit mitigation features (secflags)
7030 want basic address space layout randomization (aslr)
7031 noexec_user_stack should be a secflag
7032 want a means to forbid mappings around NULL.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/prsystm.h
+++ new/usr/src/uts/common/sys/prsystm.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 28 /* All Rights Reserved */
29 29
30 30 /*
31 31 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
32 32 */
33 33
34 34 #ifndef _SYS_PRSYSTM_H
35 35 #define _SYS_PRSYSTM_H
36 36
37 37 #include <sys/isa_defs.h>
38 38 #include <sys/zone.h>
39 39
40 40 #ifdef __cplusplus
41 41 extern "C" {
42 42 #endif
43 43
44 44 #if defined(_KERNEL)
45 45
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
46 46 extern kmutex_t pr_pidlock;
47 47 extern kcondvar_t *pr_pid_cv;
48 48
49 49 struct prfpregset;
50 50 struct pstatus;
51 51 struct lwpstatus;
52 52 struct psinfo;
53 53 struct lwpsinfo;
54 54 struct prcred;
55 55 struct prpriv;
56 +struct prsecflags;
56 57
57 58 struct seg;
58 59 struct regs;
59 60 struct watched_page;
60 61
61 62 /*
62 63 * These are functions in the procfs module that are
63 64 * called from the kernel proper and from other modules.
64 65 */
65 66 extern uint_t pr_getprot(struct seg *, int, void **,
66 67 caddr_t *, caddr_t *, caddr_t);
67 68 extern void pr_getprot_done(void **);
68 69 extern size_t pr_getsegsize(struct seg *, int);
69 70 extern int pr_isobject(struct vnode *);
70 71 extern int pr_isself(struct vnode *);
71 72 extern void prinvalidate(struct user *);
72 73 extern void prgetstatus(proc_t *, struct pstatus *, zone_t *);
73 74 extern void prgetlwpstatus(kthread_t *, struct lwpstatus *, zone_t *);
74 75 extern void prgetpsinfo(proc_t *, struct psinfo *);
75 76 extern void prgetlwpsinfo(kthread_t *, struct lwpsinfo *);
76 77 extern void prgetprfpregs(klwp_t *, struct prfpregset *);
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
77 78 extern void prgetprxregs(klwp_t *, caddr_t);
78 79 extern int prgetprxregsize(proc_t *);
79 80 #if defined(__lint)
80 81 /* Work around lint confusion between old and new prcred definitions */
81 82 extern void prgetcred();
82 83 #else
83 84 extern void prgetcred(proc_t *, struct prcred *);
84 85 #endif
85 86 extern void prgetpriv(proc_t *, struct prpriv *);
86 87 extern size_t prgetprivsize(void);
88 +extern void prgetsecflags(proc_t *, struct prsecflags *);
87 89 extern int prnsegs(struct as *, int);
88 90 extern void prexit(proc_t *);
89 91 extern void prfree(proc_t *);
90 92 extern void prlwpexit(kthread_t *);
91 93 extern void prlwpfree(proc_t *, lwpent_t *);
92 94 extern void prexecstart(void);
93 95 extern void prexecend(void);
94 96 extern void prrelvm(void);
95 97 extern void prbarrier(proc_t *);
96 98 extern void prstop(int, int);
97 99 extern void prunstop(void);
98 100 extern void prnotify(struct vnode *);
99 101 extern void prstep(klwp_t *, int);
100 102 extern void prnostep(klwp_t *);
101 103 extern void prdostep(void);
102 104 extern int prundostep(void);
103 105 extern int prhasfp(void);
104 106 extern int prhasx(proc_t *);
105 107 extern caddr_t prmapin(struct as *, caddr_t, int);
106 108 extern void prmapout(struct as *, caddr_t, caddr_t, int);
107 109 extern int pr_watch_emul(struct regs *, caddr_t, enum seg_rw);
108 110 extern void pr_free_watched_pages(proc_t *);
109 111 extern int pr_allstopped(proc_t *, int);
110 112 #if defined(__sparc)
111 113 struct _gwindows;
112 114 extern int prnwindows(klwp_t *);
113 115 extern void prgetwindows(klwp_t *, struct _gwindows *);
114 116 #if defined(__sparcv9) /* 32-bit adb macros should not see these defs */
115 117 extern void prgetasregs(klwp_t *, asrset_t);
116 118 extern void prsetasregs(klwp_t *, asrset_t);
117 119 #endif /* __sparcv9 */
118 120 #endif /* __sparc */
119 121 #if defined(__x86)
120 122 struct ssd;
121 123 extern int prnldt(proc_t *);
122 124 extern void prgetldt(proc_t *, struct ssd *);
123 125 #endif /* __x86 */
124 126
125 127 #ifdef _SYSCALL32_IMPL
126 128 struct prfpregset32;
127 129 struct pstatus32;
128 130 struct lwpstatus32;
129 131 struct psinfo32;
130 132 struct lwpsinfo32;
131 133 extern void prgetstatus32(proc_t *, struct pstatus32 *, zone_t *);
132 134 extern void prgetlwpstatus32(kthread_t *, struct lwpstatus32 *, zone_t *);
133 135 extern void prgetpsinfo32(proc_t *, struct psinfo32 *);
134 136 extern void prgetlwpsinfo32(kthread_t *, struct lwpsinfo32 *);
135 137 extern void lwpsinfo_kto32(const struct lwpsinfo *src, struct lwpsinfo32 *dest);
136 138 extern void psinfo_kto32(const struct psinfo *src, struct psinfo32 *dest);
137 139 extern void prgetprfpregs32(klwp_t *, struct prfpregset32 *);
138 140 #if defined(__sparc)
139 141 struct gwindows32;
140 142 void prgetwindows32(klwp_t *, struct gwindows32 *);
141 143 #endif /* __sparc */
142 144 #endif /* _SYSCALL32_IMPL */
143 145
144 146 #endif /* defined (_KERNEL) */
145 147
146 148 #ifdef __cplusplus
147 149 }
148 150 #endif
149 151
150 152 #endif /* _SYS_PRSYSTM_H */
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX