Commit ea250fb
bpf, arm64: calculate offset as byte-offset for bpf line info
insn_to_jit_off passed to bpf_prog_fill_jited_linfo() is calculated
in instruction granularity instead of bytes granularity, but bpf
line info requires byte offset, so fixing it by calculating ctx->offset
as byte-offset. bpf2a64_offset() needs to return relative instruction
offset by using ctx->offfset, so update it accordingly.
Fixes: 37ab566 ("bpf: arm64: Enable arm64 jit to provide bpf_line_info")
Signed-off-by: Hou Tao <[email protected]>1 parent 750e2d6 commit ea250fb
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
946 | 951 | | |
947 | 952 | | |
948 | 953 | | |
| 954 | + | |
949 | 955 | | |
950 | | - | |
| 956 | + | |
951 | 957 | | |
952 | 958 | | |
953 | 959 | | |
954 | 960 | | |
955 | | - | |
| 961 | + | |
956 | 962 | | |
957 | 963 | | |
958 | 964 | | |
| |||
964 | 970 | | |
965 | 971 | | |
966 | 972 | | |
967 | | - | |
| 973 | + | |
968 | 974 | | |
969 | 975 | | |
970 | 976 | | |
| |||
0 commit comments