summaryrefslogtreecommitdiff
path: root/arch/arm64/net
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-05-14 23:22:31 +0200
committerAlexei Starovoitov <ast@kernel.org>2018-05-14 19:11:45 -0700
commit09ece3d0f2ee524b8d1d3c775d9eeb50c40558d8 (patch)
tree8328afe355615ebeb98b5a92c3ebc34c76324c9f /arch/arm64/net
parent38ca930601631585fbd7826f8f6908055a8dbc9e (diff)
downloadlinux-rpi3-09ece3d0f2ee524b8d1d3c775d9eeb50c40558d8.tar.gz
linux-rpi3-09ece3d0f2ee524b8d1d3c775d9eeb50c40558d8.tar.bz2
linux-rpi3-09ece3d0f2ee524b8d1d3c775d9eeb50c40558d8.zip
bpf, arm64: save 4 bytes of unneeded stack space
Follow-up to 816d9ef32a8b ("bpf, arm64: remove ld_abs/ld_ind") in that the extra 4 byte JIT scratchpad is not needed anymore since it was in ld_abs/ld_ind as stack buffer for bpf_load_pointer(). Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/arm64/net')
-rw-r--r--arch/arm64/net/bpf_jit_comp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 0b40c8fb0706..85113cab2046 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -21,7 +21,6 @@
#include <linux/bpf.h>
#include <linux/filter.h>
#include <linux/printk.h>
-#include <linux/skbuff.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
@@ -188,7 +187,7 @@ static int build_prologue(struct jit_ctx *ctx)
* | ... | BPF prog stack
* | |
* +-----+ <= (BPF_FP - prog->aux->stack_depth)
- * |RSVD | JIT scratchpad
+ * |RSVD | padding
* current A64_SP => +-----+ <= (BPF_FP - ctx->stack_size)
* | |
* | ... | Function call stack
@@ -220,9 +219,7 @@ static int build_prologue(struct jit_ctx *ctx)
return -1;
}
- /* 4 byte extra for skb_copy_bits buffer */
- ctx->stack_size = prog->aux->stack_depth + 4;
- ctx->stack_size = STACK_ALIGN(ctx->stack_size);
+ ctx->stack_size = STACK_ALIGN(prog->aux->stack_depth);
/* Set up function call stack */
emit(A64_SUB_I(1, A64_SP, A64_SP, ctx->stack_size), ctx);