bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	bpf <bpf@vger.kernel.org>, Andrii Nakryiko <andrii@kernel.org>,
	Florent Revest <revest@chromium.org>
Subject: Re: Portability of bpf_tracing.h
Date: Thu, 10 Jun 2021 11:14:01 -0700	[thread overview]
Message-ID: <CAADnVQJu0gbKXLYQ_whsh0sENkxR7E3XOuVfAFrPkyXhQtdG1g@mail.gmail.com> (raw)
In-Reply-To: <CACAyw99m8rbE5L9LAowYwvAkza+twuet2tdas2eotsf3uWgGTQ@mail.gmail.com>

On Thu, Jun 10, 2021 at 7:12 AM Lorenz Bauer <lmb@cloudflare.com> wrote:

> > > The idea of basing this on unique fields in types is neat, the
> > > downside I see is that we encode the logic in the BPF bitstream. If in
> > > the future struct pt_regs is changed, code breaks and we can't do much
> >
> > If pt_regs fields are renamed all PT_REGS-related stuff, provided by
> > libbpf in bpf_tracing.h will break as well and will require
> > re-compilation of BPF application.
>
> I'm thinking more along the lines of, if a PT_REGS definition changes
> so that the unique field isn't unique anymore. The BPF is still valid,
> but the logic that determines the platform isn't.

struct pt_regs is uapi on every arch.
They cannot change. New registers can be added :) but the chance is
close to zero.

      reply	other threads:[~2021-06-10 18:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 15:05 Portability of bpf_tracing.h Lorenz Bauer
2021-05-24 17:47 ` Andrii Nakryiko
2021-05-24 19:30   ` John Fastabend
2021-05-25  0:13     ` Andrii Nakryiko
2021-05-26  9:13   ` Lorenz Bauer
2021-05-26 18:34     ` Andrii Nakryiko
2021-05-28  8:29       ` Lorenz Bauer
2021-05-30  0:51         ` Andrii Nakryiko
2021-06-10 14:09           ` Lorenz Bauer
2021-06-10 18:14             ` Alexei Starovoitov [this message]

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=CAADnVQJu0gbKXLYQ_whsh0sENkxR7E3XOuVfAFrPkyXhQtdG1g@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=lmb@cloudflare.com \
    --cc=revest@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).