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>

*** 87,97 **** SCR_REG, SCR_REGB); CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER); mov %rcx, SYSCALL_REG; /* save orig return addr in syscall_reg */ mov SCR_REG, %rcx; /* place new return addr in %rcx */ mov %gs:CPU_RTMP_R15, SCR_REG; /* restore scratch register */ ! call *x86_md_clear /* Flush micro-arch state */ mov V_SSP(SP_REG), SP_REG /* restore user stack pointer */ jmp nopop_sys_syscall32_swapgs_sysretl 9: retq SET_SIZE(XXX_brand_syscall32_callback) --- 87,97 ---- SCR_REG, SCR_REGB); CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER); mov %rcx, SYSCALL_REG; /* save orig return addr in syscall_reg */ mov SCR_REG, %rcx; /* place new return addr in %rcx */ mov %gs:CPU_RTMP_R15, SCR_REG; /* restore scratch register */ ! call x86_md_clear /* Flush micro-arch state */ mov V_SSP(SP_REG), SP_REG /* restore user stack pointer */ jmp nopop_sys_syscall32_swapgs_sysretl 9: retq SET_SIZE(XXX_brand_syscall32_callback)
*** 107,117 **** SCR_REG, SCR_REGB); CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER); mov %rcx, SYSCALL_REG; /* save orig return addr in syscall_reg */ mov SCR_REG, %rcx; /* place new return addr in %rcx */ mov %gs:CPU_RTMP_R15, SCR_REG; /* restore scratch register */ ! call *x86_md_clear /* Flush micro-arch state */ mov V_SSP(SP_REG), SP_REG /* restore user stack pointer */ jmp nopop_sys_syscall_swapgs_sysretq 9: retq SET_SIZE(XXX_brand_syscall_callback) --- 107,117 ---- SCR_REG, SCR_REGB); CALC_TABLE_ADDR(SCR_REG, SPD_HANDLER); mov %rcx, SYSCALL_REG; /* save orig return addr in syscall_reg */ mov SCR_REG, %rcx; /* place new return addr in %rcx */ mov %gs:CPU_RTMP_R15, SCR_REG; /* restore scratch register */ ! call x86_md_clear /* Flush micro-arch state */ mov V_SSP(SP_REG), SP_REG /* restore user stack pointer */ jmp nopop_sys_syscall_swapgs_sysretq 9: retq SET_SIZE(XXX_brand_syscall_callback)