Print this page
3882 remove xmod & friends

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/sysent.c
          +++ new/usr/src/uts/common/os/sysent.c
↓ open down ↓ 11 lines elided ↑ open up ↑
  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      -/* ONC_PLUS EXTRACT START */
  23      -
  24   22  /*
  25   23   * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  26   24   * Copyright 2012 Milan Jurik. All rights reserved.
  27   25   * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  28   26   */
  29   27  
  30   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  31   29  /*        All Rights Reserved   */
  32   30  
  33      -/* ONC_PLUS EXTRACT END */
  34      -
  35   31  #include <sys/param.h>
  36   32  #include <sys/types.h>
  37   33  #include <sys/systm.h>
  38   34  #include <sys/systrace.h>
  39   35  #include <sys/procfs.h>
  40   36  #include <sys/mman.h>
  41   37  #include <sys/int_types.h>
  42   38  #include <c2/audit.h>
  43   39  #include <sys/stat.h>
  44   40  #include <sys/times.h>
↓ open down ↓ 1 lines elided ↑ open up ↑
  46   42  #include <sys/stropts.h>
  47   43  #include <sys/statvfs.h>
  48   44  #include <sys/utsname.h>
  49   45  #include <sys/timex.h>
  50   46  #include <sys/socket.h>
  51   47  #include <sys/sendfile.h>
  52   48  
  53   49  struct hrtsysa;
  54   50  struct mmaplf32a;
  55   51  
  56      -/* ONC_PLUS EXTRACT START */
  57   52  /*
  58   53   * This table is the switch used to transfer to the appropriate
  59   54   * routine for processing a system call.  Each row contains the
  60   55   * number of arguments expected, a switch that tells systrap()
  61   56   * in trap.c whether a setjmp() is not necessary, and a pointer
  62   57   * to the routine.
  63   58   */
  64      -/* ONC_PLUS EXTRACT END */
  65   59  
  66   60  int     access(char *, int);
  67   61  int     alarm(int);
  68   62  int     auditsys(struct auditcalls *, rval_t *);
  69   63  int64_t brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t,
  70   64      uintptr_t);
  71   65  int     brk(caddr_t);
  72   66  int     chdir(char *);
  73   67  int     chmod(char *, int);
  74   68  int     chown(char *, uid_t, gid_t);
