This is a backport of the remaining patches from the below series: https://lore.kernel.org/all/cover.1633464148.git.naveen.n.rao@xxxxxxxxxxxxxxxxxx/ Kindly apply to the longterm tree for v5.4 Thanks, Naveen Naveen N. Rao (5): powerpc/lib: Add helper to check if offset is within conditional branch range powerpc/bpf: Validate branch ranges powerpc/bpf: Fix BPF_SUB when imm == 0x80000000 powerpc/security: Add a helper to query stf_barrier type powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/include/asm/security_features.h | 5 ++ arch/powerpc/kernel/security.c | 5 ++ arch/powerpc/lib/code-patching.c | 7 +- arch/powerpc/net/bpf_jit.h | 33 ++++--- arch/powerpc/net/bpf_jit64.h | 8 +- arch/powerpc/net/bpf_jit_comp64.c | 91 ++++++++++++++++---- 7 files changed, 117 insertions(+), 33 deletions(-) base-commit: c65356f0f7268b1260dd64415c2145e73640872e -- 2.33.1