Print this page
    
OS-5510 remove lwp_brand_syscall_fast handler
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
OS-5192 need faster clock_gettime
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Reviewed by: Ryan Zezeski <ryan@zinascii.com>
OS-4961 lxbrand want fasttrap-like brand hook
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
OS-4129 lxbrand should not abuse p_brand_data for storing exit signal
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
OS-3561 lxbrand emulation library should execute on alternate stack
OS-3558 lxbrand add support for full in-kernel syscall handling
OS-3545 lx_syscall_regs should not walk stack
OS-3868 many LTP testcases now hang
OS-3901 lxbrand lx_recvmsg fails to translate control messages when 64-bit
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Bryan Cantrill <bryan@joyent.com>
OS-3149 lx brand always sends SIGCHLD to parent processes, regardless of how clone was invoked
OS-2887 lxbrand add WALL, WCLONE, WNOTHREAD support to waitid
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/i86pc/ml/offsets.in
          +++ new/usr/src/uts/i86pc/ml/offsets.in
   1    1  \
   2    2  \ Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
   3    3  \ Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
        4 +\ Copyright 2016 Joyent, Inc.
   4    5  \
   5    6  \ CDDL HEADER START
   6    7  \
   7    8  \ The contents of this file are subject to the terms of the
   8    9  \ Common Development and Distribution License (the "License").
   9   10  \ You may not use this file except in compliance with the License.
  10   11  \
  11   12  \ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  12   13  \ or http://www.opensolaris.org/os/licensing.
  13   14  \ See the License for the specific language governing permissions
  14   15  \ and limitations under the License.
  15   16  \
  16   17  \ When distributing Covered Code, include this CDDL HEADER in each
  17   18  \ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  18   19  \ If applicable, add the following below this CDDL HEADER, with the
  19   20  \ fields enclosed by brackets "[]" replaced with your own identifying
  20   21  \ information: Portions Copyright [yyyy] [name of copyright owner]
  21   22  \
  22   23  \ CDDL HEADER END
  23   24  \
  24   25  
  25   26  
  26   27  \
  27   28  \ offsets.in: input file to produce assym.h using the ctfstabs program
  28   29  \
  29   30  
  30   31  #ifndef _GENASSYM
  31   32  #define _GENASSYM
  32   33  #endif
  33   34  
  34   35  #define SIZES   1
  35   36  
  36   37  #include <sys/types.h>
  37   38  #include <sys/bootsvcs.h>
  38   39  #include <sys/systm.h>
  39   40  #include <sys/sysinfo.h>
  40   41  #include <sys/user.h>
  41   42  #include <sys/thread.h>
  42   43  #include <sys/proc.h>
  43   44  #include <sys/cpuvar.h>
  44   45  #include <sys/tss.h>
  45   46  #include <sys/privregs.h>
  46   47  #include <sys/segments.h>
  47   48  #include <sys/devops.h>
  48   49  #include <sys/ddi_impldefs.h>
  49   50  #include <vm/as.h>
  50   51  #include <sys/avintr.h>
  51   52  #include <sys/pic.h>
  52   53  #include <sys/rm_platter.h>
  53   54  #include <sys/stream.h>
  
    | 
      ↓ open down ↓ | 
    40 lines elided | 
    
      ↑ open up ↑ | 
  
  54   55  #include <sys/strsubr.h>
  55   56  #include <sys/sunddi.h>
  56   57  #include <sys/modctl.h>
  57   58  #include <sys/traptrace.h>
  58   59  #include <sys/ontrap.h>
  59   60  #include <sys/lgrp.h>
  60   61  #include <sys/dtrace.h>
  61   62  #include <sys/brand.h>
  62   63  #include <sys/fastboot.h>
  63   64  #include <sys/cpr_wakecode.h>
       65 +#include <sys/comm_page.h>
  64   66  
  65   67  proc            PROCSIZE
  66   68          p_link
  67   69          p_next
  68   70          p_child
  69   71          p_sibling
  70   72          p_sig
  71   73          p_flag
  72   74          p_tlist
  73   75          p_as
  74   76          p_lockp
  75   77          p_user
  76   78          p_ldt
  77   79          p_ldt_desc
  78   80          p_model
  79   81          p_pctx
  80   82          p_agenttp
  81   83          p_zone
  82   84          p_brand
  83   85          p_brand_data
  84   86  
  85   87  _kthread        THREAD_SIZE
  86   88          t_pcb                   T_LABEL
  87   89          t_lock
  88   90          t_lockstat
  89   91          t_lockp
  90   92          t_lock_flush
  91   93          t_kpri_req
  92   94          t_oldspl
  93   95          t_pri
  94   96          t_pil
  95   97          t_lwp
  96   98          t_procp
  97   99          t_link
  98  100          t_state
  99  101          t_mstate
 100  102          t_preempt_lk
 101  103          t_stk                   T_STACK
 102  104          t_swap
 103  105          t_lwpchan.lc_wchan      T_WCHAN
 104  106          t_flag                  T_FLAGS
 105  107          t_ctx
 106  108          t_lofault
 107  109          t_onfault
 108  110          t_ontrap
 109  111          t_cpu
 110  112          t_lpl
 111  113          t_bound_cpu
 112  114          t_intr
 113  115          t_forw
 114  116          t_back
 115  117          t_sig
 116  118          t_tid
 117  119          t_pre_sys
 118  120          t_preempt
 119  121          t_proc_flag
 120  122          t_startpc
 121  123          t_sysnum
 122  124          t_intr_start
 123  125          _tu._ts._t_astflag      T_ASTFLAG
 124  126          _tu._ts._t_post_sys     T_POST_SYS
 125  127          _tu._t_post_sys_ast     T_POST_SYS_AST
 126  128          t_copyops
 127  129  #ifdef  __amd64
 128  130          t_useracc
 129  131  #endif
 130  132  
 131  133  ctxop
 132  134          save_op                 CTXOP_SAVE
 133  135  
 134  136  as
 135  137          a_hat
 136  138  
 137  139  user    USIZEBYTES
 138  140          u_comm
 139  141          u_signal
 140  142  
 141  143  _label_t
 142  144          val     LABEL_VAL
  
    | 
      ↓ open down ↓ | 
    69 lines elided | 
    
      ↑ open up ↑ | 
  
 143  145  
 144  146  \#define        LABEL_PC        LABEL_VAL
 145  147  \#define        LABEL_SP        _CONST(LABEL_VAL + LABEL_VAL_INCR)
 146  148  \#define        T_PC            _CONST(T_LABEL + LABEL_PC)
 147  149  \#define        T_SP            _CONST(T_LABEL + LABEL_SP)
 148  150  
 149  151  _klwp
 150  152          lwp_thread
 151  153          lwp_procp
 152  154          lwp_brand
      155 +        lwp_brand_syscall
 153  156          lwp_eosys
 154  157          lwp_regs
 155  158          lwp_arg
 156  159          lwp_ap
 157  160          lwp_cursig
 158  161          lwp_state
 159  162          lwp_mstate.ms_acct      LWP_MS_ACCT
 160  163          lwp_mstate.ms_prev      LWP_MS_PREV
 161  164          lwp_mstate.ms_start     LWP_MS_START
 162  165          lwp_mstate.ms_state_start LWP_MS_STATE_START
 163  166          lwp_pcb
 164  167          lwp_ru.sysc             LWP_RU_SYSC
 165  168  
 166  169  \#define        LWP_ACCT_USER   _CONST(LWP_MS_ACCT + _MUL(LMS_USER, LWP_MS_ACCT_INCR))
 167  170  \#define        LWP_ACCT_SYSTEM _CONST(LWP_MS_ACCT + _MUL(LMS_SYSTEM, LWP_MS_ACCT_INCR))
 168  171  
 169  172  fpu_ctx
 170  173          fpu_regs                FPU_CTX_FPU_REGS
 171  174          fpu_flags               FPU_CTX_FPU_FLAGS
 172  175          fpu_xsave_mask          FPU_CTX_FPU_XSAVE_MASK
 173  176  
 174  177  fxsave_state    FXSAVE_STATE_SIZE
 175  178          fx_fsw                  FXSAVE_STATE_FSW
 176  179          fx_mxcsr_mask           FXSAVE_STATE_MXCSR_MASK
 177  180  
 178  181  
 179  182  autovec         AUTOVECSIZE
 180  183          av_vector
 181  184          av_intarg1
 182  185          av_intarg2
 183  186          av_ticksp
 184  187          av_link
 185  188          av_prilevel
 186  189          av_dip
 187  190  
 188  191  av_head
 189  192          avh_link
 190  193          avh_hi_pri
 191  194          avh_lo_pri
 192  195  
 193  196  cpu
 194  197          cpu_id
 195  198          cpu_flags
 196  199          cpu_self
 197  200          cpu_thread
 198  201          cpu_thread_lock
 199  202          cpu_kprunrun
 200  203          cpu_lwp
 201  204          cpu_fpowner
 202  205          cpu_idle_thread
 203  206          cpu_intr_thread
 204  207          cpu_intr_actv
 205  208          cpu_base_spl
 206  209          cpu_intr_stack
 207  210          cpu_stats.sys.cpumigrate        CPU_STATS_SYS_CPUMIGRATE
 208  211          cpu_stats.sys.intr              CPU_STATS_SYS_INTR
 209  212          cpu_stats.sys.intrblk           CPU_STATS_SYS_INTRBLK
 210  213          cpu_stats.sys.syscall           CPU_STATS_SYS_SYSCALL
 211  214          cpu_profile_pc
 212  215          cpu_profile_upc
 213  216          cpu_profile_pil
 214  217          cpu_ftrace.ftd_state            CPU_FTRACE_STATE
 215  218          cpu_mstate
 216  219          cpu_intracct
 217  220  
 218  221  \#define        CPU_INTR_ACTV_REF       _CONST(CPU_INTR_ACTV + 2)
 219  222  
 220  223  cpu
 221  224          cpu_m.pil_high_start    CPU_PIL_HIGH_START
 222  225          cpu_m.intrstat          CPU_INTRSTAT
 223  226          cpu_m.mcpu_current_hat  CPU_CURRENT_HAT
 224  227          cpu_m.mcpu_gdt          CPU_GDT
 225  228          cpu_m.mcpu_idt          CPU_IDT
 226  229          cpu_m.mcpu_tss          CPU_TSS
 227  230          cpu_m.mcpu_softinfo     CPU_SOFTINFO
 228  231          cpu_m.mcpu_pri          CPU_PRI
 229  232  #if defined(__xpv)
 230  233          cpu_m.mcpu_vcpu_info    CPU_VCPU_INFO
 231  234  #endif
 232  235  
 233  236  standard_pic
 234  237          c_curmask
 235  238          c_iplmask
 236  239  
 237  240  ddi_dma_impl
 238  241          dmai_rflags
 239  242          dmai_rdip
 240  243  
 241  244  dev_info
 242  245          devi_ops                DEVI_DEV_OPS
 243  246          devi_bus_ctl
 244  247          devi_bus_dma_ctl
 245  248          devi_bus_dma_allochdl
 246  249          devi_bus_dma_freehdl
 247  250          devi_bus_dma_bindhdl
 248  251          devi_bus_dma_unbindhdl
 249  252          devi_bus_dma_flush
 250  253          devi_bus_dma_win
 251  254  
 252  255  dev_ops
 253  256          devo_bus_ops            DEVI_BUS_OPS
 254  257  
 255  258  bus_ops
 256  259          bus_ctl                 OPS_CTL
 257  260          bus_dma_map             OPS_MAP
 258  261          bus_dma_ctl             OPS_MCTL
 259  262          bus_dma_allochdl        OPS_ALLOCHDL
 260  263          bus_dma_freehdl         OPS_FREEHDL
 261  264          bus_dma_bindhdl         OPS_BINDHDL
 262  265          bus_dma_unbindhdl       OPS_UNBINDHDL
 263  266          bus_dma_flush           OPS_FLUSH
 264  267          bus_dma_win             OPS_WIN
 265  268  
 266  269  sysent  SYSENT_SIZE     SYSENT_SIZE_SHIFT
 267  270          sy_callc
 268  271          sy_flags
 269  272          sy_narg
 270  273  
 271  274  stdata
 272  275          sd_lock
 273  276  
 274  277  queue
 275  278          q_flag
 276  279          q_next
 277  280          q_stream
 278  281          q_syncq
 279  282          q_qinfo
 280  283  
 281  284  qinit
 282  285          qi_putp
 283  286  
 284  287  syncq
 285  288          sq_flags
 286  289          sq_count
 287  290          sq_lock
 288  291          sq_wait
 289  292  
 290  293  rm_platter
 291  294          rm_idt_lim              IDTROFF
 292  295          rm_gdt_lim              GDTROFF
 293  296          rm_pdbr                 CR3OFF
 294  297          rm_cpu                  CPUNOFF
 295  298          rm_cr4                  CR4OFF
 296  299          rm_cpu_halt_code        CPUHALTCODEOFF
 297  300          rm_cpu_halted           CPUHALTEDOFF
 298  301  
 299  302  ddi_acc_impl
 300  303          ahi_acc_attr    ACC_ATTR
 301  304          ahi_get8        ACC_GETB
 302  305          ahi_get16       ACC_GETW
 303  306          ahi_get32       ACC_GETL
 304  307          ahi_get64       ACC_GETLL
 305  308          ahi_put8        ACC_PUTB
 306  309          ahi_put16       ACC_PUTW
 307  310          ahi_put32       ACC_PUTL
 308  311          ahi_put64       ACC_PUTLL
 309  312          ahi_rep_get8    ACC_REP_GETB
 310  313          ahi_rep_get16   ACC_REP_GETW
 311  314          ahi_rep_get32   ACC_REP_GETL
 312  315          ahi_rep_get64   ACC_REP_GETLL
 313  316          ahi_rep_put8    ACC_REP_PUTB
 314  317          ahi_rep_put16   ACC_REP_PUTW
 315  318          ahi_rep_put32   ACC_REP_PUTL
 316  319          ahi_rep_put64   ACC_REP_PUTLL
 317  320  
 318  321  on_trap_data
 319  322          ot_prot
 320  323          ot_trap
 321  324          ot_trampoline
 322  325          ot_jmpbuf
 323  326          ot_prev
 324  327          ot_handle
 325  328          ot_pad1
 326  329  
 327  330  trap_trace_ctl_t        __TRAPTR_SIZE TRAPTR_SIZE_SHIFT
 328  331          ttc_next        TRAPTR_NEXT
 329  332          ttc_first       TRAPTR_FIRST
 330  333          ttc_limit       TRAPTR_LIMIT
 331  334  
 332  335  trap_trace_rec_t        TRAP_ENT_SIZE
 333  336          ttr_cr2
 334  337          ttr_info.idt_entry.vector       TTR_VECTOR
 335  338          ttr_info.idt_entry.ipl          TTR_IPL
 336  339          ttr_info.idt_entry.spl          TTR_SPL
 337  340          ttr_info.idt_entry.pri          TTR_PRI
 338  341          ttr_info.gate_entry.sysnum      TTR_SYSNUM
 339  342          ttr_marker
 340  343          ttr_stamp
 341  344          ttr_curthread
 342  345          ttr_sdepth
 343  346          ttr_stack
 344  347  
 345  348  lgrp_ld
 346  349          lpl_lgrpid
 347  350  
 348  351  dtrace_id_t     DTRACE_IDSIZE
 349  352  
 350  353  cpu_core        CPU_CORE_SIZE   CPU_CORE_SHIFT
 351  354          cpuc_dtrace_flags
 352  355          cpuc_dtrace_illval
 353  356  
 354  357  timespec        TIMESPEC_SIZE
 355  358  
 356  359  gate_desc       GATE_DESC_SIZE
 357  360  
 358  361  desctbr_t       DESCTBR_SIZE
 359  362          dtr_limit
 360  363          dtr_base
 361  364  
 362  365  mod_stub_info   MODS_SIZE
 363  366          mods_func_adr   MODS_INSTFCN
 364  367          mods_errfcn     MODS_RETFCN
 365  368          mods_flag
 366  369  
 367  370  \#define        TRAP_TSIZE              _MUL(TRAP_ENT_SIZE, TRAPTR_NENT)
 368  371  
 369  372  copyops
 370  373          cp_copyin
 371  374          cp_xcopyin
 372  375          cp_copyout
 373  376          cp_xcopyout
 374  377          cp_copyinstr
 375  378          cp_copyoutstr
 376  379          cp_fuword8
 377  380          cp_fuword16
 378  381          cp_fuword32
 379  382          cp_fuword64
 380  383          cp_suword8
 381  384          cp_suword16
 382  385          cp_suword32
 383  386          cp_suword64
 384  387          cp_physio
 385  388  
 386  389  brand
 387  390          b_machops
 388  391  
 389  392  brand_proc_data_t
 390  393          spd_handler
 391  394  
 392  395  fastboot_file_t
 393  396          fb_va
 394  397          fb_pte_list_va
 395  398          fb_pte_list_pa
 396  399          fb_dest_pa
 397  400          fb_size
 398  401          fb_next_pa
 399  402          fb_sections
 400  403          fb_sectcnt
 401  404  
 402  405  fastboot_section_t
 403  406          fb_sec_offset
 404  407          fb_sec_paddr
 405  408          fb_sec_size
 406  409          fb_sec_bss_size
 407  410  
 408  411  fastboot_info_t
 409  412          fi_files
 410  413          fi_has_pae
 411  414          fi_pagetable_va
 412  415          fi_pagetable_pa
 413  416          fi_last_table_pa
 414  417          fi_new_mbi_pa
 415  418          fi_valid
 416  419  
 417  420  zone
 418  421          zone_brand_data
 419  422  
 420  423  wc_cpu  WC_CPU_SIZE
 421  424          wc_retaddr
 422  425          wc_virtaddr
 423  426          wc_cr0
 424  427          wc_cr3
 425  428          wc_cr4
 426  429          wc_cr8
 427  430          wc_fs
 428  431          wc_fsbase
 429  432          wc_gs
 430  433          wc_gsbase
 431  434          wc_kgsbase
 432  435          wc_r8
 433  436          wc_r9
 434  437          wc_r10
 435  438          wc_r11
 436  439          wc_r12
 437  440          wc_r13
 438  441          wc_r14
 439  442          wc_r15
 440  443          wc_rax
 441  444          wc_rbp
 442  445          wc_rbx
 443  446          wc_rcx
 444  447          wc_rdi
 445  448          wc_rdx
 446  449          wc_rsi
 447  450          wc_rsp
 448  451          wc_gdt_limit    WC_GDT
 449  452          wc_gdt_base
 450  453          wc_idt_limit    WC_IDT
 451  454          wc_idt_base
 452  455          wc_tr
 453  456          wc_ldt
 454  457          wc_eflags
 455  458          wc_ebx
 456  459          wc_edi
 457  460          wc_esi
 458  461          wc_ebp
 459  462          wc_esp
  
    | 
      ↓ open down ↓ | 
    297 lines elided | 
    
      ↑ open up ↑ | 
  
 460  463          wc_esp
 461  464          wc_ss
 462  465          wc_cs
 463  466          wc_ds
 464  467          wc_es
 465  468          wc_cpu_id
 466  469          wc_saved_stack
 467  470  
 468  471  wc_wakecode
 469  472          wc_cpu
      473 +
      474 +comm_page_s     COMM_PAGE_S_SIZE
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX