Commit 9b3064be authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

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: default avatarMao Minkai <maominkai@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 02da9e00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment