Project: DeepFlow (Observability and Analysis / Observability)
File: kernel-versions.md

Kernel version | Commit |- 3.15 | The list of supported architectures for your kernel can be retrieved with: git grep HAVEEBPFJIT arch/ Feature / Architecture | Kernel version | Commit --|-|- x86\_64 | 3.16 | ARM64 | 3.18 | Several (but not all) of these main features translate to an eBPF program type. The list of such program types supported in your kernel can be found in file : git grep -W 'bpfprogtype {' include/uapi/linux/bpf.h Feature | Kernel version | Commit --|-|- Kernel helpers | 3.15 | `bpf()` syscall | 3.18 | Maps | 3.18 | BPF attached to `kprobes` | 4.1 | Tail calls | 4.2 | Persistent maps and programs (virtual FS) | 4.4 | BPF attached to tracepoints | 4.7 | BPF attached to perf events | 4.9 | Verifier exposure and internal hooks | 4.9 | BPF program tag | 4.10 | Tracepoints to debug BPF | 4.11 (removed in 4.18) | Testing / benchmarking BPF programs | 4.12 | BPF programs and maps IDs | 4.13 | Program type | Kernel version | Commit | Enum -|-|--|-- Kprobe | 4.1 | | BPFPROGTYPE_KPROBE Tracepoint | 4.7 | | BPFPROGTYPE_TRACEPOINT Perf event | 4.9 | | BPFPROGTYPEPERFEVENT The list of map types supported in your kernel can be found in file : git grep -W 'bpfmaptype {' include/uapi/linux/bpf.h Map type | Kernel version | Commit | Enum -|-|--| Hash | 3.19 | | BPFMAPTYPE_HASH Array | 3.19 | | BPFMAPTYPE_ARRAY Prog array | 4.2 | | BPFMAPTYPEPROGARRAY Perf events | 4.3 | | BPFMAPTYPEPERFEVENT_ARRAY Per-CPU hash | 4.6 | | BPFMAPTYPEPERCPUHASH Per-CPU array | 4.6 | | BPFMAPTYPEPERCPUARRAY Stack trace | 4.6 | | BPFMAPTYPESTACKTRACE LRU hash | 4.10 | | BPFMAPTYPELRUHASH LRU per-CPU hash | 4.10 | | BPFMAPTYPELRUPERCPU_HASH LPM trie (longest-prefix match) | 4.11 | | BPFMAPTYPELPMTRIE Array of maps | 4.12 | | BPFMAPTYPEARRAYOF_MAPS Hash of maps | 4.12 | | BPFMAPTYPEHASHOF_MAPS Some (but not all) of these API features translate to a subcommand beginning with `BPFMAP`. The list of subcommands supported in your kernel can be found in file : git grep -W 'bpf_cmd {'

