]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Tue, 5 Oct 2021 20:25:25 +0000 (01:55 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Oct 2021 08:52:58 +0000 (19:52 +1100)
commit2c6b144a8ab0c9680e55086f27721a4eac9f0083
tree25f51a15315b793e279b95a98184101f0caecdc3
parentc4b73476fb42694439f4f99281121f18fd5d1dd9
powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC

Emit similar instruction sequences to commit 2b3bdec4e765fc
("powerpc/64s: Add support for a store forwarding barrier at kernel
entry/exit") when encountering BPF_NOSPEC.

Mitigations are enabled depending on what the firmware advertises. In
particular, we do not gate these mitigations based on current settings,
just like in x86. Due to this, we don't need to take any action if
mitigations are enabled or disabled at runtime.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/956570cbc191cd41f8274bed48ee757a86dac62a.1633464148.git.naveen.n.rao@linux.vnet.ibm.com
arch/powerpc/net/bpf_jit64.h
arch/powerpc/net/bpf_jit_comp64.c