lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 17 Nov 2020 19:04:32 -0800 From: Andrii Nakryiko <andrii.nakryiko@...il.com> To: "Daniel T. Lee" <danieltimlee@...il.com> Cc: Daniel Borkmann <daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, brakmo <brakmo@...com>, Jesper Dangaard Brouer <brouer@...hat.com>, Lorenzo Bianconi <lorenzo@...nel.org>, David Ahern <dsa@...ulusnetworks.com>, Yonghong Song <yhs@...com>, Toke Høiland-Jørgensen <toke@...hat.com>, Ira Weiny <ira.weiny@...el.com>, Thomas Graf <tgraf@...g.ch>, Jakub Kicinski <kuba@...nel.org>, Martin KaFai Lau <kafai@...com>, John Fastabend <john.fastabend@...il.com>, bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>, Xdp <xdp-newbies@...r.kernel.org> Subject: Re: [PATCH bpf-next 1/9] selftests: bpf: move tracing helpers to trace_helper On Tue, Nov 17, 2020 at 6:55 PM Daniel T. Lee <danieltimlee@...il.com> wrote: > > On Wed, Nov 18, 2020 at 10:58 AM Andrii Nakryiko > <andrii.nakryiko@...il.com> wrote: > > > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee <danieltimlee@...il.com> wrote: > > > > > > Under the samples/bpf directory, similar tracing helpers are > > > fragmented around. To keep consistent of tracing programs, this commit > > > moves the helper and define locations to increase the reuse of each > > > helper function. > > > > > > Signed-off-by: Daniel T. Lee <danieltimlee@...il.com> > > > > > > --- > > > [...] > > > -static void read_trace_pipe2(void) > > > > This is used only in hbm.c, why move it into trace_helpers.c? > > > > I think this function can be made into a helper that can be used in > other programs. Which is basically same as 'read_trace_pipe' and > also writes the content of that pipe to file either. Well, it's not used > anywhere else, but I moved this function for the potential of reuse. Let's not make premature extraction of helpers. We generally add helpers when we have a repeated need for them. It's not currently the case for read_trace_pipe2(). > > Since these 'read_trace_pipe's are helpers that are only used > under samples directory, what do you think about moving these > helpers to something like samples/bpf/trace_pipe.h? Nope, not yet. I'd just drop this patch for now (see my comments on another patch regarding DEBUGFS). > > Thanks for your time and effort for the review. > > -- > Best, > Daniel T. Lee
Powered by blists - more mailing lists