path: root/arch
diff options
authorDaniel Borkmann <>2015-11-14 01:26:53 +0100
committerDavid S. Miller <>2015-11-16 14:40:49 -0500
commitebaef649c26b44ff28114b452fd067a270ca7f02 (patch)
treec709914711a5168ae566eded4ca7faba0ac68210 /arch
parent30b50aa612018bd92f5a85534cc2668423e8c7e8 (diff)
bpf, arm: start flushing icache range from header
During review I noticed that the icache range we're flushing should start at header already and not at ctx.image. Reason is that after 55309dd3d4cd ("net: bpf: arm: address randomize and write protect JIT code"), we also want to make sure to flush the random-sized trap in front of the start of the actual program (analogous to x86). No operational differences from user side. Signed-off-by: Daniel Borkmann <> Tested-by: Nicolas Schichan <> Cc: Alexei Starovoitov <> Signed-off-by: David S. Miller <>
Diffstat (limited to 'arch')
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 2f4b14cfddb4..591f9db3bf40 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -1061,7 +1061,7 @@ void bpf_jit_compile(struct bpf_prog *fp)
- flush_icache_range((u32), (u32)( + ctx.idx));
+ flush_icache_range((u32)header, (u32)( + ctx.idx));
#if __LINUX_ARM_ARCH__ < 7
if (ctx.imm_count)