lkml.org 
[lkml]   [2021]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 14/14] bpf,x86: Respect X86_FEATURE_RETPOLINE*
On Wed, Oct 20, 2021 at 12:44:56PM +0200, Peter Zijlstra wrote:
> +
> + if (cpu_feature_enabled(X86_FEATURE_RETPOLINE_AMD)) {
> + EMIT_LFENCE();
> + EMIT2(0xFF, 0xE0 + reg);
> + } else if (cpu_feature_enabled(X86_FEATURE_RETPOLINE)) {
> + emit_jump(&prog, reg_thunk[reg], ip);
> + } else

One more question.
What's a deal with AMD? I thought the retpoline is effective on it as well.
lfence is an optimization or retpoline turned out to be not enough
in some cases?

\
 
 \ /
  Last update: 2021-10-21 02:08    [W:1.271 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site