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/exec/elf/elf_impl.h
+++ new/usr/src/uts/common/exec/elf/elf_impl.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 *
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #ifndef _ELF_ELF_IMPL_H
27 27 #define _ELF_ELF_IMPL_H
28 28
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 29 #ifdef __cplusplus
32 30 extern "C" {
33 31 #endif
34 32
35 33 #if !defined(_LP64) || defined(_ELF32_COMPAT)
36 34
37 35 /*
38 36 * Definitions for ELF32, native 32-bit or 32-bit compatibility mode.
39 37 */
40 38 #define ELFCLASS ELFCLASS32
41 39 typedef unsigned int aux_val_t;
42 40 typedef auxv32_t aux_entry_t;
43 41
44 42 #define USR_LIB_RTLD "/usr/lib/ld.so.1"
45 43
46 44 #else /* !_LP64 || _ELF32_COMPAT */
47 45
48 46 /*
49 47 * Definitions for native 64-bit ELF
50 48 */
51 49 #define ELFCLASS ELFCLASS64
52 50 typedef unsigned long aux_val_t;
53 51 typedef auxv_t aux_entry_t;
54 52
55 53 /* put defines for 64-bit architectures here */
56 54 #if defined(__sparcv9)
57 55 #define USR_LIB_RTLD "/usr/lib/sparcv9/ld.so.1"
58 56 #endif
59 57
60 58 #if defined(__amd64)
61 59 #define USR_LIB_RTLD "/usr/lib/amd64/ld.so.1"
62 60 #endif
63 61
64 62 #endif /* !_LP64 || _ELF32_COMPAT */
65 63
66 64 /*
67 65 * Start of an ELF Note.
68 66 */
69 67 typedef struct {
70 68 Nhdr nhdr;
71 69 char name[8];
72 70 } Note;
73 71
74 72 #ifdef _ELF32_COMPAT
75 73 /*
76 74 * These are defined only for the 32-bit compatibility
77 75 * compilation mode of the 64-bit kernel.
78 76 */
79 77 #define elfexec elf32exec
80 78 #define elfnote elf32note
81 79 #define elfcore elf32core
82 80 #define mapexec_brand mapexec32_brand
83 81 #define setup_note_header setup_note_header32
84 82 #define write_elfnotes write_elfnotes32
85 83 #define setup_old_note_header setup_old_note_header32
86 84 #define write_old_elfnotes write_old_elfnotes32
87 85
88 86 #if defined(__sparc)
89 87 #define gwindows_t gwindows32_t
90 88 #define rwindow rwindow32
91 89 #endif
92 90
93 91 #define psinfo_t psinfo32_t
94 92 #define pstatus_t pstatus32_t
95 93 #define lwpsinfo_t lwpsinfo32_t
96 94 #define lwpstatus_t lwpstatus32_t
97 95
98 96 #define prgetpsinfo prgetpsinfo32
99 97 #define prgetstatus prgetstatus32
100 98 #define prgetlwpsinfo prgetlwpsinfo32
101 99 #define prgetlwpstatus prgetlwpstatus32
102 100 #define prgetwindows prgetwindows32
103 101
104 102 #define prpsinfo_t prpsinfo32_t
105 103 #define prstatus_t prstatus32_t
106 104 #if defined(prfpregset_t)
107 105 #undef prfpregset_t
108 106 #endif
109 107 #define prfpregset_t prfpregset32_t
110 108
111 109 #define oprgetstatus oprgetstatus32
112 110 #define oprgetpsinfo oprgetpsinfo32
113 111 #define prgetprfpregs prgetprfpregs32
114 112
115 113 #endif /* _ELF32_COMPAT */
116 114
117 115 extern int elfnote(vnode_t *, offset_t *, int, int, void *, rlim64_t, cred_t *);
118 116 extern void setup_old_note_header(Phdr *, proc_t *);
119 117 extern void setup_note_header(Phdr *, proc_t *);
120 118
121 119 extern int write_old_elfnotes(proc_t *, int, vnode_t *, offset_t,
122 120 rlim64_t, cred_t *);
123 121
124 122 extern int write_elfnotes(proc_t *, int, vnode_t *, offset_t,
125 123 rlim64_t, cred_t *, core_content_t);
126 124
127 125 #ifdef __cplusplus
128 126 }
129 127 #endif
130 128
131 129 #endif /* _ELF_ELF_IMPL_H */
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX