Commit 0074250c authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

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: default avatarAlexei Starovoitov <ast@kernel.org>
parents 6e5cae9d bfa2bb9a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
}