eBPF


  1.  eBPF programme in C, Rust or other programming languages. 
  2. Compiler converts it to bytecode (obj file)
  3. Application pass this OBJ to kernel using  eBPF library
  4. Kernel verifies it
  5. When event happens the program runs


  1.  eBPF programme in C, Rust or other programming languages. 
  2. Compiler converts it to bytecode (obj file)
  3. Application pass this OBJ to kernel using  eBPF library
  4. Kernel verifies it
  5. JIT compiler converts byte code to machine code
  6. When event happens the program runs

  1.  eBPF programme in C, Rust or other programming languages. 
  2. Compiler converts it to bytecode (obj file)
  3. Application pass this OBJ to kernel using  eBPF library
  4. Kernel verifies it
  5. JIT compiler converts byte code to machine code
  6. When event happens the program runs
  7. Multiple eBPF programs can access eBPF map at Kernel space
    1. Userspace App load config to map
    2. eBPF program pull config from map
    3. eBPF program sends metrics to map
    4. eBPF program stores/retrieve data from/to map
    5. eBPF map can store state in eBPF program
Different types of map
  • BPF_TABLE
  • BPF_HASH
  • BPF_ARRAY
  • BPF_HISTOGRAM
  • BPF_PERF_ARRAY
  1.  eBPF programme in C, Rust or other programming languages. 
  2. Compiler converts it to bytecode (obj file)
  3. Application pass this OBJ to kernel using  eBPF library
  4. Kernel verifies it
  5. JIT compiler converts byte code to machine code
  6. When event happens the program runs
  7. Multiple eBPF programs can access eBPF map at Kernel space
    1. Userspace App load config to map
    2. eBPF program pull config from map
    3. eBPF program sends metrics to map
    4. eBPF program stores/retrieve data from/to map
    5. eBPF map can store state in eBPF program
Different types of map
  • BPF_TABLE
  • BPF_HASH
  • BPF_ARRAY
  • BPF_HISTOGRAM
  • BPF_PERF_ARRAY
  1. eBPF program can call Kernel function (eBPF helper) 

UseCases

* Networking
- side car container networking by Cilium CNI

* Performance / Tracing (observability) 
- Hubble Network, Service & Security Observability for Kubernetes GitHub - cilium/hubble: Hubble - Network, Service & Security Observability for Kubernetes using eBPF

* Security examples along with Linux Security Modules (LSM)
- Falco http://layers7.blogspot.com/2021/12/7-workload-considerations-falco.html 
- Tetragon https://tetragon.io/
- Tracee https://layers7.blogspot.com/2021/11/7-workload-considerations-tracee.html


eBPF "Compile Once — Run Everywhere" (CO-RE) leverages BPF Type Format (BTF) : portable programs acorss kernel versions. 


Reference:


Other References:








0 comments:

Post a Comment