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>
@@ -586,11 +586,12 @@
testl %eax, %eax /* check for non-zero probe */
jz 1f
pushq %rbp /* align stack properly */
movq %rsp, %rbp
movl %eax, %edi
- call *lockstat_probe
+ movq lockstat_probe, %rax
+ INDIRECT_CALL_REG(rax)
leave /* unwind stack */
1:
movq %gs:CPU_THREAD, %rdx /* reload thread ptr */
decb T_LOCKSTAT(%rdx) /* curthread->t_lockstat-- */
movl $1, %eax /* return success if tryenter */
@@ -608,11 +609,12 @@
testl %eax, %eax /* check for non-zero probe */
jz 1f
pushq %rbp /* align stack properly */
movq %rsp, %rbp
movl %eax, %edi
- call *lockstat_probe
+ movq lockstat_probe, %rax
+ INDIRECT_CALL_REG(rax)
leave /* unwind stack */
1:
movq %gs:CPU_THREAD, %rdx /* reload thread ptr */
decb T_LOCKSTAT(%rdx) /* curthread->t_lockstat-- */
movl $1, %eax /* return success if tryenter */