All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Dmitrii Banshchikov <me@ubique.spb.ru>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Andrey Ignatov <rdna@fb.com>,
	syzbot <syzbot+43fd005b5a1b4d10781e@syzkaller.appspotmail.com>
Subject: Re: [PATCH bpf v2 1/2] bpf: Forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs
Date: Mon, 15 Nov 2021 20:44:02 -0800	[thread overview]
Message-ID: <CAADnVQJY9=mGVP9ZqpAsfmyhdgfyNBESc4Tr=+BG87TP682=9Q@mail.gmail.com> (raw)
In-Reply-To: <87o86k6ep0.ffs@tglx>

On Mon, Nov 15, 2021 at 6:02 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Dmitrii.
>
> > @@ -4632,6 +4632,9 @@ union bpf_attr {
> >   *           system boot, in nanoseconds. Does not include time the system
> >   *           was suspended.
> >   *
> > + *           Tracing programs cannot use **bpf_ktime_get_coarse_ns**\() (but
> > + *           this may change in the future).
>
> Sorry no. This is a bug fix and there is no place for 'may change in the
> future' nonsense. It's simply not possible right now and unless you have
> a plan to make this work backed up by actual patches this comment is
> worse than wishful thinking.

No. The point of 'may' is that it actually may change.
It's certainly realistic and probable.
But based on the tone of your message it doesn't seem that
you're interested in hearing the arguments in favor of it.
So I just removed this comment to put this matter to rest.

> > + *
> >   *           See: **clock_gettime**\ (**CLOCK_MONOTONIC_COARSE**)
> >   *   Return
> >   *           Current *ktime*.
> > @@ -4804,6 +4807,9 @@ union bpf_attr {
> >   *           All other bits of *flags* are reserved.
> >   *           The verifier will reject the program if *timer* is not from
> >   *           the same *map*.
> > + *
> > + *           Tracing programs cannot use **bpf_timer_init**\() (but this may
> > + *           change in the future).
>
> This is even worse than the above because it cannot happen ever. Please
> stop this nonsensical wishful thinking crap. It does not add any value,
> it just adds confusion.

I respectfully disagree, but I removed this comment as well.
And force pushed the commits.

  reply	other threads:[~2021-11-16  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 14:22 [PATCH bpf v2 0/2] Forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs Dmitrii Banshchikov
2021-11-13 14:22 ` [PATCH bpf v2 1/2] bpf: " Dmitrii Banshchikov
2021-11-16  2:02   ` Thomas Gleixner
2021-11-16  4:44     ` Alexei Starovoitov [this message]
2021-11-13 14:22 ` [PATCH bpf v2 2/2] selftests/bpf: Add tests for restricted helpers Dmitrii Banshchikov
2021-11-14 18:38 ` [PATCH bpf v2 0/2] Forbid bpf_ktime_get_coarse_ns and bpf_timer_* in tracing progs Alexei Starovoitov
2021-11-16  2:18   ` Thomas Gleixner

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='CAADnVQJY9=mGVP9ZqpAsfmyhdgfyNBESc4Tr=+BG87TP682=9Q@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=me@ubique.spb.ru \
    --cc=netdev@vger.kernel.org \
    --cc=rdna@fb.com \
    --cc=songliubraving@fb.com \
    --cc=syzbot+43fd005b5a1b4d10781e@syzkaller.appspotmail.com \
    --cc=tglx@linutronix.de \
    --cc=yhs@fb.com \
    /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.