]> 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)
commitafe1545ddbfd0b4aa3a7105ccfe1aab88f8d8290
tree25f51a15315b793e279b95a98184101f0caecdc3
parentc7a8412e006b8b00fdf6cbbdcfa100ff492dd12a
powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC

Emit similar instruction sequences to commit f11c9fdd95bda5
("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