[PATCH bpf-next 6/6] bpf, arm64: Remove instruction sync when invalidating freed memory
From: Xu Kuohai
Date: Sun Dec 06 2026 - 04:51:35 EST
From: Xu Kuohai <xukuohai@xxxxxxxxxx>
The freed BPF image is no longer usable. When its memory is reused,
the new image is copied and an instruction sync is performed. So the
sync on the free path is not needed. Remove it.
Signed-off-by: Xu Kuohai <xukuohai@xxxxxxxxxx>
---
arch/arm64/net/bpf_jit_comp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 7b5519f1159c..605deb44ccff 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -353,7 +353,7 @@ static void jit_fill_hole(void *area, unsigned int size)
int bpf_arch_text_invalidate(void *dst, size_t len)
{
- if (!aarch64_insn_set(dst, AARCH64_BREAK_FAULT, len))
+ if (!aarch64_insn_set_nosync(dst, AARCH64_BREAK_FAULT, len))
return -EINVAL;
return 0;
--
2.47.3