Print this page
Bring back LX zones.


 614 
 615         / Interrupts will be turned on by the 'sti' executed just before
 616         / sysexit. The following ensures that restoring the user's EFLAGS
 617         / doesn't enable interrupts too soon.
 618         andl    $_BITNOT(PS_IE), REGOFF_EFL(%esp)
 619 
 620         MSTATE_TRANSITION(LMS_SYSTEM, LMS_USER)
 621 
 622         cli
 623 
 624         SYSCALL_POP
 625 
 626         popl    %edx                    / sysexit: %edx -> %eip
 627         addl    $4, %esp                / get CS off the stack
 628         popfl                           / EFL
 629         popl    %ecx                    / sysexit: %ecx -> %esp
 630         sti
 631         sysexit
 632         SET_SIZE(sys_sysenter)
 633         SET_SIZE(brand_sys_sysenter)






























 634 
 635 /*
 636  * Declare a uintptr_t which covers the entire pc range of syscall
 637  * handlers for the stack walkers that need this.
 638  */
 639         .align  CPTRSIZE
 640         .globl  _allsyscalls_size
 641         .type   _allsyscalls_size, @object
 642 _allsyscalls_size:
 643         .NWORD  . - _allsyscalls
 644         SET_SIZE(_allsyscalls_size)
 645 
 646 #endif  /* __lint */
 647 
 648 /*
 649  * These are the thread context handlers for lwps using sysenter/sysexit.
 650  */
 651 
 652 #if defined(__lint)
 653 




 614 
 615         / Interrupts will be turned on by the 'sti' executed just before
 616         / sysexit. The following ensures that restoring the user's EFLAGS
 617         / doesn't enable interrupts too soon.
 618         andl    $_BITNOT(PS_IE), REGOFF_EFL(%esp)
 619 
 620         MSTATE_TRANSITION(LMS_SYSTEM, LMS_USER)
 621 
 622         cli
 623 
 624         SYSCALL_POP
 625 
 626         popl    %edx                    / sysexit: %edx -> %eip
 627         addl    $4, %esp                / get CS off the stack
 628         popfl                           / EFL
 629         popl    %ecx                    / sysexit: %ecx -> %esp
 630         sti
 631         sysexit
 632         SET_SIZE(sys_sysenter)
 633         SET_SIZE(brand_sys_sysenter)
 634 #endif  /* __lint */
 635 
 636 #if defined(__lint)
 637 /*
 638  * System call via an int80.  This entry point is only used by the Linux
 639  * application environment.  Unlike the sysenter path, there is no default
 640  * action to take if no callback is registered for this process.
 641  */
 642 void
 643 sys_int80()
 644 {}
 645 
 646 #else   /* __lint */
 647 
 648         ENTRY_NP(brand_sys_int80)
 649         BRAND_CALLBACK(BRAND_CB_INT80)
 650 
 651         ALTENTRY(sys_int80)
 652         /*
 653          * We hit an int80, but this process isn't of a brand with an int80
 654          * handler.  Bad process!  Make it look as if the INT failed.
 655          * Modify %eip to point before the INT, push the expected error
 656          * code and fake a GP fault.
 657          * 
 658          */
 659         subl    $2, (%esp)      /* int insn 2-bytes */
 660         pushl   $_CONST(_MUL(T_INT80, GATE_DESC_SIZE) + 2)
 661         jmp     gptrap                  / GP fault
 662         SET_SIZE(sys_int80)
 663         SET_SIZE(brand_sys_int80)
 664 
 665 /*
 666  * Declare a uintptr_t which covers the entire pc range of syscall
 667  * handlers for the stack walkers that need this.
 668  */
 669         .align  CPTRSIZE
 670         .globl  _allsyscalls_size
 671         .type   _allsyscalls_size, @object
 672 _allsyscalls_size:
 673         .NWORD  . - _allsyscalls
 674         SET_SIZE(_allsyscalls_size)
 675 
 676 #endif  /* __lint */
 677 
 678 /*
 679  * These are the thread context handlers for lwps using sysenter/sysexit.
 680  */
 681 
 682 #if defined(__lint)
 683