mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
Merge branch 'bpf-streams-fixes'
Kumar Kartikeya Dwivedi says: ==================== BPF Streams - Fixes This set contains some fixes for recently reported issues for BPF streams. Please check individual patches for details. ==================== Link: https://patch.msgid.link/20250705053035.3020320-1-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
commit
0074250c35
|
|
@ -3244,6 +3244,7 @@ int bpf_prog_get_file_line(struct bpf_prog *prog, unsigned long ip, const char *
|
|||
struct bpf_line_info *linfo;
|
||||
void **jited_linfo;
|
||||
struct btf *btf;
|
||||
int nr_linfo;
|
||||
|
||||
btf = prog->aux->btf;
|
||||
linfo = prog->aux->linfo;
|
||||
|
|
@ -3258,8 +3259,9 @@ int bpf_prog_get_file_line(struct bpf_prog *prog, unsigned long ip, const char *
|
|||
|
||||
insn_start = linfo[0].insn_off;
|
||||
insn_end = insn_start + len;
|
||||
nr_linfo = prog->aux->nr_linfo - prog->aux->linfo_idx;
|
||||
|
||||
for (int i = 0; i < prog->aux->nr_linfo &&
|
||||
for (int i = 0; i < nr_linfo &&
|
||||
linfo[i].insn_off >= insn_start && linfo[i].insn_off < insn_end; i++) {
|
||||
if (jited_linfo[i] >= (void *)ip)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -498,11 +498,11 @@ static bool dump_stack_cb(void *cookie, u64 ip, u64 sp, u64 bp)
|
|||
if (ret < 0)
|
||||
goto end;
|
||||
ctxp->err = bpf_stream_stage_printk(ctxp->ss, "%pS\n %s @ %s:%d\n",
|
||||
(void *)ip, line, file, num);
|
||||
(void *)(long)ip, line, file, num);
|
||||
return !ctxp->err;
|
||||
}
|
||||
end:
|
||||
ctxp->err = bpf_stream_stage_printk(ctxp->ss, "%pS\n", (void *)ip);
|
||||
ctxp->err = bpf_stream_stage_printk(ctxp->ss, "%pS\n", (void *)(long)ip);
|
||||
return !ctxp->err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user