sw64: bpf: fix insn_offset
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNHA -------------------------------- Since ctx->idx is the index of the next jited instruction, value of insn_offset should be set before build_insn(). Allocate 1 more entry for insn_offset[], and give epilogue_offset to it, so the correct jump offset can be calculated if the last instruction is BPF_JMP. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Showing
想要评论请 注册 或 登录