Feature | Kernel version | Commit --|-|- Basic operations (lookup, update, delete, `GETNEXTKEY`) | 3.18 | Pass flags to `UPDATE_ELEM` | 3.19 | Pre-alloc map memory by default | 4.6 | Pass `NULL` to `GETNEXTKEY` | 4.12 | Creation: select NUMA node | 4.14 | The list of helpers supported in your kernel can be found in file : git grep ' FN(' include/uapi/linux/bpf.h Alphabetical order Helper | Kernel version | License | Commit | -|-||--| `BPFFUNCgetsmpprocessor_id()` | 4.1 | | `BPFFUNCget_stack()` | 4.18 | GPL | `BPFFUNCget_stackid()` | 4.6 | GPL | `BPFFUNCktimegetns()` | 4.1 | | `BPFFUNCmapdeleteelem()` | 3.19 | | `BPFFUNCmaplookupelem()` | 3.19 | | `BPFFUNCmapupdateelem()` | 3.19 | | `BPFFUNCperfeventoutput()` | 4.4 | GPL | `BPFFUNCperfeventread()` | 4.3 | GPL | `BPFFUNCprobe_read()` | 4.1 | GPL | `BPFFUNCprobereadstr()` | 4.11 | GPL | `BPFFUNCprobewriteuser()` | 4.8 | GPL | `BPFFUNCset_hash()` | 4.13 | | `BPFFUNCsethashinvalid()` | 4.9 | | `BPFFUNCtail_call()` | 4.2 | | `BPFFUNCtrace_printk()` | 4.1 | GPL | Note: GPL-only BPF helpers require a GPL-compatible license. The current licenses considered GPL-compatible by the kernel are: GPL GPL v2 GPL and additional rights Dual BSD/GPL Dual MIT/GPL Dual MPL/GPL Check the list of GPL-compatible licenses in your . The list of program types and supported helper functions can be retrieved with: git grep -W 'funcproto(enum bpffuncid funcid' kernel/ net/ drivers/ |Program Type| Helper Functions| ||--| |`BPFPROGTYPEKPROBE`|`BPFFUNCperfeventoutput()` <br> `BPFFUNCgetstackid()` <br> `BPFFUNCgetstack()` <br> `BPFFUNCperfeventreadvalue()` <br> `BPFFUNCoverride_return()` <br> `Tracing functions`| |`BPFPROGTYPETRACEPOINT`|`BPFFUNCperfeventoutput()` <br> `BPFFUNCgetstackid()` <br> `BPFFUNCgetstack()` <br> `BPFFUNCdpath()` <br> `Tracing functions`| |`BPFPROGTYPEPERFEVENT`| `BPFFUNCperfeventoutput()` <br> `BPFFUNCgetstackid()` <br> `BPFFUNCgetstack()` <br> `BPFFUNCperfprogread_value()` <br> `Tracing functions`| |Function Group| Functions| ||-| |`Base functions`| `BPFFUNCmaplookupelem()` <br> `BPFFUNCmapupdateelem()` <br> `BPFFUNCmapdeleteelem()` <br> `BPFFUNCmappeekelem()` <br> `BPFFUNCmappopelem()` <br> `BPFFUNCmappushelem()` <br> `BPFFUNCgetprandomu32()` <br> `BPFFUNCgetsmpprocessorid()` <br> `BPFFUNCgetnumanodeid()` <br> `BPFFUNCtailcall()` <br> `BPFFUNCktimegetbootns()` <br> `BPFFUNCktimegetns()` <br> `BPFFUNCtraceprintk()` <br> `BPFFUNCspinlock()` <br> `BPFFUNCspin_unlock()` | |`Tracing functions`|`BPFFUNCmaplookupelem()` <br> `BPFFUNCmapupdateelem()` <br> `BPFFUNCmapdeleteelem()` <br> `BPFFUNCproberead()` <br> `BPFFUNCktimegetbootns()` <br> `BPFFUNCktimegetns()` <br> `BPFFUNCtailcall()` <br> `BPFFUNCgetcurrentpidtgid()` <br> `BPFFUNCgetcurrenttask()` <br> `BPFFUNCgetcurrentuidgid()` <br> `BPFFUNCgetcurrentcomm()` <br> `BPFFUNCtraceprintk()` <br> `BPFFUNCgetsmpprocessorid()` <br> `BPFFUNCgetnumanodeid()` <br> `BPFFUNCperfeventread()` <br> `BPFFUNCprobewriteuser()` <br> `BPFFUNCgetprandomu32()` <br> `BPFFUNCprobereadstr()` <br> `BPFFUNCsendsignal()` <br> `BPFFUNCprobereadkernel()` <br> `BPFFUNCprobereadkernelstr()` <br> `BPFFUNCprobereaduser()` <br> `BPFFUNCprobereaduserstr()` <br> `BPFFUNCsendsignalthread()` <br> `BPFFUNCgetnscurrentpidtgid()` <br> `BPFFUNCgettask_stack()`| ``` CONFIG_BPF=y CONFIGBPFSYSCALL=y CONFIGBPFJITALWAYSON=y CONFIGBPFJIT=y CONFIGHAVEEBPF_JIT=y CONFIGBPFEVENTS=y CONFIGHAVESYSCALL_TRACEPOINTS=y CONFIGFTRACESYSCALLS=y (/sys/kernel/debug/tracing/events/syscalls/) CONFIG_KPROBES=y CONFIGHAVEKPROBES=y CONFIGKPROBEEVENTS=y CONFIG_UPROBES=y CONFIGUPROBEEVENTS=y ```