Cc: Naveen N. Rao <[email protected]>
Cc: Sandipan Das <[email protected]>
Signed-off-by: Jiong Wang <[email protected]>
---
arch/powerpc/net/bpf_jit_comp64.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/net/bpf_jit_comp64.c
b/arch/powerpc/net/bpf_jit_comp64.c
index 21a1dcd..d10621b 100644
--- a/arch/powerpc/net/bpf_jit_comp64.c
+++ b/arch/powerpc/net/bpf_jit_comp64.c
@@ -559,7 +559,7 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32
*image,
bpf_alu32_trunc:
/* Truncate to 32-bits */
- if (BPF_CLASS(code) == BPF_ALU)
+ if (BPF_CLASS(code) == BPF_ALU && fp->aux->no_verifier_zext)
PPC_RLWINM(dst_reg, dst_reg, 0, 0, 31);
break;
@@ -1046,6 +1046,11 @@ struct powerpc64_jit_data {
struct codegen_context ctx;
};
+bool bpf_jit_hardware_zext(void)
+{
+ return false;
+}
+
struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
{
u32 proglen;
--
2.7.4