Print this page
OS-3517 lx brand: branded zones don't interpret .interp section
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/brand/solaris10/s10_brand.h
+++ new/usr/src/uts/common/brand/solaris10/s10_brand.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.
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
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 (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
24 24 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
25 + * Copyright (c) 2014, Joyent, Inc. All rights reserved.
25 26 */
26 27
27 28 #ifndef _S10_BRAND_H
28 29 #define _S10_BRAND_H
29 30
30 31 #ifdef __cplusplus
31 32 extern "C" {
32 33 #endif
33 34
34 35 #include <sys/brand.h>
35 36
36 37 #define S10_BRANDNAME "solaris10"
37 38
38 39 #define S10_VERSION_1 1
39 40 #define S10_VERSION S10_VERSION_1
40 41
41 42 #define S10_LIB_NAME "s10_brand.so.1"
42 43 #define S10_LINKER_NAME "ld.so.1"
43 44
44 45 #define S10_LIB32 BRAND_NATIVE_DIR "usr/lib/" S10_LIB_NAME
45 -#define S10_LINKER32 "/lib/" S10_LINKER_NAME
46 -
47 46 #define S10_LIB64 BRAND_NATIVE_DIR "usr/lib/64/" S10_LIB_NAME
48 -#define S10_LINKER64 "/lib/64/" S10_LINKER_NAME
49 47
50 48 #if defined(_LP64)
51 49 #define S10_LIB S10_LIB64
52 -#define S10_LINKER S10_LINKER64
53 50 #else /* !_LP64 */
54 51 #define S10_LIB S10_LIB32
55 -#define S10_LINKER S10_LINKER32
56 52 #endif /* !_LP64 */
57 53
58 54 /*
59 55 * Solaris 10 value of _SIGRTMIN, _SIGRTMAX, MAXSIG, NSIG
60 56 */
61 57 #define S10_SIGRTMIN 41
62 58 #define S10_SIGRTMAX 48
63 59 #define S10_MAXSIG 48
64 60 #define S10_NSIG 49
65 61
66 62 /*
67 63 * Brand system call subcodes. 0-127 are reserved for generic subcodes.
68 64 */
69 65 #define B_S10_PIDINFO 128
70 66 #define B_S10_NATIVE 130
71 67 #define B_S10_FSREGCORRECTION 131
72 68 #define B_S10_ISFDXATTRDIR 132
73 69
74 70 /*
75 71 * Versioning flags
76 72 *
77 73 * The first enum value must be zero. Place new enum values at the end of the
78 74 * list but before S10_NUM_EMUL_FEATURES, which must always come last.
79 75 * Enum values should start with "S10_FEATURE_" and be named after the
80 76 * fixes/backports that they represent. For example, an enum value representing
81 77 * a backport that changes a MNTFS ioctl could be named
82 78 * "S10_FEATURE_ALTERED_MNTFS_IOCTL".
83 79 */
84 80 enum s10_emulated_features {
85 81 S10_FEATURE_ALTERED_MNTFS_IOCTL,
86 82 S10_FEATURE_U9_ZFS_IOCTL, /* S10u9 ZFS ioctl changes */
87 83 S10_NUM_EMUL_FEATURES /* This must be the last entry! */
88 84 };
89 85
90 86 /*
91 87 * This string constant represents the path of the Solaris 10 directory
92 88 * containing emulation feature files.
93 89 */
94 90 #define S10_REQ_EMULATION_DIR "/usr/lib/brand/solaris10"
95 91
96 92 /*
97 93 * s10_brand_syscall_callback_common() needs to save 4 local registers so it
98 94 * can free them up for its own use.
99 95 */
100 96 #define S10_CPU_REG_SAVE_SIZE (sizeof (ulong_t) * 4)
101 97
102 98 /*
103 99 * S10 system call codes for S10 traps that have been removed or reassigned,
104 100 * or that are to be removed or reassigned after the dtrace syscall provider
105 101 * has been reengineered to deal properly with syscall::open (for example).
106 102 */
107 103 #define S10_SYS_forkall 2
108 104 #define S10_SYS_open 5
109 105 #define S10_SYS_wait 7
110 106 #define S10_SYS_creat 8
111 107 #define S10_SYS_link 9
112 108 #define S10_SYS_unlink 10
113 109 #define S10_SYS_exec 11
114 110 #define S10_SYS_mknod 14
115 111 #define S10_SYS_chmod 15
116 112 #define S10_SYS_chown 16
117 113 #define S10_SYS_stat 18
118 114 #define S10_SYS_umount 22
119 115 #define S10_SYS_fstat 28
120 116 #define S10_SYS_utime 30
121 117 #define S10_SYS_access 33
122 118 #define S10_SYS_dup 41
123 119 #define S10_SYS_pipe 42
124 120 #define S10_SYS_issetugid 75
125 121 #define S10_SYS_fsat 76
126 122 #define S10_SYS_rmdir 79
127 123 #define S10_SYS_mkdir 80
128 124 #define S10_SYS_poll 87
129 125 #define S10_SYS_lstat 88
130 126 #define S10_SYS_symlink 89
131 127 #define S10_SYS_readlink 90
132 128 #define S10_SYS_fchmod 93
133 129 #define S10_SYS_fchown 94
134 130 #define S10_SYS_xstat 123
135 131 #define S10_SYS_lxstat 124
136 132 #define S10_SYS_fxstat 125
137 133 #define S10_SYS_xmknod 126
138 134 #define S10_SYS_lchown 130
139 135 #define S10_SYS_rename 134
140 136 #define S10_SYS_fork1 143
141 137 #define S10_SYS_lwp_sema_wait 147
142 138 #define S10_SYS_utimes 154
143 139 #define S10_SYS_lwp_mutex_lock 169
144 140 #define S10_SYS_stat64 215
145 141 #define S10_SYS_lstat64 216
146 142 #define S10_SYS_fstat64 217
147 143 #define S10_SYS_creat64 224
148 144 #define S10_SYS_open64 225
149 145 #define S10_SYS_so_socket 230
150 146 #define S10_SYS_accept 234
151 147
152 148 /*
153 149 * solaris10-brand-specific attributes
154 150 * These must start at ZONE_ATTR_BRAND_ATTRS.
155 151 */
156 152 #define S10_EMUL_BITMAP ZONE_ATTR_BRAND_ATTRS
157 153
158 154 /*
159 155 * s10_emul_bitmap represents an emulation feature bitmap. Each constant
160 156 * in s10_emulated_features defines a bit index in this bitmap. If a bit is
161 157 * set, then the feature associated with the s10_emulated_features constant
162 158 * whose value is the bit's index is present in the associated zone's hosted
163 159 * Solaris 10 environment.
164 160 *
165 161 * NOTE: There must be at least one byte in the bitmap.
166 162 *
167 163 * We don't use the bitmap macros provided by usr/src/uts/common/sys/bitmap.h
168 164 * because they operate on ulong_t arrays. The size of a ulong_t depends on
169 165 * the data model in which the code that declares the ulong_t is compiled:
170 166 * four bytes on 32-bit architectures and eight bytes 64-bit architectures.
171 167 * If the kernel is 64-bit and a 32-bit process executes in a solaris10-
172 168 * branded zone, then if the process' emulation library, which is 32-bit,
173 169 * queries the kernel for the zone's emulation bitmap, then the kernel will
174 170 * refuse because the library will request a bitmap that's half as big
175 171 * as the bitmap the kernel provides. The 32-bit emulation library would need
176 172 * its own macros to define and operate on bitmaps with 64-bit array elements.
177 173 * Thus using the sys/bitmap.h macros is probably more troublesome than
178 174 * defining and using our own constants and macros for bitmap manipulations.
179 175 */
180 176 typedef uint8_t s10_emul_bitmap_t[(S10_NUM_EMUL_FEATURES >> 3) + 1];
181 177
182 178 #if defined(_KERNEL)
183 179
184 180 /* brand specific data */
185 181 typedef struct s10_zone_data {
186 182 /*
187 183 * emul_bitmap specifies the features that are present in the
188 184 * associated zone.
189 185 */
190 186 s10_emul_bitmap_t emul_bitmap;
191 187 } s10_zone_data_t;
192 188
193 189 void s10_brand_syscall_callback(void);
194 190 void s10_brand_syscall32_callback(void);
195 191
196 192 #if !defined(sparc)
197 193 void s10_brand_sysenter_callback(void);
198 194 #endif /* !sparc */
199 195
200 196 #if defined(__amd64)
201 197 void s10_brand_int91_callback(void);
202 198 #endif /* __amd64 */
203 199 #endif /* _KERNEL */
204 200
205 201 #ifdef __cplusplus
206 202 }
207 203 #endif
208 204
209 205 #endif /* _S10_BRAND_H */
|
↓ open down ↓ |
144 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX