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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQK_X7PnKwbrmS2sT+oV1ZVYfmnagt_Wi5wg2nO9vt=W6A@mail.gmail.com>
Date: Mon, 8 Sep 2025 15:32:24 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Ian Rogers <irogers@...gle.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>, 
	Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>, 
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, 
	Jiri Olsa <jolsa@...nel.org>, bpf <bpf@...r.kernel.org>, 
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] bpf: Add kernel-doc for struct bpf_prog_info

On Wed, Sep 3, 2025 at 9:01 PM Ian Rogers <irogers@...gle.com> wrote:
>
>
> > >         __aligned_u64 prog_tags;
> > > +       /**
> > > +        * @run_time_ns: The total accumulated execution time of the program in
> > > +        * nanoseconds.
> > > +        */
> >
> > Missing critical detail that the kernel doesn't keep counting it all the time.
>
> I'm not sure what you mean by this? Do you think the comment is saying
> that the run_time is the run_time since loading? But it says
> "accumulated execution time" which would imply only time spent
> executing. When is it not counting?
>
> > >         __u64 run_time_ns;
> > > +       /**
> > > +        * @run_cnt: The total number of times the program has been executed.
> > > +        */
> >
> > ditto
>
> Shouldn't the purpose of run_time_ns and run_cnt to be to calculate an
> average run_time? If these are arbitrary values, what's the point?
> Again, why isn't this explained? Thank you for helping me to try to
> fix this. I'm also happy for others to fix this and this patch to be
> completely ignored. It can be ignored in all scenarios, I was just
> trying to be helpful to others and probably my future self at some
> point.

Posting a patch generated by AI without proof reading is not ok.
Wrong documentation is much worse than no documentation.
If you don't know what these fields do don't add random comments
to them. Read the code and document based on your understanding.
Copy pasting AI and throwing it at maintainers to review is inconsiderate.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