↓ open down ↓ 340 lines elided ↑ open up ↑
 415  409   * e.g. read(2) returns 'ssize_t' in the kernel and in userland.
 416  410   */
 417  411  #define SYSENT_CL(name, call, narg)     \
 418  412          IF_LP64(SYSENT_C(name, call, narg), SYSENT_CI(name, call, narg))
 419  413  
 420  414  /*
 421  415   * Initialization macro for loadable native system calls.
 422  416   */
 423  417  #define SYSENT_LOADABLE()       \
 424  418          { 0, SE_LOADABLE, (int (*)())nosys, NULL, loadable_syscall }
 425      -/* ONC_PLUS EXTRACT END */
 426  419  
 427  420  /*
 428  421   * Initialization macro for loadable 32-bit compatibility system calls.
 429  422   */
 430  423  #define SYSENT_LOADABLE32()     SYSENT_LOADABLE()
 431  424  
 432  425  #define SYSENT_NOSYS()          SYSENT_C("nosys", nosys, 0)
 433  426  
 434  427  struct sysent nosys_ent = SYSENT_NOSYS();
 435  428  
 436      -/* ONC_PLUS EXTRACT START */
 437  429  /*
 438  430   * Native sysent table.
 439  431   */
 440  432  struct sysent sysent[NSYSCALL] =
 441  433  {
 442      -/* ONC_PLUS EXTRACT END */
 443  434          /*  0 */ IF_LP64(
 444  435                          SYSENT_NOSYS(),
 445  436                          SYSENT_C("indir",       indir,          1)),
 446  437          /*  1 */ SYSENT_CI("exit",              rexit,          1),
 447  438          /*  2 */ SYSENT_LOADABLE(),                     /* (was forkall) */
 448  439          /*  3 */ SYSENT_CL("read",              read,           3),
 449  440          /*  4 */ SYSENT_CL("write",             write,          3),
 450  441          /*  5 */ SYSENT_CI("open",              open,           3),
 451  442          /*  6 */ SYSENT_CI("close",             close,          1),
 452  443          /*  7 */ SYSENT_CI("linkat",            linkat,         5),
↓ open down ↓ 104 lines elided ↑ open up ↑
 557  548          /* 96 */ SYSENT_CI("sigsuspend",        sigsuspend,     1),
 558  549          /* 97 */ SYSENT_CI("sigaltstack",       sigaltstack,    2),
 559  550          /* 98 */ SYSENT_CI("sigaction",         sigaction,      3),
 560  551          /* 99 */ SYSENT_CI("sigpending",        sigpending,     2),
 561  552          /* 100 */ SYSENT_CI("getsetcontext",    getsetcontext,  2),
 562  553          /* 101 */ SYSENT_CI("fchmodat",         fchmodat,       4),
 563  554          /* 102 */ SYSENT_CI("mkdirat",          mkdirat,        3),
 564  555          /* 103 */ SYSENT_CI("statvfs",          statvfs,        2),
 565  556          /* 104 */ SYSENT_CI("fstatvfs",         fstatvfs,       2),
 566  557          /* 105 */ SYSENT_CI("getloadavg",       getloadavg,     2),
 567      -/* ONC_PLUS EXTRACT START */
 568  558          /* 106 */ SYSENT_LOADABLE(),            /* nfssys */
 569      -/* ONC_PLUS EXTRACT END */
 570  559          /* 107 */ SYSENT_CI("waitsys",          waitsys,        4),
 571  560          /* 108 */ SYSENT_CI("sigsendset",       sigsendsys,     2),
 572  561          /* 109 */ IF_x86(
 573  562                          SYSENT_AP("hrtsys",     hrtsys,         5),
 574  563                          SYSENT_LOADABLE()),
 575  564          /* 110 */ SYSENT_CI("utimesys",         utimesys,       5),
 576  565          /* 111 */ SYSENT_CI("sigresend",        sigresend,      3),
 577  566          /* 112 */ SYSENT_CL("priocntlsys",      priocntlsys,    5),
 578  567          /* 113 */ SYSENT_CL("pathconf",         pathconf,       2),
 579  568          /* 114 */ SYSENT_CI("mincore",          mincore,        3),
↓ open down ↓ 178 lines elided ↑ open up ↑
 758  747          /* 246 */ SYSENT_CI("setsockopt",       setsockopt,     6),
 759  748          /* 247 */ SYSENT_CI("sockconfig",       sockconfig,     5),
 760  749          /* 248 */ SYSENT_CI("ntp_gettime",      ntp_gettime,    1),
 761  750          /* 249 */ SYSENT_CI("ntp_adjtime",      ntp_adjtime,    1),
 762  751          /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock,       1),
 763  752          /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock,     2),
 764  753          /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register,   2),
 765  754          /* 253 */ SYSENT_CI("cladm",            cladm,          3),
 766  755          /* 254 */ SYSENT_CI("uucopy",           uucopy,         3),
 767  756          /* 255 */ SYSENT_CI("umount2",          umount2,        2)
 768      -/* ONC_PLUS EXTRACT START */
 769  757  };
 770      -/* ONC_PLUS EXTRACT END */
 771  758  
 772  759  
 773  760  #ifdef _SYSCALL32_IMPL
 774  761  
 775  762  extern int ulimit32(int, int);
 776  763  extern ssize_t read32(int32_t, caddr32_t, size32_t);
 777  764  extern ssize_t write32(int32_t, caddr32_t, size32_t);
 778  765  extern ssize_t pread32(int32_t, caddr32_t, size32_t, off32_t);
 779  766  extern ssize_t pwrite32(int32_t, caddr32_t, size32_t, off32_t);
 780  767  extern ssize_t readv32(int32_t, caddr32_t, int32_t);
