ebpf-docs's People
ebpf-docs's Issues
BPF_CALL for eBPF functions incorrectly refers to offset instead of imm
https://github.com/dthaler/ebpf-docs/blob/update/isa/kernel.org/instruction-set.rst#jump-instructions
https://github.com/dthaler/ebpf-docs/blob/update/isa/kernel.org/instruction-set.rst#ebpf-functions
BPF call instruction with src == 1 should pass the offset to the BPF function via the immediate field and not the offset field.
Additional wide instructions
Quentin writes:
The dest = imm (0x18) and call (0x85) instructions have a different semantic when their src register is set to a special flag. I think this is also part of the ISA and should be documented? See commits 2 to 7 of iovisor/bpf-docs#26 (and their description) for a quick reference.
The PR has:
0x18 (src == 0) | lddw dst, imm | dst = imm
0x18 (src == 1) | lddw dst, map | dst = imm with imm == map fd
0x18 (src == 2) | lddw dst, map value | dst = map[0] + insn[1].imm with insn[0] == map fd
0x18 (src == 3) | lddw dst, kernel var | dst = imm with imm == BTF id of var
0x18 (src == 4) | lddw dst, BPF func | dst = imm with imm == insn offset of BPF callback
0x18 (src == 5) | lddw dst, imm | dst = imm with imm == map index
0x18 (src == 6) | lddw dst, map value | dst = map[0] + insn[1].imm with insn[0] == map index
But what does "map[0]" mean? What does "insn[0]" mean, is that relative to the PC or absolute from the start of the program or what?
Also the ISA does not currently define the existence / meaning of a "map fd" or a "BTF id of var" or a "map index" or a "BPF callback". I'm concerned about adding these to the ISA without definitions.
Remove Linux and Clang implementation nodes
Christoph argued on the list that these should be moved out to a separate document.
Remove cpu version
Leave cpu version numbers to Clang specific implementation notes
Behavior around signed imm values and 64bit ALU operations
Assume:
mov r0, -10
Byte sequence:
b7 00 00 00 f6 f6 ff ff
What value should r0 contain?
0x00000000FFFFFFF6 or 0xFFFFFFFFFFFFFFF6
Should there be a sign extend operation when loading the 32bit immediate value into the 64bit unsigned register?
Legacy packet instructions
From: https://lore.kernel.org/bpf/[email protected]/
I think we need to document them as supported in the linux kernel,
but deprecated in general.
The standard might say "implementation defined" meaning that
different run-times don't have to support them.Yeah. If we do the extensions proposal above we could make these
a specific extension as well.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.