Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/brand/solaris10/s10_brand.c
+++ new/usr/src/uts/common/brand/solaris10/s10_brand.c
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 (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
24 24 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
25 25 */
26 26
27 27 #include <sys/errno.h>
28 28 #include <sys/exec.h>
29 29 #include <sys/file.h>
30 30 #include <sys/kmem.h>
31 31 #include <sys/modctl.h>
32 32 #include <sys/model.h>
33 33 #include <sys/proc.h>
34 34 #include <sys/syscall.h>
35 35 #include <sys/systm.h>
36 36 #include <sys/thread.h>
37 37 #include <sys/cmn_err.h>
38 38 #include <sys/archsystm.h>
39 39 #include <sys/pathname.h>
40 40 #include <sys/sunddi.h>
41 41
42 42 #include <sys/machbrand.h>
43 43 #include <sys/brand.h>
44 44 #include "s10_brand.h"
45 45
46 46 char *s10_emulation_table = NULL;
47 47
48 48 void s10_init_brand_data(zone_t *);
49 49 void s10_free_brand_data(zone_t *);
50 50 void s10_setbrand(proc_t *);
51 51 int s10_getattr(zone_t *, int, void *, size_t *);
52 52 int s10_setattr(zone_t *, int, void *, size_t);
53 53 int s10_brandsys(int, int64_t *, uintptr_t, uintptr_t, uintptr_t,
54 54 uintptr_t, uintptr_t, uintptr_t);
55 55 void s10_copy_procdata(proc_t *, proc_t *);
56 56 void s10_proc_exit(struct proc *, klwp_t *);
57 57 void s10_exec();
58 58 int s10_initlwp(klwp_t *);
59 59 void s10_forklwp(klwp_t *, klwp_t *);
60 60 void s10_freelwp(klwp_t *);
61 61 void s10_lwpexit(klwp_t *);
62 62 int s10_elfexec(vnode_t *, execa_t *, uarg_t *, intpdata_t *, int,
63 63 long *, int, caddr_t, cred_t *, int);
64 64 void s10_sigset_native_to_s10(sigset_t *);
65 65 void s10_sigset_s10_to_native(sigset_t *);
66 66
67 67 /* s10 brand */
68 68 struct brand_ops s10_brops = {
69 69 s10_init_brand_data,
70 70 s10_free_brand_data,
71 71 s10_brandsys,
72 72 s10_setbrand,
73 73 s10_getattr,
74 74 s10_setattr,
75 75 s10_copy_procdata,
76 76 s10_proc_exit,
77 77 s10_exec,
78 78 lwp_setrval,
79 79 s10_initlwp,
80 80 s10_forklwp,
81 81 s10_freelwp,
82 82 s10_lwpexit,
83 83 s10_elfexec,
84 84 s10_sigset_native_to_s10,
85 85 s10_sigset_s10_to_native,
86 86 S10_NSIG,
87 87 };
88 88
89 89 #ifdef sparc
90 90
91 91 struct brand_mach_ops s10_mops = {
92 92 s10_brand_syscall_callback,
93 93 s10_brand_syscall32_callback
94 94 };
95 95
96 96 #else /* sparc */
97 97
98 98 #ifdef __amd64
99 99
100 100 struct brand_mach_ops s10_mops = {
101 101 s10_brand_sysenter_callback,
102 102 s10_brand_int91_callback,
103 103 s10_brand_syscall_callback,
104 104 s10_brand_syscall32_callback
105 105 };
106 106
107 107 #else /* ! __amd64 */
108 108
109 109 struct brand_mach_ops s10_mops = {
110 110 s10_brand_sysenter_callback,
111 111 NULL,
112 112 s10_brand_syscall_callback,
113 113 NULL
114 114 };
115 115 #endif /* __amd64 */
116 116
117 117 #endif /* _sparc */
118 118
119 119 struct brand s10_brand = {
120 120 BRAND_VER_1,
121 121 "solaris10",
122 122 &s10_brops,
↓ open down ↓ |
122 lines elided |
↑ open up ↑ |
123 123 &s10_mops
124 124 };
125 125
126 126 static struct modlbrand modlbrand = {
127 127 &mod_brandops, /* type of module */
128 128 "Solaris 10 Brand", /* description of module */
129 129 &s10_brand /* driver ops */
130 130 };
131 131
132 132 static struct modlinkage modlinkage = {
133 - MODREV_1, (void *)&modlbrand, NULL
133 + MODREV_1, { (void *)&modlbrand, NULL }
134 134 };
135 135
136 136 void
137 137 s10_setbrand(proc_t *p)
138 138 {
139 139 brand_solaris_setbrand(p, &s10_brand);
140 140 }
141 141
142 142 /*ARGSUSED*/
143 143 int
144 144 s10_getattr(zone_t *zone, int attr, void *buf, size_t *bufsize)
145 145 {
146 146 ASSERT(zone->zone_brand == &s10_brand);
147 147 if (attr == S10_EMUL_BITMAP) {
148 148 if (buf == NULL || *bufsize != sizeof (s10_emul_bitmap_t))
149 149 return (EINVAL);
150 150 if (copyout(((s10_zone_data_t *)zone->zone_brand_data)->
151 151 emul_bitmap, buf, sizeof (s10_emul_bitmap_t)) != 0)
152 152 return (EFAULT);
153 153 return (0);
154 154 }
155 155
156 156 return (EINVAL);
157 157 }
158 158
159 159 int
160 160 s10_setattr(zone_t *zone, int attr, void *buf, size_t bufsize)
161 161 {
162 162 ASSERT(zone->zone_brand == &s10_brand);
163 163 if (attr == S10_EMUL_BITMAP) {
164 164 if (buf == NULL || bufsize != sizeof (s10_emul_bitmap_t))
165 165 return (EINVAL);
166 166 if (copyin(buf, ((s10_zone_data_t *)zone->zone_brand_data)->
167 167 emul_bitmap, sizeof (s10_emul_bitmap_t)) != 0)
168 168 return (EFAULT);
169 169 return (0);
170 170 }
171 171
172 172 return (EINVAL);
173 173 }
174 174
175 175 #ifdef __amd64
176 176 /*
177 177 * The Nevada kernel clears %fs for threads in 64-bit x86 processes but S10's
178 178 * libc expects %fs to be nonzero. This causes some committed
179 179 * libc/libthread interfaces (e.g., thr_main()) to fail, which impacts several
180 180 * libraries, including libdoor. This function sets the specified LWP's %fs
181 181 * register to the legacy S10 selector value (LWPFS_SEL).
182 182 *
183 183 * The best solution to the aforementioned problem is backporting CRs
184 184 * 6467491 to Solaris 10 so that 64-bit x86 Solaris 10 processes
185 185 * would accept zero for %fs. Backporting the CRs is a requirement for running
186 186 * S10 Containers in PV domUs because 64-bit Xen clears %fsbase when %fs is
187 187 * nonzero. Such behavior breaks 64-bit processes because Xen has to fetch the
188 188 * FS segments' base addresses from the LWPs' GDTs, which are only capable of
189 189 * 32-bit addressing.
190 190 */
191 191 /*ARGSUSED*/
192 192 static void
193 193 s10_amd64_correct_fsreg(klwp_t *l)
194 194 {
195 195 if (lwp_getdatamodel(l) == DATAMODEL_NATIVE) {
196 196 kpreempt_disable();
197 197 l->lwp_pcb.pcb_fs = LWPFS_SEL;
198 198 l->lwp_pcb.pcb_rupdate = 1;
199 199 lwptot(l)->t_post_sys = 1; /* Guarantee update_sregs() */
200 200 kpreempt_enable();
201 201 }
202 202 }
203 203 #endif /* __amd64 */
204 204
205 205 /*
206 206 * Native processes are started with the native ld.so.1 as the command. This
207 207 * brand op is invoked by s10_npreload to fix up the command and arguments
208 208 * so that apps like pgrep or ps see the expected command strings.
209 209 */
210 210 int
211 211 s10_native(void *cmd, void *args)
212 212 {
213 213 struct user *up = PTOU(curproc);
214 214 char cmd_buf[MAXCOMLEN + 1];
215 215 char arg_buf[PSARGSZ];
216 216
217 217 if (copyin(cmd, &cmd_buf, sizeof (cmd_buf)) != 0)
218 218 return (EFAULT);
219 219 if (copyin(args, &arg_buf, sizeof (arg_buf)) != 0)
220 220 return (EFAULT);
221 221
222 222 /*
223 223 * Make sure that the process' interpreter is the native dynamic linker.
224 224 * Convention dictates that native processes executing within solaris10-
225 225 * branded zones are interpreted by the native dynamic linker (the
226 226 * process and its arguments are specified as arguments to the dynamic
227 227 * linker). If this convention is violated (i.e.,
228 228 * brandsys(B_S10_NATIVE, ...) is invoked by a process that shouldn't be
229 229 * native), then do nothing and silently indicate success.
230 230 */
231 231 if (strcmp(up->u_comm, S10_LINKER_NAME) != 0)
232 232 return (0);
233 233
234 234 /*
235 235 * The sizeof has an extra value for the trailing '\0' so this covers
236 236 * the appended " " in the following strcmps.
237 237 */
238 238 if (strncmp(up->u_psargs, BRAND_NATIVE_LINKER64 " ",
239 239 sizeof (BRAND_NATIVE_LINKER64)) != 0 &&
240 240 strncmp(up->u_psargs, BRAND_NATIVE_LINKER32 " ",
241 241 sizeof (BRAND_NATIVE_LINKER32)) != 0)
242 242 return (0);
243 243
244 244 mutex_enter(&curproc->p_lock);
245 245 (void) strlcpy(up->u_comm, cmd_buf, sizeof (up->u_comm));
246 246 (void) strlcpy(up->u_psargs, arg_buf, sizeof (up->u_psargs));
247 247 mutex_exit(&curproc->p_lock);
248 248
249 249 return (0);
250 250 }
251 251
252 252 /*ARGSUSED*/
253 253 int
254 254 s10_brandsys(int cmd, int64_t *rval, uintptr_t arg1, uintptr_t arg2,
255 255 uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6)
256 256 {
257 257 proc_t *p = curproc;
258 258 int res;
259 259
260 260 *rval = 0;
261 261
262 262 if (cmd == B_S10_NATIVE)
263 263 return (s10_native((void *)arg1, (void *)arg2));
264 264
265 265 res = brand_solaris_cmd(cmd, arg1, arg2, arg3, &s10_brand, S10_VERSION);
266 266 if (res >= 0)
267 267 return (res);
268 268
269 269 switch ((cmd)) {
270 270 case B_S10_PIDINFO:
271 271 /*
272 272 * The s10 brand needs to be able to get the pid of the
273 273 * current process and the pid of the zone's init, and it
274 274 * needs to do this on every process startup. Early in
275 275 * brand startup, we can't call getpid() because calls to
276 276 * getpid() represent a magical signal to some old-skool
277 277 * debuggers. By merging all of this into one call, we
278 278 * make this quite a bit cheaper and easier to handle in
279 279 * the brand module.
280 280 */
281 281 if (copyout(&p->p_pid, (void *)arg1, sizeof (pid_t)) != 0)
282 282 return (EFAULT);
283 283 if (copyout(&p->p_zone->zone_proc_initpid, (void *)arg2,
284 284 sizeof (pid_t)) != 0)
285 285 return (EFAULT);
286 286 return (0);
287 287
288 288 case B_S10_ISFDXATTRDIR: {
289 289 /*
290 290 * This subcommand enables the userland brand emulation library
291 291 * to determine whether a file descriptor refers to an extended
292 292 * file attributes directory. There is no standard syscall or
293 293 * libc function that can make such a determination.
294 294 */
295 295 file_t *dir_filep;
296 296
297 297 dir_filep = getf((int)arg1);
298 298 if (dir_filep == NULL)
299 299 return (EBADF);
300 300 ASSERT(dir_filep->f_vnode != NULL);
301 301 *rval = IS_XATTRDIR(dir_filep->f_vnode);
302 302 releasef((int)arg1);
303 303 return (0);
304 304 }
305 305
306 306 #ifdef __amd64
307 307 case B_S10_FSREGCORRECTION:
308 308 /*
309 309 * This subcommand exists so that the SYS_lwp_private and
310 310 * SYS_lwp_create syscalls can manually set the current thread's
311 311 * %fs register to the legacy S10 selector value for 64-bit x86
312 312 * processes.
313 313 */
314 314 s10_amd64_correct_fsreg(ttolwp(curthread));
315 315 return (0);
316 316 #endif /* __amd64 */
317 317 }
318 318
319 319 return (EINVAL);
320 320 }
321 321
322 322 void
323 323 s10_copy_procdata(proc_t *child, proc_t *parent)
324 324 {
325 325 brand_solaris_copy_procdata(child, parent, &s10_brand);
326 326 }
327 327
328 328 void
329 329 s10_proc_exit(struct proc *p, klwp_t *l)
330 330 {
331 331 brand_solaris_proc_exit(p, l, &s10_brand);
332 332 }
333 333
334 334 void
335 335 s10_exec()
336 336 {
337 337 brand_solaris_exec(&s10_brand);
338 338 }
339 339
340 340 int
341 341 s10_initlwp(klwp_t *l)
342 342 {
343 343 return (brand_solaris_initlwp(l, &s10_brand));
344 344 }
345 345
346 346 void
347 347 s10_forklwp(klwp_t *p, klwp_t *c)
348 348 {
349 349 brand_solaris_forklwp(p, c, &s10_brand);
350 350
351 351 #ifdef __amd64
352 352 /*
353 353 * Only correct the child's %fs register if the parent's %fs register
354 354 * is LWPFS_SEL. If the parent's %fs register is zero, then the Solaris
355 355 * 10 environment that we're emulating uses a version of libc that
356 356 * works when %fs is zero (i.e., it contains backports of CRs 6467491
357 357 * and 6501650).
358 358 */
359 359 if (p->lwp_pcb.pcb_fs == LWPFS_SEL)
360 360 s10_amd64_correct_fsreg(c);
361 361 #endif /* __amd64 */
362 362 }
363 363
364 364 void
365 365 s10_freelwp(klwp_t *l)
366 366 {
367 367 brand_solaris_freelwp(l, &s10_brand);
368 368 }
369 369
370 370 void
371 371 s10_lwpexit(klwp_t *l)
372 372 {
373 373 brand_solaris_lwpexit(l, &s10_brand);
374 374 }
375 375
376 376 void
377 377 s10_free_brand_data(zone_t *zone)
378 378 {
379 379 kmem_free(zone->zone_brand_data, sizeof (s10_zone_data_t));
380 380 }
381 381
382 382 void
383 383 s10_init_brand_data(zone_t *zone)
384 384 {
385 385 ASSERT(zone->zone_brand == &s10_brand);
386 386 ASSERT(zone->zone_brand_data == NULL);
387 387 zone->zone_brand_data = kmem_zalloc(sizeof (s10_zone_data_t), KM_SLEEP);
388 388 }
389 389
390 390 int
391 391 s10_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args, intpdata_t *idatap,
392 392 int level, long *execsz, int setid, caddr_t exec_file, cred_t *cred,
393 393 int brand_action)
394 394 {
395 395 return (brand_solaris_elfexec(vp, uap, args, idatap, level, execsz,
396 396 setid, exec_file, cred, brand_action, &s10_brand, S10_BRANDNAME,
397 397 S10_LIB, S10_LIB32, S10_LINKER, S10_LINKER32));
398 398 }
399 399
400 400 void
401 401 s10_sigset_native_to_s10(sigset_t *set)
402 402 {
403 403 int nativesig;
404 404 int s10sig;
405 405 sigset_t s10set;
406 406
407 407 /*
408 408 * Shortcut: we know the first 32 signals are the same in both
409 409 * s10 and native Solaris. Just assign the first word.
410 410 */
411 411 s10set.__sigbits[0] = set->__sigbits[0];
412 412 s10set.__sigbits[1] = 0;
413 413 s10set.__sigbits[2] = 0;
414 414 s10set.__sigbits[3] = 0;
415 415
416 416 /*
417 417 * Copy the remainder of the initial set of common signals.
418 418 */
419 419 for (nativesig = 33; nativesig < S10_SIGRTMIN; nativesig++)
420 420 if (sigismember(set, nativesig))
421 421 sigaddset(&s10set, nativesig);
422 422
423 423 /*
424 424 * Convert any native RT signals to their S10 values.
425 425 */
426 426 for (nativesig = _SIGRTMIN, s10sig = S10_SIGRTMIN;
427 427 nativesig <= _SIGRTMAX && s10sig <= S10_SIGRTMAX;
428 428 nativesig++, s10sig++) {
429 429 if (sigismember(set, nativesig))
430 430 sigaddset(&s10set, s10sig);
431 431 }
432 432
433 433 *set = s10set;
434 434 }
435 435
436 436 void
437 437 s10_sigset_s10_to_native(sigset_t *set)
438 438 {
439 439 int s10sig;
440 440 int nativesig;
441 441 sigset_t nativeset;
442 442
443 443 /*
444 444 * Shortcut: we know the first 32 signals are the same in both
445 445 * s10 and native Solaris. Just assign the first word.
446 446 */
447 447 nativeset.__sigbits[0] = set->__sigbits[0];
448 448 nativeset.__sigbits[1] = 0;
449 449 nativeset.__sigbits[2] = 0;
450 450 nativeset.__sigbits[3] = 0;
451 451
452 452 /*
453 453 * Copy the remainder of the initial set of common signals.
454 454 */
455 455 for (s10sig = 33; s10sig < S10_SIGRTMIN; s10sig++)
456 456 if (sigismember(set, s10sig))
457 457 sigaddset(&nativeset, s10sig);
458 458
459 459 /*
460 460 * Convert any S10 RT signals to their native values.
461 461 */
462 462 for (s10sig = S10_SIGRTMIN, nativesig = _SIGRTMIN;
463 463 s10sig <= S10_SIGRTMAX && nativesig <= _SIGRTMAX;
464 464 s10sig++, nativesig++) {
465 465 if (sigismember(set, s10sig))
466 466 sigaddset(&nativeset, nativesig);
467 467 }
468 468
469 469 *set = nativeset;
470 470 }
471 471
472 472 int
473 473 _init(void)
474 474 {
475 475 int err;
476 476
477 477 /*
478 478 * Set up the table indicating which system calls we want to
479 479 * interpose on. We should probably build this automatically from
480 480 * a list of system calls that is shared with the user-space
481 481 * library.
482 482 */
483 483 s10_emulation_table = kmem_zalloc(NSYSCALL, KM_SLEEP);
484 484 s10_emulation_table[S10_SYS_forkall] = 1; /* 2 */
485 485 s10_emulation_table[S10_SYS_open] = 1; /* 5 */
486 486 s10_emulation_table[S10_SYS_wait] = 1; /* 7 */
487 487 s10_emulation_table[S10_SYS_creat] = 1; /* 8 */
488 488 s10_emulation_table[S10_SYS_link] = 1; /* 9 */
489 489 s10_emulation_table[S10_SYS_unlink] = 1; /* 10 */
490 490 s10_emulation_table[S10_SYS_exec] = 1; /* 11 */
491 491 s10_emulation_table[S10_SYS_mknod] = 1; /* 14 */
492 492 s10_emulation_table[S10_SYS_chmod] = 1; /* 15 */
493 493 s10_emulation_table[S10_SYS_chown] = 1; /* 16 */
494 494 s10_emulation_table[S10_SYS_stat] = 1; /* 18 */
495 495 s10_emulation_table[S10_SYS_umount] = 1; /* 22 */
496 496 s10_emulation_table[S10_SYS_fstat] = 1; /* 28 */
497 497 s10_emulation_table[S10_SYS_utime] = 1; /* 30 */
498 498 s10_emulation_table[S10_SYS_access] = 1; /* 33 */
499 499 s10_emulation_table[SYS_kill] = 1; /* 37 */
500 500 s10_emulation_table[S10_SYS_dup] = 1; /* 41 */
501 501 s10_emulation_table[S10_SYS_pipe] = 1; /* 42 */
502 502 s10_emulation_table[SYS_ioctl] = 1; /* 54 */
503 503 s10_emulation_table[SYS_execve] = 1; /* 59 */
504 504 s10_emulation_table[SYS_acctctl] = 1; /* 71 */
505 505 s10_emulation_table[S10_SYS_issetugid] = 1; /* 75 */
506 506 s10_emulation_table[S10_SYS_fsat] = 1; /* 76 */
507 507 s10_emulation_table[S10_SYS_rmdir] = 1; /* 79 */
508 508 s10_emulation_table[S10_SYS_mkdir] = 1; /* 80 */
509 509 s10_emulation_table[SYS_getdents] = 1; /* 81 */
510 510 s10_emulation_table[S10_SYS_poll] = 1; /* 87 */
511 511 s10_emulation_table[S10_SYS_lstat] = 1; /* 88 */
512 512 s10_emulation_table[S10_SYS_symlink] = 1; /* 89 */
513 513 s10_emulation_table[S10_SYS_readlink] = 1; /* 90 */
514 514 s10_emulation_table[S10_SYS_fchmod] = 1; /* 93 */
515 515 s10_emulation_table[S10_SYS_fchown] = 1; /* 94 */
516 516 s10_emulation_table[SYS_sigprocmask] = 1; /* 95 */
517 517 s10_emulation_table[SYS_sigsuspend] = 1; /* 96 */
518 518 s10_emulation_table[SYS_sigaction] = 1; /* 98 */
519 519 s10_emulation_table[SYS_sigpending] = 1; /* 99 */
520 520 s10_emulation_table[SYS_waitid] = 1; /* 107 */
521 521 s10_emulation_table[SYS_sigsendsys] = 1; /* 108 */
522 522 #if defined(__x86)
523 523 s10_emulation_table[S10_SYS_xstat] = 1; /* 123 */
524 524 s10_emulation_table[S10_SYS_lxstat] = 1; /* 124 */
525 525 s10_emulation_table[S10_SYS_fxstat] = 1; /* 125 */
526 526 s10_emulation_table[S10_SYS_xmknod] = 1; /* 126 */
527 527 #endif
528 528 s10_emulation_table[S10_SYS_lchown] = 1; /* 130 */
529 529 s10_emulation_table[S10_SYS_rename] = 1; /* 134 */
530 530 s10_emulation_table[SYS_uname] = 1; /* 135 */
531 531 s10_emulation_table[SYS_sysconfig] = 1; /* 137 */
532 532 s10_emulation_table[SYS_systeminfo] = 1; /* 139 */
533 533 s10_emulation_table[S10_SYS_fork1] = 1; /* 143 */
534 534 s10_emulation_table[SYS_sigtimedwait] = 1; /* 144 */
535 535 s10_emulation_table[S10_SYS_lwp_sema_wait] = 1; /* 147 */
536 536 s10_emulation_table[S10_SYS_utimes] = 1; /* 154 */
537 537 s10_emulation_table[SYS_lwp_create] = 1; /* 159 */
538 538 s10_emulation_table[SYS_lwp_kill] = 1; /* 163 */
539 539 s10_emulation_table[SYS_lwp_sigmask] = 1; /* 165 */
540 540 #if defined(__amd64)
541 541 s10_emulation_table[SYS_lwp_private] = 1; /* 166 */
542 542 #endif /* __amd64 */
543 543 s10_emulation_table[S10_SYS_lwp_mutex_lock] = 1; /* 169 */
544 544 s10_emulation_table[SYS_pwrite] = 1; /* 174 */
545 545 s10_emulation_table[SYS_acl] = 1; /* 185 */
546 546 s10_emulation_table[SYS_auditsys] = 1; /* 186 */
547 547 s10_emulation_table[SYS_sigqueue] = 1; /* 190 */
548 548 s10_emulation_table[SYS_facl] = 1; /* 200 */
549 549 s10_emulation_table[SYS_signotify] = 1; /* 205 */
550 550 s10_emulation_table[SYS_lwp_mutex_timedlock] = 1; /* 210 */
551 551 s10_emulation_table[SYS_getdents64] = 1; /* 213 */
552 552 s10_emulation_table[S10_SYS_stat64] = 1; /* 215 */
553 553 s10_emulation_table[S10_SYS_lstat64] = 1; /* 216 */
554 554 s10_emulation_table[S10_SYS_fstat64] = 1; /* 217 */
555 555 s10_emulation_table[SYS_pwrite64] = 1; /* 223 */
556 556 s10_emulation_table[S10_SYS_creat64] = 1; /* 224 */
557 557 s10_emulation_table[S10_SYS_open64] = 1; /* 225 */
558 558 s10_emulation_table[SYS_zone] = 1; /* 227 */
559 559 s10_emulation_table[S10_SYS_so_socket] = 1; /* 230 */
560 560 s10_emulation_table[S10_SYS_accept] = 1; /* 234 */
561 561 s10_emulation_table[SYS_lwp_mutex_trylock] = 1; /* 251 */
562 562
563 563 err = mod_install(&modlinkage);
564 564 if (err) {
565 565 cmn_err(CE_WARN, "Couldn't install brand module");
566 566 kmem_free(s10_emulation_table, NSYSCALL);
567 567 }
568 568
569 569 return (err);
570 570 }
571 571
572 572 int
573 573 _info(struct modinfo *modinfop)
574 574 {
575 575 return (mod_info(&modlinkage, modinfop));
576 576 }
577 577
578 578 int
579 579 _fini(void)
580 580 {
581 581 return (brand_solaris_fini(&s10_emulation_table, &modlinkage,
582 582 &s10_brand));
583 583 }
↓ open down ↓ |
440 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX