From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: [PATCH bpf 1/3] bpf, arm32: fix to use bpf_jit_binary_lock_ro api Date: Thu, 28 Jun 2018 23:34:57 +0200 Message-ID: <20180628213459.28631-2-daniel@iogearbox.net> References: <20180628213459.28631-1-daniel@iogearbox.net> Cc: netdev@vger.kernel.org, Daniel Borkmann To: ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:36479 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965487AbeF1VfI (ORCPT ); Thu, 28 Jun 2018 17:35:08 -0400 In-Reply-To: <20180628213459.28631-1-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: 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: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 6e8b716..f6a62ae 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -1844,7 +1844,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) /* there are 2 passes here */ bpf_jit_dump(prog->len, image_size, 2, ctx.target); - set_memory_ro((unsigned long)header, header->pages); + bpf_jit_binary_lock_ro(header); prog->bpf_func = (void *)ctx.target; prog->jited = 1; prog->jited_len = image_size; -- 2.9.5