Re: [PATCH] x86,retpoline: Be sure to emit INT3 after JMP *%\reg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 09, 2022 at 09:48:09AM -0700, Josh Poimboeuf wrote:
> On Fri, Sep 09, 2022 at 10:16:13AM +0200, Peter Zijlstra wrote:
> > +++ b/arch/x86/net/bpf_jit_comp.c
> > @@ -419,7 +419,9 @@ static void emit_indirect_jump(u8 **ppro
> >  		OPTIMIZER_HIDE_VAR(reg);
> >  		emit_jump(&prog, &__x86_indirect_thunk_array[reg], ip);
> >  	} else {
> > -		EMIT2(0xFF, 0xE0 + reg);
> > +		EMIT2(0xFF, 0xE0 + reg);	/* jmp *%\reg */
> > +		if (IS_ENABLED(CONFIG_RETPOLINE) || IS_ENABLED(CONFIG_SLS))
> > +			EMIT1(0xCC);		/* int3 */
> >  	}
> 
> Hm, if you have retpolines disabled at runtime, why would you want this.

Because I don't think eIBRS guarantees it will not SLS.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux