All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: dthaler1968=40googlemail.com@dmarc.ietf.org
Cc: "'bpf'" <bpf@vger.kernel.org>, <bpf@ietf.org>
Subject: Re: [Bpf] ISA: BPF_CALL | BPF_X
Date: Tue, 30 Jan 2024 20:49:30 +0100	[thread overview]
Message-ID: <87wmrqiotx.fsf@oracle.com> (raw)
In-Reply-To: <076001da53a1$9ebfa210$dc3ee630$@gmail.com> (dthaler's message of "Tue, 30 Jan 2024 09:27:36 -0800")


> clang generates BPF code with opcode 0x8d (BPF_CALL | BPF_X, which it
> calls "callx"), when compiling with -O0 or -O1.  Of course -O2 is
> recommended, but if anyone later defines opcode 0x8d for anything
> other than what clang means by it, it could cause problems.

GCC also generates BPF_CALL|BPF_X also named callx, but only if the
experimental -mxbpf option is passed to the compiler.

I recommend this particular encoding to be specifically reserved for a
future `call REG' for when/if a time comes when the BPF verifier
supports some form of indirect calls.

>
> On the BPF_MSH thread at
> https://mailarchive.ietf.org/arch/msg/bpf/ogmS9qFhdBCxC4VrOWL7nzjSiXU/
> Alexei wrote regarding BPF_ABS and BPF_IND:
>> DW never existed in classic bpf, so abs/ind never had DW flavor.
>> If some assembler/compiler decided to "support" them it's on them.
>> The standard must not list such things as deprecated. They never existed.
>
> Technically BPF_CALL | BPF_X never existed either, so can be omitted from
> the IANA registry.  But given the widespread deployment of clang's
> use, and the WG charter statement:
>> The BPF working group is initially tasked with documenting the existing
>> state of the BPF ecosystem
> I could see a potential argument to list it as reserved or something.
>
> Today, the document doesn't reserve it, so it's open for future use for any
> purpose.  I just wanted to verify that the WG is ok with not listing it
> in the IANA registry, given the above information.
>
> Dave

WARNING: multiple messages have this Message-ID (diff)
From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: dthaler1968=40googlemail.com@dmarc.ietf.org
Cc: "'bpf'" <bpf@vger.kernel.org>, <bpf@ietf.org>
Subject: Re: [Bpf] ISA: BPF_CALL | BPF_X
Date: Tue, 30 Jan 2024 20:49:30 +0100	[thread overview]
Message-ID: <87wmrqiotx.fsf@oracle.com> (raw)
Message-ID: <20240130194930.GytteVRxaqcOAH0MASYh36nOuafLwt6g8AAhYtvoaFM@z> (raw)
In-Reply-To: <076001da53a1$9ebfa210$dc3ee630$@gmail.com> (dthaler's message of "Tue, 30 Jan 2024 09:27:36 -0800")


> clang generates BPF code with opcode 0x8d (BPF_CALL | BPF_X, which it
> calls "callx"), when compiling with -O0 or -O1.  Of course -O2 is
> recommended, but if anyone later defines opcode 0x8d for anything
> other than what clang means by it, it could cause problems.

GCC also generates BPF_CALL|BPF_X also named callx, but only if the
experimental -mxbpf option is passed to the compiler.

I recommend this particular encoding to be specifically reserved for a
future `call REG' for when/if a time comes when the BPF verifier
supports some form of indirect calls.

>
> On the BPF_MSH thread at
> https://mailarchive.ietf.org/arch/msg/bpf/ogmS9qFhdBCxC4VrOWL7nzjSiXU/
> Alexei wrote regarding BPF_ABS and BPF_IND:
>> DW never existed in classic bpf, so abs/ind never had DW flavor.
>> If some assembler/compiler decided to "support" them it's on them.
>> The standard must not list such things as deprecated. They never existed.
>
> Technically BPF_CALL | BPF_X never existed either, so can be omitted from
> the IANA registry.  But given the widespread deployment of clang's
> use, and the WG charter statement:
>> The BPF working group is initially tasked with documenting the existing
>> state of the BPF ecosystem
> I could see a potential argument to list it as reserved or something.
>
> Today, the document doesn't reserve it, so it's open for future use for any
> purpose.  I just wanted to verify that the WG is ok with not listing it
> in the IANA registry, given the above information.
>
> Dave

-- 
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf

  reply	other threads:[~2024-01-30 19:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 17:27 ISA: BPF_CALL | BPF_X dthaler1968
2024-01-30 17:27 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-30 19:49 ` Jose E. Marchesi [this message]
2024-01-30 19:49   ` Jose E. Marchesi
2024-01-30 21:01   ` Alexei Starovoitov
2024-01-30 21:01     ` Alexei Starovoitov
2024-02-06 16:42     ` dthaler1968
2024-02-06 16:42       ` dthaler1968=40googlemail.com
2024-02-07  2:11       ` Alexei Starovoitov
2024-02-07  2:11         ` Alexei Starovoitov
2024-02-07 18:39         ` dthaler1968
2024-02-07 18:39           ` dthaler1968=40googlemail.com

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=87wmrqiotx.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=bpf@ietf.org \
    --cc=bpf@vger.kernel.org \
    --cc=dthaler1968=40googlemail.com@dmarc.ietf.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.