From: Christoph Hellwig <hch@infradead.org>
To: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Cc: Dave Thaler <dthaler@microsoft.com>, bpf <bpf@vger.kernel.org>
Subject: Re: FW: ebpf-docs: draft of ISA doc updates in progress
Date: Mon, 19 Sep 2022 10:04:20 -0700 [thread overview]
Message-ID: <YyihFIOt6xGWrXdC@infradead.org> (raw)
In-Reply-To: <YyFzO205ZZPieCav@syu-laptop>
On Wed, Sep 14, 2022 at 02:22:51PM +0800, Shung-Hsi Yu wrote:
> As discussed in yesterday's session, there's no graceful abortion on
> division by zero, instead, the BPF verifier in Linux prevents division by
> zero from happening. Here a few additional notes:
Hmm, I thought Alexei pointed out a while ago that divide by zero is
now defined to return 0 following. Ok, reading further along I think
that is what you describe with the pseudo-code below.
> While BPF ISA only supports direct call BPF_CALL[1], technically there is an
> opcode 0x8d (BPF_JUMP | BPF_CALL | BPF_X) that has the indirect call
> semantic, and Clang emit such indirect call instruction if user attempt to
> compile with -O0.
>
> I think it worth mentioning in this document for better clarity, perhaps
> simply saying that indirect call is not part of BPF ISA is enough.
Which brings up another question: Do we need a list of opcodes
that someone else defined somewhere that are not considered valid
eBPF? Or how do we get clang and gcc to stop producing invalid
eBPF might be the better question.
next prev parent reply other threads:[~2022-09-19 17:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CY5PR21MB377000AC95B475C47B702293A3439@CY5PR21MB3770.namprd21.prod.outlook.com>
2022-09-13 8:12 ` FW: ebpf-docs: draft of ISA doc updates in progress Dave Thaler
2022-09-14 6:22 ` Shung-Hsi Yu
2022-09-14 9:35 ` Dave Thaler
2022-09-19 17:04 ` Christoph Hellwig [this message]
2022-09-20 19:12 ` Dave Thaler
2022-09-20 23:39 ` Alexei Starovoitov
2022-09-21 8:34 ` Rethink how to deal with division/modulo-on-zero (was Re: FW: ebpf-docs: draft of ISA doc updates in progress) Shung-Hsi Yu
2022-09-21 13:50 ` Alexei Starovoitov
2022-09-22 5:00 ` Shung-Hsi Yu
2022-09-23 23:15 ` Alexei Starovoitov
2022-09-21 14:41 ` Dave Thaler
2022-09-22 5:00 ` Shung-Hsi Yu
2022-09-21 17:53 ` FW: ebpf-docs: draft of ISA doc updates in progress Dave Thaler
2022-09-19 16:58 ` Christoph Hellwig
2022-09-20 19:37 ` Dave Thaler
2022-09-20 23:45 ` Alexei Starovoitov
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=YyihFIOt6xGWrXdC@infradead.org \
--to=hch@infradead.org \
--cc=bpf@vger.kernel.org \
--cc=dthaler@microsoft.com \
--cc=shung-hsi.yu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox