Re: [PATCH v2 14/14] bpf,x86: Respect X86_FEATURE_RETPOLINE*

From: Peter Zijlstra
Date: Thu Oct 21 2021 - 18:42:32 EST


On Thu, Oct 21, 2021 at 11:03:33AM -0700, Alexei Starovoitov wrote:

> > I nicked it from emit_bpf_tail_call() in the 32bit jit :-) It seemed a
> > lot more robust than the 64bit one and I couldn't figure out why the
> > difference.
>
> Interesting. Daniel will recognize that trick then :)

> > Is there concurrency on the jit?
>
> The JIT of different progs can happen in parallel.

In that case I don't think the patch is safe. I'll see if I can find a
variant that doesn't use static storage.