From: Eduard Zingerman <eddyz87@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>,
bpf <bpf@vger.kernel.org>, Quentin Monnet <qmo@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Barret Rhoden <brho@google.com>,
Matt Bobrowski <mattbobrowski@google.com>,
kkd@meta.com, Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH bpf-next v1 10/11] bpftool: Add support for dumping streams
Date: Fri, 09 May 2025 11:31:34 -0700 [thread overview]
Message-ID: <9f417b403ef541af5bc8497897e4fbf88bd4023f.camel@gmail.com> (raw)
In-Reply-To: <CAADnVQKN2S=yb_7NUO8bsu+7CxnaGyTML6gKcPS61EnCZtvG5g@mail.gmail.com>
On Fri, 2025-05-09 at 10:31 -0700, Alexei Starovoitov wrote:
[...]
> How about we extend BPF_OBJ_GET_INFO_BY_FD to return stream data?
> Or add a new command ?
You mean like this:
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 71d5ac83cf5d..25ac28d11af5 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -6610,6 +6610,10 @@ struct bpf_prog_info {
__u32 verified_insns;
__u32 attach_btf_obj_id;
__u32 attach_btf_id;
+ __u32 stdout_len; /* length of the buffer passed in 'stdout' */
+ __u32 stderr_len; /* length of the buffer passed in 'stderr' */
+ __aligned_u64 stdout;
+ __aligned_u64 stderr;
} __attribute__((aligned(8)));
And return -EAGAIN if there is more data to read?
Imo, having this in syscall is more convenient for the end users.
Alternatively, are files in bpffs considered to be stable API?
E.g. having something like /sys/fs/bpf/<prog-id>/std{err,out} .
[...]
next prev parent reply other threads:[~2025-05-09 18:31 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 17:17 [PATCH bpf-next v1 00/11] BPF Standard Streams Kumar Kartikeya Dwivedi
2025-05-07 17:17 ` [PATCH bpf-next v1 01/11] bpf: Introduce bpf_dynptr_from_mem_slice Kumar Kartikeya Dwivedi
2025-05-09 17:19 ` Eduard Zingerman
2025-05-09 21:11 ` Andrii Nakryiko
2025-05-07 17:17 ` [PATCH bpf-next v1 02/11] bpf: Introduce BPF standard streams Kumar Kartikeya Dwivedi
2025-05-08 23:54 ` Eduard Zingerman
2025-05-09 0:10 ` Kumar Kartikeya Dwivedi
2025-05-07 17:17 ` [PATCH bpf-next v1 03/11] bpf: Add function to extract program source info Kumar Kartikeya Dwivedi
2025-05-08 10:30 ` kernel test robot
2025-05-08 20:15 ` Eduard Zingerman
2025-05-08 23:32 ` Kumar Kartikeya Dwivedi
2025-05-09 21:17 ` Andrii Nakryiko
2025-05-07 17:17 ` [PATCH bpf-next v1 04/11] bpf: Add function to find program from stack trace Kumar Kartikeya Dwivedi
2025-05-08 23:07 ` Eduard Zingerman
2025-05-08 23:29 ` Kumar Kartikeya Dwivedi
2025-05-07 17:17 ` [PATCH bpf-next v1 05/11] bpf: Add dump_stack() analogue to print to BPF stderr Kumar Kartikeya Dwivedi
2025-05-08 22:38 ` Eduard Zingerman
2025-05-08 23:29 ` Kumar Kartikeya Dwivedi
2025-05-07 17:17 ` [PATCH bpf-next v1 06/11] bpf: Report may_goto timeout " Kumar Kartikeya Dwivedi
2025-05-08 12:53 ` kernel test robot
2025-05-09 6:22 ` Eduard Zingerman
2025-05-09 9:19 ` Alan Maguire
2025-05-07 17:17 ` [PATCH bpf-next v1 07/11] bpf: Report rqspinlock deadlocks/timeout " Kumar Kartikeya Dwivedi
2025-05-07 17:17 ` [PATCH bpf-next v1 08/11] bpf: Report arena faults " Kumar Kartikeya Dwivedi
2025-05-09 19:28 ` Eduard Zingerman
2025-05-09 20:01 ` Kumar Kartikeya Dwivedi
2025-05-09 20:07 ` Eduard Zingerman
2025-05-09 20:10 ` Kumar Kartikeya Dwivedi
2025-05-09 20:17 ` Eduard Zingerman
2025-05-07 17:17 ` [PATCH bpf-next v1 09/11] libbpf: Add bpf_stream_printk() macro Kumar Kartikeya Dwivedi
2025-05-08 23:31 ` Eduard Zingerman
2025-05-08 23:33 ` Kumar Kartikeya Dwivedi
2025-05-09 6:16 ` Eduard Zingerman
2025-05-09 21:28 ` Andrii Nakryiko
2025-05-08 23:41 ` Alexei Starovoitov
2025-05-08 23:48 ` Kumar Kartikeya Dwivedi
2025-05-08 23:50 ` Kumar Kartikeya Dwivedi
2025-05-09 21:26 ` Andrii Nakryiko
2025-05-07 17:17 ` [PATCH bpf-next v1 10/11] bpftool: Add support for dumping streams Kumar Kartikeya Dwivedi
2025-05-08 10:41 ` Quentin Monnet
2025-05-08 23:41 ` Kumar Kartikeya Dwivedi
2025-05-09 6:21 ` Eduard Zingerman
2025-05-09 17:31 ` Alexei Starovoitov
2025-05-09 18:31 ` Eduard Zingerman [this message]
2025-05-09 18:48 ` Alexei Starovoitov
2025-05-09 19:37 ` Eduard Zingerman
2025-05-09 19:50 ` Kumar Kartikeya Dwivedi
2025-05-09 21:33 ` Andrii Nakryiko
2025-05-12 20:51 ` Kumar Kartikeya Dwivedi
2025-05-12 21:35 ` Andrii Nakryiko
2025-05-12 21:50 ` Alexei Starovoitov
2025-05-12 21:56 ` Kumar Kartikeya Dwivedi
2025-05-12 22:07 ` Alexei Starovoitov
2025-05-07 17:17 ` [PATCH bpf-next v1 11/11] selftests/bpf: Add tests for prog streams Kumar Kartikeya Dwivedi
2025-05-09 17:18 ` Eduard Zingerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f417b403ef541af5bc8497897e4fbf88bd4023f.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brho@google.com \
--cc=daniel@iogearbox.net \
--cc=emil@etsalapatis.com \
--cc=kernel-team@meta.com \
--cc=kkd@meta.com \
--cc=martin.lau@kernel.org \
--cc=mattbobrowski@google.com \
--cc=memxor@gmail.com \
--cc=qmo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.