Skip to content

Commit 18d405a

Browse files
borkmannAlexei Starovoitov
authored andcommitted
bpf, arm32: fix to use bpf_jit_binary_lock_ro api
Any eBPF JIT that where its underlying arch supports ARCH_HAS_SET_MEMORY would need to use bpf_jit_binary_{un,}lock_ro() pair instead of the set_memory_{ro,rw}() pair directly as otherwise changes to the former might break. arm32's eBPF conversion missed to change it, so fix this up here. Fixes: 39c13c2 ("arm: eBPF JIT compiler") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 4c79579 commit 18d405a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/net/bpf_jit_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
18441844
/* there are 2 passes here */
18451845
bpf_jit_dump(prog->len, image_size, 2, ctx.target);
18461846

1847-
set_memory_ro((unsigned long)header, header->pages);
1847+
bpf_jit_binary_lock_ro(header);
18481848
prog->bpf_func = (void *)ctx.target;
18491849
prog->jited = 1;
18501850
prog->jited_len = image_size;

0 commit comments

Comments
 (0)