|
@@ -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);
|