↓ open down ↓ 33 lines elided ↑ open up ↑
 814  801  extern ssize_t recv32(int32_t, caddr32_t, size32_t, int32_t);
 815  802  extern ssize_t recvfrom32(int32_t, caddr32_t, size32_t, int32_t, caddr32_t,
 816  803      caddr32_t);
 817  804  extern ssize_t send32(int32_t, caddr32_t, size32_t, int32_t);
 818  805  extern ssize_t sendto32(int32_t, caddr32_t, size32_t, int32_t, caddr32_t,
 819  806      socklen_t);
 820  807  
 821  808  extern int privsys32(int, priv_op_t, priv_ptype_t, caddr32_t, size32_t, int);
 822  809  extern int ucredsys32(int, int, caddr32_t);
 823  810  
 824      -/* ONC_PLUS EXTRACT START */
 825  811  /*
 826  812   * sysent table for ILP32 processes running on
 827  813   * a LP64 kernel.
 828  814   */
 829  815  struct sysent sysent32[NSYSCALL] =
 830  816  {
 831      -/* ONC_PLUS EXTRACT END */
 832  817          /*  0 */ SYSENT_C("indir",              indir,          1),
 833  818          /*  1 */ SYSENT_CI("exit",      (int (*)())rexit,       1),
 834  819          /*  2 */ SYSENT_LOADABLE32(),                   /* (was forkall) */
 835  820          /*  3 */ SYSENT_CI("read",              read32,         3),
 836  821          /*  4 */ SYSENT_CI("write",             write32,        3),
 837  822          /*  5 */ SYSENT_CI("open",              open32,         3),
 838  823          /*  6 */ SYSENT_CI("close",             close,          1),
 839  824          /*  7 */ SYSENT_CI("linkat",            linkat,         5),
 840  825          /*  8 */ SYSENT_LOADABLE32(),                   /* (was creat32) */
 841  826          /*  9 */ SYSENT_CI("link",              link,           2),
↓ open down ↓ 88 lines elided ↑ open up ↑
 930  915          /* 96 */ SYSENT_CI("sigsuspend",        sigsuspend,     1),
 931  916          /* 97 */ SYSENT_CI("sigaltstack",       sigaltstack32,  2),
 932  917          /* 98 */ SYSENT_CI("sigaction",         sigaction32,    3),
 933  918          /* 99 */ SYSENT_CI("sigpending",        sigpending,     2),
 934  919          /* 100 */ SYSENT_CI("getsetcontext",    getsetcontext32, 2),
 935  920          /* 101 */ SYSENT_CI("fchmodat",         fchmodat,       4),
 936  921          /* 102 */ SYSENT_CI("mkdirat",          mkdirat,        3),
 937  922          /* 103 */ SYSENT_CI("statvfs",          statvfs32,      2),
 938  923          /* 104 */ SYSENT_CI("fstatvfs",         fstatvfs32,     2),
 939  924          /* 105 */ SYSENT_CI("getloadavg",       getloadavg,     2),
 940      -/* ONC_PLUS EXTRACT START */
 941  925          /* 106 */ SYSENT_LOADABLE32(),          /* nfssys */
 942      -/* ONC_PLUS EXTRACT END */
 943  926          /* 107 */ SYSENT_CI("waitsys",          waitsys32,      4),
 944  927          /* 108 */ SYSENT_CI("sigsendset",       sigsendsys,     2),
 945  928          /* 109 */ IF_x86(
 946  929                          SYSENT_AP("hrtsys",     hrtsys,         5),
 947  930                          SYSENT_LOADABLE32()),
 948  931          /* 110 */ SYSENT_CI("utimesys",         utimesys,       5),
 949  932          /* 111 */ SYSENT_CI("sigresend",        sigresend,      3),
 950  933          /* 112 */ SYSENT_CI("priocntlsys",      priocntlsys,    5),
 951  934          /* 113 */ SYSENT_CI("pathconf",         pathconf,       2),
 952  935          /* 114 */ SYSENT_CI("mincore",          mincore,        3),
↓ open down ↓ 136 lines elided ↑ open up ↑
1089 1072          /* 246 */ SYSENT_CI("setsockopt",       setsockopt,     6),
1090 1073          /* 247 */ SYSENT_CI("sockconfig",       sockconfig,     5),
1091 1074          /* 248 */ SYSENT_CI("ntp_gettime",      ntp_gettime,    1),
1092 1075          /* 249 */ SYSENT_CI("ntp_adjtime",      ntp_adjtime,    1),
1093 1076          /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock,       1),
1094 1077          /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock,     2),
1095 1078          /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register,   2),
1096 1079          /* 253 */ SYSENT_CI("cladm",            cladm,          3),
1097 1080          /* 254 */ SYSENT_CI("uucopy",           uucopy,         3),
1098 1081          /* 255 */ SYSENT_CI("umount2",          umount2,        2)
1099      -/* ONC_PLUS EXTRACT START */
1100 1082  };
1101      -/* ONC_PLUS EXTRACT END */
1102 1083  #endif /* _SYSCALL32_IMPL */
1103 1084  
1104 1085  /*
1105 1086   * Space allocated and initialized in init_syscallnames().
1106 1087   */
1107 1088  char **syscallnames;
1108 1089  
1109 1090  systrace_sysent_t *systrace_sysent;
1110 1091  void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t,
1111 1092      uintptr_t, uintptr_t, uintptr_t, uintptr_t);
↓ open down ↓ 110 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX