Print this page
104 Bring back lx brand

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/ml/syscall_asm.s
          +++ new/usr/src/uts/i86pc/ml/syscall_asm.s
↓ open down ↓ 624 lines elided ↑ open up ↑
 625  625  
 626  626          popl    %edx                    / sysexit: %edx -> %eip
 627  627          addl    $4, %esp                / get CS off the stack
 628  628          popfl                           / EFL
 629  629          popl    %ecx                    / sysexit: %ecx -> %esp
 630  630          sti
 631  631          sysexit
 632  632          SET_SIZE(sys_sysenter)
 633  633          SET_SIZE(brand_sys_sysenter)
 634  634  
      635 +#endif  /* __lint */
      636 +
      637 +#if defined(__lint)
 635  638  /*
      639 + * System call via an int80.  This entry point is only used by the Linux
      640 + * application environment.  Unlike the sysenter path, there is no default
      641 + * action to take if no callback is registered for this process.
      642 + */
      643 +void
      644 +sys_int80()
      645 +{}
      646 +
      647 +#else   /* __lint */
      648 +
      649 +        ENTRY_NP(brand_sys_int80)
      650 +        BRAND_CALLBACK(BRAND_CB_INT80)
      651 +
      652 +        ALTENTRY(sys_int80)
      653 +        /*
      654 +         * We hit an int80, but this process isn't of a brand with an int80
      655 +         * handler.  Bad process!  Make it look as if the INT failed.
      656 +         * Modify %eip to point before the INT, push the expected error
      657 +         * code and fake a GP fault.
      658 +         * 
      659 +         */
      660 +        subl    $2, (%esp)      /* int insn 2-bytes */
      661 +        pushl   $_CONST(_MUL(T_INT80, GATE_DESC_SIZE) + 2)
      662 +        jmp     gptrap                  / GP fault
      663 +        SET_SIZE(sys_int80)
      664 +        SET_SIZE(brand_sys_int80)
      665 +
      666 +/*
 636  667   * Declare a uintptr_t which covers the entire pc range of syscall
 637  668   * handlers for the stack walkers that need this.
 638  669   */
 639  670          .align  CPTRSIZE
 640  671          .globl  _allsyscalls_size
 641  672          .type   _allsyscalls_size, @object
 642  673  _allsyscalls_size:
 643  674          .NWORD  . - _allsyscalls
 644  675          SET_SIZE(_allsyscalls_size)
 645  676  
↓ open down ↓ 68 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX