@@ -617,7 +617,7 @@ format with similar underlying principles from BPF described in previous
617
617
paragraphs is being used. However, the instruction set format is modelled
618
618
closer to the underlying architecture to mimic native instruction sets, so
619
619
that a better performance can be achieved (more details later). This new
620
- ISA is called 'eBPF' or 'internal BPF' interchangeably . (Note: eBPF which
620
+ ISA is called 'eBPF'. (Note: eBPF which
621
621
originates from [e]xtended BPF is not the same as BPF extensions! While
622
622
eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading'
623
623
of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.)
@@ -690,7 +690,7 @@ Some core changes of the new internal format:
690
690
That behavior maps directly to x86_64 and arm64 subregister definition, but
691
691
makes other JITs more difficult.
692
692
693
- 32-bit architectures run 64-bit internal BPF programs via interpreter.
693
+ 32-bit architectures run 64-bit eBPF programs via interpreter.
694
694
Their JITs may convert BPF programs that only use 32-bit subregisters into
695
695
native instruction set and let the rest being interpreted.
696
696
@@ -711,7 +711,7 @@ Some core changes of the new internal format:
711
711
- Introduces bpf_call insn and register passing convention for zero overhead
712
712
calls from/to other kernel functions:
713
713
714
- Before an in-kernel function call, the internal BPF program needs to
714
+ Before an in-kernel function call, the eBPF program needs to
715
715
place function arguments into R1 to R5 registers to satisfy calling
716
716
convention, then the interpreter will take them from registers and pass
717
717
to in-kernel function. If R1 - R5 registers are mapped to CPU registers
@@ -780,7 +780,7 @@ Some core changes of the new internal format:
780
780
... since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing
781
781
and rbx, r12 - r15 are callee saved.
782
782
783
- Then the following internal BPF pseudo-program::
783
+ Then the following eBPF pseudo-program::
784
784
785
785
bpf_mov R6, R1 /* save ctx */
786
786
bpf_mov R2, 2
@@ -846,7 +846,7 @@ Some core changes of the new internal format:
846
846
bpf_exit
847
847
848
848
After the call the registers R1-R5 contain junk values and cannot be read.
849
- An in-kernel eBPF verifier is used to validate internal BPF programs.
849
+ An in-kernel eBPF verifier is used to validate eBPF programs.
850
850
851
851
Also in the new design, eBPF is limited to 4096 insns, which means that any
852
852
program will terminate quickly and will only call a fixed number of kernel
@@ -861,23 +861,23 @@ A program, that is translated internally consists of the following elements::
861
861
862
862
op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32
863
863
864
- So far 87 internal BPF instructions were implemented. 8-bit 'op' opcode field
864
+ So far 87 eBPF instructions were implemented. 8-bit 'op' opcode field
865
865
has room for new instructions. Some of them may use 16/24/32 byte encoding. New
866
866
instructions must be multiple of 8 bytes to preserve backward compatibility.
867
867
868
- Internal BPF is a general purpose RISC instruction set. Not every register and
868
+ eBPF is a general purpose RISC instruction set. Not every register and
869
869
every instruction are used during translation from original BPF to new format.
870
870
For example, socket filters are not using ``exclusive add `` instruction, but
871
871
tracing filters may do to maintain counters of events, for example. Register R9
872
872
is not used by socket filters either, but more complex filters may be running
873
873
out of registers and would have to resort to spill/fill to stack.
874
874
875
- Internal BPF can be used as a generic assembler for last step performance
875
+ eBPF can be used as a generic assembler for last step performance
876
876
optimizations, socket filters and seccomp are using it as assembler. Tracing
877
877
filters may use it as assembler to generate code from kernel. In kernel usage
878
- may not be bounded by security considerations, since generated internal BPF code
878
+ may not be bounded by security considerations, since generated eBPF code
879
879
may be optimizing internal code path and not being exposed to the user space.
880
- Safety of internal BPF can come from a verifier (TBD). In such use cases as
880
+ Safety of eBPF can come from a verifier (TBD). In such use cases as
881
881
described, it may be used as safe instruction set.
882
882
883
883
Just like the original BPF, the new format runs within a controlled environment,
@@ -1675,7 +1675,7 @@ Testing
1675
1675
-------
1676
1676
1677
1677
Next to the BPF toolchain, the kernel also ships a test module that contains
1678
- various test cases for classic and internal BPF that can be executed against
1678
+ various test cases for classic and eBPF that can be executed against
1679
1679
the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and
1680
1680
enabled via Kconfig::
1681
1681
0 commit comments