Print this page
11787 Kernel needs to be built with retpolines
11788 Kernel needs to generally use RSB stuffing
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/ia32/ml/lock_prim.s
          +++ new/usr/src/uts/intel/ia32/ml/lock_prim.s
↓ open down ↓ 580 lines elided ↑ open up ↑
 581  581   */
 582  582          ALTENTRY(lockstat_wrapper)
 583  583          incb    T_LOCKSTAT(%rdx)                /* curthread->t_lockstat++ */
 584  584          leaq    lockstat_probemap(%rip), %rax
 585  585          movl    (%rax, %rdi, DTRACE_IDSIZE), %eax
 586  586          testl   %eax, %eax                      /* check for non-zero probe */
 587  587          jz      1f
 588  588          pushq   %rbp                            /* align stack properly */
 589  589          movq    %rsp, %rbp
 590  590          movl    %eax, %edi
 591      -        call    *lockstat_probe
      591 +        movq    lockstat_probe, %rax
      592 +        INDIRECT_CALL_REG(rax)
 592  593          leave                                   /* unwind stack */
 593  594  1:
 594  595          movq    %gs:CPU_THREAD, %rdx            /* reload thread ptr */
 595  596          decb    T_LOCKSTAT(%rdx)                /* curthread->t_lockstat-- */
 596  597          movl    $1, %eax                        /* return success if tryenter */
 597  598          ret
 598  599          SET_SIZE(lockstat_wrapper)
 599  600          SET_SIZE(mutex_enter)
 600  601  
 601  602  /*
↓ open down ↓ 1 lines elided ↑ open up ↑
 603  604   */
 604  605          ENTRY(lockstat_wrapper_arg)
 605  606          incb    T_LOCKSTAT(%rcx)                /* curthread->t_lockstat++ */
 606  607          leaq    lockstat_probemap(%rip), %rax
 607  608          movl    (%rax, %rdi, DTRACE_IDSIZE), %eax
 608  609          testl   %eax, %eax                      /* check for non-zero probe */
 609  610          jz      1f
 610  611          pushq   %rbp                            /* align stack properly */
 611  612          movq    %rsp, %rbp
 612  613          movl    %eax, %edi
 613      -        call    *lockstat_probe
      614 +        movq    lockstat_probe, %rax
      615 +        INDIRECT_CALL_REG(rax)
 614  616          leave                                   /* unwind stack */
 615  617  1:
 616  618          movq    %gs:CPU_THREAD, %rdx            /* reload thread ptr */
 617  619          decb    T_LOCKSTAT(%rdx)                /* curthread->t_lockstat-- */
 618  620          movl    $1, %eax                        /* return success if tryenter */
 619  621          ret
 620  622          SET_SIZE(lockstat_wrapper_arg)
 621  623  
 622  624  
 623  625          ENTRY(mutex_tryenter)
↓ open down ↓ 874 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX