1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #include <errno.h> 27 #include <stdio.h> 28 #include <stdlib.h> 29 #include <strings.h> 30 #include <unistd.h> 31 #include <sys/auxv.h> 32 #include <sys/bitmap.h> 33 #include <sys/brand.h> 34 #include <sys/inttypes.h> 35 #include <sys/lwp.h> 36 #include <sys/syscall.h> 37 #include <sys/systm.h> 38 #include <sys/utsname.h> 39 40 #include <sn1_brand.h> 41 #include <sn1_misc.h> 42 43 /* 44 * Principles of emulation 101. 45 * 46 * 47 * *** Setting errno 48 * 49 * Just don't do it. This emulation library is loaded onto a 50 * seperate link map from the application who's address space we're 51 * running in. We have our own private copy of libc, so there for, 52 * the errno value accessible from here is is also private and changing 53 * it will not affect any errno value that the processes who's address 54 * space we are running in will see. To return an error condition we 55 * should return the negated errno value we'd like the system to return. 56 * For more information about this see the comment in sn1_handler(). 57 * Basically, when we return to the caller that initiated the system 58 * call it's their responsibility to set errno. 59 * 60 * 61 * *** Recursion Considerations 62 * 63 * When emulating system calls we need to be very careful about what 64 * library calls we invoke. Library calls should be kept to a minimum. 65 * One issue is that library calls can invoke system calls, so if we're 66 * emulating a system call and we invoke a library call that depends on 67 * that system call we will probably enter a recursive loop, which would 68 * be bad. 69 * 70 * 71 * *** Return Values. 72 * 73 * When declaring new syscall emulation functions, it is very important 74 * to to set the proper RV_* flags in the sn1_sysent_table. Upon failure, 75 * syscall emulation fuctions should return an errno value. Upon success 76 * syscall emulation functions should return 0 and set the sysret_t return 77 * value parameters accordingly. 78 * 79 * 80 * *** Agent lwp considerations 81 * 82 * It is currently impossible to do any emulation for these system call 83 * when they are being invoked on behalf of an agent lwp. To understand why 84 * it's impossible you have to understand how agent lwp syscalls work. 85 * 86 * The agent lwp syscall process works as follows: 87 * 1 The controlling process stops the target. 88 * 2 The controlling process injects an agent lwp which is also stopped. 89 * This agent lwp assumes the userland stack and register values 90 * of another stopped lwp in the current process. 91 * 3 The controlling process configures the agent lwp to start 92 * executing the requested system call. 93 * 4 The controlling process configure /proc to stop the agent lwp when 94 * it enters the requested system call. 95 * 5 The controlling processes allows the agent lwp to start executing. 96 * 6 The agent lwp traps into the kernel to perform the requested system 97 * call and immediately stop. 98 * 7 The controlling process copies all the arguments for the requested 99 * system call onto the agent lwp's stack. 100 * 8 The controlling process configures /proc to stop the agent lwp 101 * when it completes the requested system call. 102 * 9 The controlling processes allows the agent lwp to start executing. 103 * 10 The agent lwp executes the system call and then stop before returning 104 * to userland. 105 * 11 The controlling process copies the return value and return arguments 106 * back from the agent lwps stack. 107 * 12 The controlling process destroys the agent lwp and restarts 108 * the target process. 109 * 110 * The fundamental problem is that when the agent executes the request 111 * system call in step 5, if we're emulating that system call then the 112 * lwp is redirected back to our emulation layer without blocking 113 * in the kernel. But our emulation layer can't access the arguments 114 * for the system call because they haven't been copied to the stack 115 * yet and they still only exist in the controlling processes address 116 * space. This prevents us from being able to do any emulation of 117 * agent lwp system calls. Hence, currently our brand trap interposition 118 * callback (sn1_brand_syscall_callback_common) will detect if a system 119 * call is being made by an agent lwp, and if this is the case it will 120 * never redirect the system call to this emulation library. 121 * 122 * In the future, if this proves to be a problem the the easiest solution 123 * would probably be to replace the branded versions of these application 124 * with their native counterparts. Ie, truss, plimit, and pfiles could be 125 * replace with wrapper scripts that execute the native versions of these 126 * applications. In the case of plimit and pfiles this should be pretty 127 * strait forward. Truss would probably be more tricky since it can 128 * execute applications which would be branded applications, so in that 129 * case it might be necessary to create a loadable library which could 130 * be LD_PRELOADed into truss and this library would interpose on the 131 * exec() system call to allow truss to correctly execute branded 132 * processes. It should be pointed out that this solution could work 133 * because "native agent lwps" (ie, agent lwps created by native 134 * processes) can be treated differently from "branded aged lwps" (ie, 135 * agent lwps created by branded processes), since native agent lwps 136 * would presumably be making native system calls and hence not need 137 * any interposition. 138 * 139 * 140 * *** sn1 brand emulation scope considerations 141 * 142 * One of the differences between the lx brand and the s8 and s9 143 * brands, is that the s8 and s9 brands only interpose on syscalls 144 * that need some kind of emulation, where as the lx brand interposes 145 * on _all_ system calls. Lx branded system calls that don't need 146 * any emulation are then redirected back to the kernel from the 147 * userland library via the IN_KERNEL_SYSCALL macro. The lx-syscall 148 * dtrace provider depends on this behavior. 149 * 150 * Given that the sn1 brand exists for testing purposes, it should 151 * eventually be enhanced to redirect all system calls through the 152 * brand emulation library. This will ensure the maximum testing 153 * exposure for the brandz infrastructure. Some other options to 154 * consider for improving brandz test exposure are: 155 * - Folding the sn1 brand into the native brand and only enabling 156 * it on DEBUG builds. 157 * - Modifying the zones test suite to use sn1 branded zones by default, 158 * any adapting functional test harnesses to use sn1 branded zones 159 * by default instead of native zones. 160 */ 161 162 #define EMULATE(cb, args) { (sysent_cb_t)(cb), (args) } 163 #define NOSYS EMULATE(sn1_unimpl, (0 | RV_DEFAULT)) 164 165 typedef long (*sysent_cb_t)(); 166 typedef struct sn1_sysent_table { 167 sysent_cb_t st_callc; 168 uintptr_t st_args; 169 } sn1_sysent_table_t; 170 sn1_sysent_table_t sn1_sysent_table[]; 171 172 /*LINTED: static unused*/ 173 static volatile int sn1_abort_err; 174 /*LINTED: static unused*/ 175 static volatile const char *sn1_abort_msg; 176 /*LINTED: static unused*/ 177 static volatile const char *sn1_abort_file; 178 /*LINTED: static unused*/ 179 static volatile int sn1_abort_line; 180 181 extern int errno; 182 183 /*ARGSUSED*/ 184 void 185 _sn1_abort(int err, const char *msg, const char *file, int line) 186 { 187 sysret_t rval; 188 189 /* Save the error message into convenient globals */ 190 sn1_abort_err = err; 191 sn1_abort_msg = msg; 192 sn1_abort_file = file; 193 sn1_abort_line = line; 194 195 /* kill ourselves */ 196 abort(); 197 198 /* If abort() didn't work, try something stronger. */ 199 (void) __systemcall(&rval, SYS_lwp_kill + 1024, _lwp_self(), SIGKILL); 200 } 201 202 /* 203 * This function is defined to be NOSYS but it won't be called from the 204 * the kernel since the NOSYS system calls are not enabled in the kernel. 205 * Thus, the only time this function is called is directly from within the 206 * indirect system call path. 207 */ 208 /*ARGSUSED*/ 209 static long 210 sn1_unimpl(sysret_t *rv, uintptr_t p1) 211 { 212 sysret_t rval; 213 214 /* 215 * We'd like to print out some kind of error message here like 216 * "unsupported syscall", but we can't because it's not safe to 217 * assume that stderr or STDERR_FILENO actually points to something 218 * that is a terminal, and if we wrote to those files we could 219 * inadvertantly write to some applications open files, which would 220 * be bad. 221 * 222 * Normally, if an application calls an invalid system call 223 * it get a SIGSYS sent to it. So we'll just go ahead and send 224 * ourselves a signal here. Note that this is far from ideal since 225 * if the application has registered a signal handler, that signal 226 * handler may recieve a ucontext_t as the third parameter to 227 * indicate the context of the process when the signal was 228 * generated, and in this case that context will not be what the 229 * application is expecting. Hence, we should probably create a 230 * brandsys() kernel function that can deliver the signal to us 231 * with the correct ucontext_t. 232 */ 233 (void) __systemcall(&rval, SYS_lwp_kill + 1024, _lwp_self(), SIGSYS); 234 return (ENOSYS); 235 } 236 237 #if defined(__sparc) && !defined(__sparcv9) 238 /* 239 * Yuck. For 32-bit sparc applications, handle indirect system calls. 240 * Note that we declare this interface to use the maximum number of 241 * system call arguments. If we recieve a system call that uses less 242 * arguments, then the additional arguments will be garbage, but they 243 * will also be ignored so that should be ok. 244 */ 245 static long 246 sn1_indir(sysret_t *rv, int code, 247 uintptr_t a0, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, 248 uintptr_t a5, uintptr_t a6, uintptr_t a7) 249 { 250 sn1_sysent_table_t *sst = &(sn1_sysent_table[code]); 251 252 sn1_assert(code < NSYSCALL); 253 switch (sst->st_args & NARGS_MASK) { 254 case 0: 255 return ((sst->st_callc)(rv)); 256 case 1: 257 return ((sst->st_callc)(rv, a0)); 258 case 2: 259 return ((sst->st_callc)(rv, a0, a1)); 260 case 3: 261 return ((sst->st_callc)(rv, a0, a1, a2)); 262 case 4: 263 return ((sst->st_callc)(rv, a0, a1, a2, a3)); 264 case 5: 265 return ((sst->st_callc)(rv, a0, a1, a2, a3, a4)); 266 case 6: 267 return ((sst->st_callc)(rv, rv, a0, a1, a2, a3, a4, a5)); 268 case 7: 269 return ((sst->st_callc)(rv, a0, a1, a2, a3, a4, a5, a6)); 270 case 8: 271 return ((sst->st_callc)(rv, a0, a1, a2, a3, a4, a5, a6, a7)); 272 } 273 sn1_abort(0, "invalid entry in sn1_sysent_table"); 274 return (EINVAL); 275 } 276 #endif /* __sparc && !__sparcv9 */ 277 278 static long 279 sn1_uname(sysret_t *rv, uintptr_t p1) 280 { 281 struct utsname un, *unp = (struct utsname *)p1; 282 int rev, err; 283 284 if ((err = __systemcall(rv, SYS_uname + 1024, &un)) != 0) 285 return (err); 286 287 rev = atoi(&un.release[2]); 288 sn1_assert(rev >= 10); 289 (void) sprintf(un.release, "5.%d", rev - 1); 290 291 if (uucopy(&un, unp, sizeof (un)) != 0) 292 return (EFAULT); 293 return (0); 294 } 295 296 /* 297 * Close a libc file handle, but don't actually close the underlying 298 * file descriptor. 299 */ 300 static void 301 sn1_close_fh(FILE *file) 302 { 303 int fd, fd_new; 304 305 if (file == NULL) 306 return; 307 308 if ((fd = fileno(file)) < 0) 309 return; 310 311 fd_new = dup(fd); 312 if (fd_new == -1) 313 return; 314 315 (void) fclose(file); 316 (void) dup2(fd_new, fd); 317 (void) close(fd_new); 318 } 319 320 /*ARGSUSED*/ 321 int 322 sn1_init(int argc, char *argv[], char *envp[]) 323 { 324 sysret_t rval; 325 sn1_brand_reg_t reg; 326 sn1_elf_data_t sed; 327 auxv_t *ap; 328 uintptr_t *p; 329 int i, err; 330 331 /* Sanity check our translation table return value codes */ 332 for (i = 0; i < NSYSCALL; i++) { 333 sn1_sysent_table_t *est = &(sn1_sysent_table[i]); 334 sn1_assert(BIT_ONLYONESET(est->st_args & RV_MASK)); 335 } 336 337 /* 338 * We need to shutdown all libc stdio. libc stdio normally goes to 339 * file descriptors, but since we're actually part of a another 340 * process we don't own these file descriptors and we can't make 341 * any assumptions about their state. 342 */ 343 sn1_close_fh(stdin); 344 sn1_close_fh(stdout); 345 sn1_close_fh(stderr); 346 347 /* 348 * Register our syscall emulation table with the kernel. 349 * Note that we don't have to do invoke (syscall_number + 1024) 350 * until we've actually establised a syscall emulation callback 351 * handler address, which is what we're doing with this brand 352 * syscall. 353 */ 354 reg.sbr_version = SN1_VERSION; 355 reg.sbr_handler = (caddr_t)sn1_handler; 356 if ((err = __systemcall(&rval, SYS_brand, B_REGISTER, ®)) != 0) { 357 sn1_abort(err, "Failed to brand current process"); 358 /*NOTREACHED*/ 359 } 360 361 /* Get data about the executable we're running from the kernel. */ 362 if ((err = __systemcall(&rval, SYS_brand + 1024, 363 B_ELFDATA, (void *)&sed)) != 0) { 364 sn1_abort(err, 365 "Failed to get required brand ELF data from the kernel"); 366 /*NOTREACHED*/ 367 } 368 369 /* 370 * Find the aux vector on the stack. 371 */ 372 p = (uintptr_t *)envp; 373 while (*p != NULL) 374 p++; 375 376 /* 377 * p is now pointing at the 0 word after the environ pointers. 378 * After that is the aux vectors. 379 * 380 * The aux vectors are currently pointing to the brand emulation 381 * library and associated linker. We're going to change them to 382 * point to the brand executable and associated linker (or to no 383 * linker for static binaries). This matches the process data 384 * stored within the kernel and visible from /proc, which was 385 * all setup in sn1_elfexec(). We do this so that when a debugger 386 * attaches to the process it sees the process as a normal solaris 387 * process, this brand emulation library and everything on it's 388 * link map will not be visible, unless our librtld_db plugin 389 * is used. Note that this is very different from how Linux 390 * branded processes are implemented within lx branded zones. 391 * In that situation, the primary linkmap of the process is the 392 * brand emulation libraries linkmap, not the Linux applications 393 * linkmap. 394 * 395 * We also need to clear the AF_SUN_NOPLM flag from the AT_SUN_AUXFLAGS 396 * aux vector. This flag told our linker that we don't have a 397 * primary link map. Now that our linker is done initializing, we 398 * want to clear this flag before we transfer control to the 399 * applications copy of the linker, since we want that linker to have 400 * a primary link map which will be the link map for the application 401 * we're running. 402 */ 403 p++; 404 for (ap = (auxv_t *)p; ap->a_type != AT_NULL; ap++) { 405 switch (ap->a_type) { 406 case AT_BASE: 407 /* Hide AT_BASE if static binary */ 408 if (sed.sed_base == NULL) { 409 ap->a_type = AT_IGNORE; 410 ap->a_un.a_val = NULL; 411 } else { 412 ap->a_un.a_val = sed.sed_base; 413 } 414 break; 415 case AT_ENTRY: 416 ap->a_un.a_val = sed.sed_entry; 417 break; 418 case AT_PHDR: 419 ap->a_un.a_val = sed.sed_phdr; 420 break; 421 case AT_PHENT: 422 ap->a_un.a_val = sed.sed_phent; 423 break; 424 case AT_PHNUM: 425 ap->a_un.a_val = sed.sed_phnum; 426 break; 427 case AT_SUN_AUXFLAGS: 428 ap->a_un.a_val &= ~AF_SUN_NOPLM; 429 break; 430 case AT_SUN_EMULATOR: 431 /* 432 * ld.so.1 inspects AT_SUN_EMULATOR to see if 433 * if it is the linker for the brand emulation 434 * library. Hide AT_SUN_EMULATOR, as the 435 * linker we are about to jump to is the linker 436 * for the binary. 437 */ 438 ap->a_type = AT_IGNORE; 439 ap->a_un.a_val = NULL; 440 break; 441 case AT_SUN_LDDATA: 442 /* Hide AT_SUN_LDDATA if static binary */ 443 if (sed.sed_lddata == NULL) { 444 ap->a_type = AT_IGNORE; 445 ap->a_un.a_val = NULL; 446 } else { 447 ap->a_un.a_val = sed.sed_lddata; 448 } 449 break; 450 default: 451 break; 452 } 453 } 454 455 sn1_runexe(argv, sed.sed_ldentry); 456 /*NOTREACHED*/ 457 sn1_abort(0, "sn1_runexe() returned"); 458 return (-1); 459 } 460 461 #define IN_KERNEL_SYSCALL(name, num) \ 462 static long \ 463 sn1_##name(sysret_t *rv, \ 464 uintptr_t a0, uintptr_t a1, uintptr_t a2, uintptr_t a3, \ 465 uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7) \ 466 { \ 467 return (__systemcall(rv, num + 1024, \ 468 a0, a1, a2, a3, a4, a5, a6, a7)); \ 469 } 470 471 /* 472 * These are branded system calls, which have been redirected to this 473 * userland emulation library, and are emulated by passing them strait 474 * on to the kernel as native system calls. 475 */ 476 IN_KERNEL_SYSCALL(read, SYS_read) /* 3 */ 477 IN_KERNEL_SYSCALL(write, SYS_write) /* 4 */ 478 IN_KERNEL_SYSCALL(wait, SYS_wait) /* 7 */ 479 IN_KERNEL_SYSCALL(time, SYS_time) /* 13 */ 480 IN_KERNEL_SYSCALL(getpid, SYS_getpid) /* 20 */ 481 IN_KERNEL_SYSCALL(mount, SYS_mount) /* 21 */ 482 IN_KERNEL_SYSCALL(getuid, SYS_getuid) /* 24 */ 483 IN_KERNEL_SYSCALL(times, SYS_times) /* 43 */ 484 IN_KERNEL_SYSCALL(getgid, SYS_getgid) /* 47 */ 485 IN_KERNEL_SYSCALL(utssys, SYS_utssys) /* 57 */ 486 IN_KERNEL_SYSCALL(readlink, SYS_readlink) /* 90 */ 487 488 /* 489 * This table must have at least NSYSCALL entries in it. 490 * 491 * The second parameter of each entry in the sn1_sysent_table 492 * contains the number of parameters and flags that describe the 493 * syscall return value encoding. See the block comments at the 494 * top of this file for more information about the syscall return 495 * value flags and when they should be used. 496 */ 497 sn1_sysent_table_t sn1_sysent_table[] = { 498 #if defined(__sparc) && !defined(__sparcv9) 499 EMULATE(sn1_indir, 9 | RV_64RVAL), /* 0 */ 500 #else /* !__sparc || __sparcv9 */ 501 NOSYS, /* 0 */ 502 #endif /* !__sparc || __sparcv9 */ 503 NOSYS, /* 1 */ 504 NOSYS, /* 2 */ 505 EMULATE(sn1_read, 3 | RV_DEFAULT), /* 3 */ 506 EMULATE(sn1_write, 3 | RV_DEFAULT), /* 4 */ 507 NOSYS, /* 5 */ 508 NOSYS, /* 6 */ 509 EMULATE(sn1_wait, 0 | RV_32RVAL2), /* 7 */ 510 NOSYS, /* 8 */ 511 NOSYS, /* 9 */ 512 NOSYS, /* 10 */ 513 NOSYS, /* 11 */ 514 NOSYS, /* 12 */ 515 EMULATE(sn1_time, 0 | RV_DEFAULT), /* 13 */ 516 NOSYS, /* 14 */ 517 NOSYS, /* 15 */ 518 NOSYS, /* 16 */ 519 NOSYS, /* 17 */ 520 NOSYS, /* 18 */ 521 NOSYS, /* 19 */ 522 EMULATE(sn1_getpid, 0 | RV_32RVAL2), /* 20 */ 523 EMULATE(sn1_mount, 8 | RV_DEFAULT), /* 21 */ 524 NOSYS, /* 22 */ 525 NOSYS, /* 23 */ 526 EMULATE(sn1_getuid, 0 | RV_32RVAL2), /* 24 */ 527 NOSYS, /* 25 */ 528 NOSYS, /* 26 */ 529 NOSYS, /* 27 */ 530 NOSYS, /* 28 */ 531 NOSYS, /* 29 */ 532 NOSYS, /* 30 */ 533 NOSYS, /* 31 */ 534 NOSYS, /* 32 */ 535 NOSYS, /* 33 */ 536 NOSYS, /* 34 */ 537 NOSYS, /* 35 */ 538 NOSYS, /* 36 */ 539 NOSYS, /* 37 */ 540 NOSYS, /* 38 */ 541 NOSYS, /* 39 */ 542 NOSYS, /* 40 */ 543 NOSYS, /* 41 */ 544 NOSYS, /* 42 */ 545 EMULATE(sn1_times, 1 | RV_DEFAULT), /* 43 */ 546 NOSYS, /* 44 */ 547 NOSYS, /* 45 */ 548 NOSYS, /* 46 */ 549 EMULATE(sn1_getgid, 0 | RV_32RVAL2), /* 47 */ 550 NOSYS, /* 48 */ 551 NOSYS, /* 49 */ 552 NOSYS, /* 50 */ 553 NOSYS, /* 51 */ 554 NOSYS, /* 52 */ 555 NOSYS, /* 53 */ 556 NOSYS, /* 54 */ 557 NOSYS, /* 55 */ 558 NOSYS, /* 56 */ 559 EMULATE(sn1_utssys, 4 | RV_32RVAL2), /* 57 */ 560 NOSYS, /* 58 */ 561 NOSYS, /* 59 */ 562 NOSYS, /* 60 */ 563 NOSYS, /* 61 */ 564 NOSYS, /* 62 */ 565 NOSYS, /* 63 */ 566 NOSYS, /* 64 */ 567 NOSYS, /* 65 */ 568 NOSYS, /* 66 */ 569 NOSYS, /* 67 */ 570 NOSYS, /* 68 */ 571 NOSYS, /* 69 */ 572 NOSYS, /* 70 */ 573 NOSYS, /* 71 */ 574 NOSYS, /* 72 */ 575 NOSYS, /* 73 */ 576 NOSYS, /* 74 */ 577 NOSYS, /* 75 */ 578 NOSYS, /* 76 */ 579 NOSYS, /* 77 */ 580 NOSYS, /* 78 */ 581 NOSYS, /* 79 */ 582 NOSYS, /* 80 */ 583 NOSYS, /* 81 */ 584 NOSYS, /* 82 */ 585 NOSYS, /* 83 */ 586 NOSYS, /* 84 */ 587 NOSYS, /* 85 */ 588 NOSYS, /* 86 */ 589 NOSYS, /* 87 */ 590 NOSYS, /* 88 */ 591 NOSYS, /* 89 */ 592 EMULATE(sn1_readlink, 3 | RV_DEFAULT), /* 90 */ 593 NOSYS, /* 91 */ 594 NOSYS, /* 92 */ 595 NOSYS, /* 93 */ 596 NOSYS, /* 94 */ 597 NOSYS, /* 95 */ 598 NOSYS, /* 96 */ 599 NOSYS, /* 97 */ 600 NOSYS, /* 98 */ 601 NOSYS, /* 99 */ 602 NOSYS, /* 100 */ 603 NOSYS, /* 101 */ 604 NOSYS, /* 102 */ 605 NOSYS, /* 103 */ 606 NOSYS, /* 104 */ 607 NOSYS, /* 105 */ 608 NOSYS, /* 106 */ 609 NOSYS, /* 107 */ 610 NOSYS, /* 108 */ 611 NOSYS, /* 109 */ 612 NOSYS, /* 110 */ 613 NOSYS, /* 111 */ 614 NOSYS, /* 112 */ 615 NOSYS, /* 113 */ 616 NOSYS, /* 114 */ 617 NOSYS, /* 115 */ 618 NOSYS, /* 116 */ 619 NOSYS, /* 117 */ 620 NOSYS, /* 118 */ 621 NOSYS, /* 119 */ 622 NOSYS, /* 120 */ 623 NOSYS, /* 121 */ 624 NOSYS, /* 122 */ 625 NOSYS, /* 123 */ 626 NOSYS, /* 124 */ 627 NOSYS, /* 125 */ 628 NOSYS, /* 126 */ 629 NOSYS, /* 127 */ 630 NOSYS, /* 128 */ 631 NOSYS, /* 129 */ 632 NOSYS, /* 130 */ 633 NOSYS, /* 131 */ 634 NOSYS, /* 132 */ 635 NOSYS, /* 133 */ 636 NOSYS, /* 134 */ 637 EMULATE(sn1_uname, 1 | RV_DEFAULT), /* 135 */ 638 NOSYS, /* 136 */ 639 NOSYS, /* 137 */ 640 NOSYS, /* 138 */ 641 NOSYS, /* 139 */ 642 NOSYS, /* 140 */ 643 NOSYS, /* 141 */ 644 NOSYS, /* 142 */ 645 NOSYS, /* 143 */ 646 NOSYS, /* 144 */ 647 NOSYS, /* 145 */ 648 NOSYS, /* 146 */ 649 NOSYS, /* 147 */ 650 NOSYS, /* 148 */ 651 NOSYS, /* 149 */ 652 NOSYS, /* 150 */ 653 NOSYS, /* 151 */ 654 NOSYS, /* 152 */ 655 NOSYS, /* 153 */ 656 NOSYS, /* 154 */ 657 NOSYS, /* 155 */ 658 NOSYS, /* 156 */ 659 NOSYS, /* 157 */ 660 NOSYS, /* 158 */ 661 NOSYS, /* 159 */ 662 NOSYS, /* 160 */ 663 NOSYS, /* 161 */ 664 NOSYS, /* 162 */ 665 NOSYS, /* 163 */ 666 NOSYS, /* 164 */ 667 NOSYS, /* 165 */ 668 NOSYS, /* 166 */ 669 NOSYS, /* 167 */ 670 NOSYS, /* 168 */ 671 NOSYS, /* 169 */ 672 NOSYS, /* 170 */ 673 NOSYS, /* 171 */ 674 NOSYS, /* 172 */ 675 NOSYS, /* 173 */ 676 NOSYS, /* 174 */ 677 NOSYS, /* 175 */ 678 NOSYS, /* 176 */ 679 NOSYS, /* 177 */ 680 NOSYS, /* 178 */ 681 NOSYS, /* 179 */ 682 NOSYS, /* 180 */ 683 NOSYS, /* 181 */ 684 NOSYS, /* 182 */ 685 NOSYS, /* 183 */ 686 NOSYS, /* 184 */ 687 NOSYS, /* 185 */ 688 NOSYS, /* 186 */ 689 NOSYS, /* 187 */ 690 NOSYS, /* 188 */ 691 NOSYS, /* 189 */ 692 NOSYS, /* 190 */ 693 NOSYS, /* 191 */ 694 NOSYS, /* 192 */ 695 NOSYS, /* 193 */ 696 NOSYS, /* 194 */ 697 NOSYS, /* 195 */ 698 NOSYS, /* 196 */ 699 NOSYS, /* 197 */ 700 NOSYS, /* 198 */ 701 NOSYS, /* 199 */ 702 NOSYS, /* 200 */ 703 NOSYS, /* 201 */ 704 NOSYS, /* 202 */ 705 NOSYS, /* 203 */ 706 NOSYS, /* 204 */ 707 NOSYS, /* 205 */ 708 NOSYS, /* 206 */ 709 NOSYS, /* 207 */ 710 NOSYS, /* 208 */ 711 NOSYS, /* 209 */ 712 NOSYS, /* 210 */ 713 NOSYS, /* 211 */ 714 NOSYS, /* 212 */ 715 NOSYS, /* 213 */ 716 NOSYS, /* 214 */ 717 NOSYS, /* 215 */ 718 NOSYS, /* 216 */ 719 NOSYS, /* 217 */ 720 NOSYS, /* 218 */ 721 NOSYS, /* 219 */ 722 NOSYS, /* 220 */ 723 NOSYS, /* 221 */ 724 NOSYS, /* 222 */ 725 NOSYS, /* 223 */ 726 NOSYS, /* 224 */ 727 NOSYS, /* 225 */ 728 NOSYS, /* 226 */ 729 NOSYS, /* 227 */ 730 NOSYS, /* 228 */ 731 NOSYS, /* 229 */ 732 NOSYS, /* 230 */ 733 NOSYS, /* 231 */ 734 NOSYS, /* 232 */ 735 NOSYS, /* 233 */ 736 NOSYS, /* 234 */ 737 NOSYS, /* 235 */ 738 NOSYS, /* 236 */ 739 NOSYS, /* 237 */ 740 NOSYS, /* 238 */ 741 NOSYS, /* 239 */ 742 NOSYS, /* 240 */ 743 NOSYS, /* 241 */ 744 NOSYS, /* 242 */ 745 NOSYS, /* 243 */ 746 NOSYS, /* 244 */ 747 NOSYS, /* 245 */ 748 NOSYS, /* 246 */ 749 NOSYS, /* 247 */ 750 NOSYS, /* 248 */ 751 NOSYS, /* 249 */ 752 NOSYS, /* 250 */ 753 NOSYS, /* 251 */ 754 NOSYS, /* 252 */ 755 NOSYS, /* 253 */ 756 NOSYS, /* 254 */ 757 NOSYS /* 255 */ 758 }; 759