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>

*** 753,763 **** #if defined(__amd64) ENTRY_NP(i86_mwait) pushq %rbp ! call *x86_md_clear movq %rsp, %rbp movq %rdi, %rax /* data */ movq %rsi, %rcx /* extensions */ .byte 0x0f, 0x01, 0xc9 /* mwait */ leave --- 753,763 ---- #if defined(__amd64) ENTRY_NP(i86_mwait) pushq %rbp ! call x86_md_clear movq %rsp, %rbp movq %rdi, %rax /* data */ movq %rsi, %rcx /* extensions */ .byte 0x0f, 0x01, 0xc9 /* mwait */ leave
*** 2558,2568 **** addq %rdi, %rsi leaq .ip_ocsum_jmptbl(%rip), %rdi leaq (%rdi, %rcx, 8), %rdi xorl %ecx, %ecx clc ! jmp *(%rdi) .align 8 .ip_ocsum_jmptbl: .quad .only0, .only4, .only8, .only12, .only16, .only20 .quad .only24, .only28, .only32, .only36, .only40, .only44 --- 2558,2569 ---- addq %rdi, %rsi leaq .ip_ocsum_jmptbl(%rip), %rdi leaq (%rdi, %rcx, 8), %rdi xorl %ecx, %ecx clc ! movq (%rdi), %rdi ! INDIRECT_JMP_REG(rdi) .align 8 .ip_ocsum_jmptbl: .quad .only0, .only4, .only8, .only12, .only16, .only20 .quad .only24, .only28, .only32, .only36, .only40, .only44
*** 3608,3618 **** * We need to call *gethrtimef before picking up CLOCK_LOCK (obviously, * hres_last_tick can only be modified while holding CLOCK_LOCK). * At worst, performing this now instead of under CLOCK_LOCK may * introduce some jitter in pc_gethrestime(). */ ! call *gethrtimef(%rip) movq %rax, %r8 leaq hres_lock(%rip), %rax movb $-1, %dl .CL1: --- 3609,3620 ---- * We need to call *gethrtimef before picking up CLOCK_LOCK (obviously, * hres_last_tick can only be modified while holding CLOCK_LOCK). * At worst, performing this now instead of under CLOCK_LOCK may * introduce some jitter in pc_gethrestime(). */ ! movq gethrtimef(%rip), %rsi ! INDIRECT_CALL_REG(rsi) movq %rax, %r8 leaq hres_lock(%rip), %rax movb $-1, %dl .CL1:
*** 4088,4098 **** movq %rsp, %rbp /* set up stack frame */ movq %rdi, %rsp /* switch stack pointer */ movq %rdx, %rdi /* pass func arg 1 */ movq %rsi, %r11 /* save function to call */ movq %rcx, %rsi /* pass func arg 2 */ ! call *%r11 /* call function */ leave /* restore stack */ ret SET_SIZE(switch_sp_and_call) #elif defined(__i386) --- 4090,4100 ---- movq %rsp, %rbp /* set up stack frame */ movq %rdi, %rsp /* switch stack pointer */ movq %rdx, %rdi /* pass func arg 1 */ movq %rsi, %r11 /* save function to call */ movq %rcx, %rsi /* pass func arg 2 */ ! INDIRECT_CALL_REG(r11) /* call function */ leave /* restore stack */ ret SET_SIZE(switch_sp_and_call) #elif defined(__i386)