Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx> writes: [...] > > +imm > > + integer immediate value > > Perhaps mention that imm is a _signed_ integer just like offset below? Thanks, will add. [...] > > +``BPF_DIV`` has an implicit program exit condition as well. If > > +eBPF program execution would result in division by zero, > > +program execution must be gracefully aborted. > > 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: > > 1. Modulo by zero is also prevented for the same reason [...] Thanks, Daniel pointed that out too after the session so I am adding this info. > > +Helper functions are a concept whereby BPF programs can call into > > +set of function calls exposed by the eBPF runtime. Each helper > > +function is identified by an integer used in a ``BPF_CALL`` instruction. > > +The available helper functions may differ for each eBPF program type. > > 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. Noted, will try to add something to that effect. [...] > > +0xc3 0x00 lock \*(uint64_t \*)(dst + offset) += src `Atomic > operations`_ > ^^^^ > The opcode should be 0xdb as well Ack. > Otherwise, > Acked-by: Shung-Hsi Yu <shung-hsi.yu@xxxxxxxx> Thanks, Dave