stackconf 2024 | Buzzing across the eBPF Landscape and into the Hive by Bill Mulligan

NETWAYS 34 views 72 slides Jul 02, 2024
Slide 1
Slide 1 of 72
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72

About This Presentation

The buzz around the Linux kernel technology eBPF is growing quickly and it can be hard to know where to start or how to keep up with this technology that is reshaping our infrastructure stack. In this talk, Bill will trace how he got into eBPF, explore some of the applications leveraging eBPF today,...


Slide Content

Buzzing Across the eBPF
Landscape and Into the
Hive
Bill Mulligan | @breakawaybilly
Community Pollinator, Isovalent at Cisco

@breakawaybilly

@breakawaybilly
A Vision for eBPF Inside

eBPF
Buzz or Byte?

@breakawaybilly
Kernel Space/User Space “Paradox”
●Kernel: System awareness,
but lacks flexibility
●User space:
Programmable, but no
direct access to kernel
structures, resources
●Kernel modules: Difficult,
unsafe, not stable
Flexibility
Performance
Visibility

@breakawaybilly
Kernel Space/User Space “Paradox”
Can we have programmability in
the kernel?


Flexibility
Performance
Visibility

@breakawaybilly
What is ?

@breakawaybilly
What is ?
eBPF makes the Linux kernel programmable

@breakawaybilly
Makes the Linux kernel
programmable in a secure
and efficient way.
“What JavaScript is to the
browser, eBPF is to the
Linux Kernel”

@breakawaybilly
"BPF has actually been really useful, and the real power of it
is how it allows people to do specialized code that isn't
enabled until asked for"
- Linus Torvalds

Dynamically Change Kernel
Behavior

@breakawaybilly

@breakawaybilly

@breakawaybilly
“Superpowers for Linux”
- Brendan Gregg

@breakawaybilly
Vision

@breakawaybilly
eBPF is the Cloud Native App Store
https://commons.wikimedia.org/wiki/File:Steve_Jobs_presents_iPhone.jpg

Safe and Performant
Changes to Kernel Behavior

@breakawaybilly
Run eBPF programs on events
Attachment points
●Kernel functions (kprobes)
●Userspace functions
(uprobe)
●System calls
●Tracepoints
●Sockets (data level)
●Network devices (packet
level)
●Network device (DMA
level) [XDP]
●...

@breakawaybilly
Safety: eBPF Verifier
●Programs will run to completion
●Does not crash or otherwise harm the system
●Only priviledged users allowed to load

@breakawaybilly
Performance: In Kernel & JIT Compiler
●Translate program bytecode into the machine specific
instruction set to optimize execution speed of the program
●Runs as efficiently as natively compiled kernel code

@breakawaybilly
Performance

@breakawaybilly
Shared Memory: BPF maps
Between eBPF programs and between kernel and user space
●No data loss
●More performant

eBPF
Today

userspace
kernel
network call
read file
run process
podcontainer
pod containercontainer
One kernel
per host

@breakawaybilly
userspace
kernel
app
app
pods
networking
access files
create
containersKernel aware of
everything on the
host

userspace
app
kernel
app
pods
network call
read file
run process
eBPF programs
can see
everything
userspace
podcontainer
pod containercontainer

userspace
app
kernel
app
pods
network call
read file
run process
eBPF programs
can see
everything
No changes to
code or config
userspace
podcontainer
pod containercontainer

Flexibility
Performance
Visibility
eBPF in Kernel Space
In the kernel but flexible

Safety, performance, observability,
and programmability

Available by default

Real world
Use Cases

Networking

-Networking
-Security
-Observability
-Service Mesh & Ingress
-based:
Foundation Technology
31
Over 120 USERS.md entries

Vision
Inent & identity-based, high performance
container networking platform built using eBPF
The Beginning

Network Security 1.0

Cluster Mesh
Adding reach to end-to-end network security and observability

Load Balancer
Adding reach to end-to-end network security and observability

@breakawaybilly
Observability

Hubble

eBPF networking +
observability
$ hubble observe --namespace demo-app --label "app=frontend" --protocol tcp

Oct 12 06:06:05.907: demo-app/frontend-5f47758b4c-ltk46: 55028 (ID:14943) ->
demo-app/worker-dcdc797d9-n9fj2: 8000 (ID:15426) policy-verdict:L3-L4 ALLOWED (TCP Flags: SYN)
Oct 12 06:06:05.907: demo-app/frontend-5f47758b4c-ltk46: 55028 (ID:14943) ->
demo-app/worker-dcdc797d9-n9fj2: 8000 (ID:15426) policy-verdict:L3-L4 ALLOWED (TCP Flags: SYN)
Oct 12 06:06:05.907: demo-app/frontend-5f47758b4c-ltk46: 55028 (ID:14943) ->
demo-app/worker-dcdc797d9-n9fj2: 8000 (ID:15426) to-endpoint FORWARDED (TCP Flags: SYN)
Oct 12 06:06:06.920: demo-app/frontend-5f47758b4c-ltk46: 55028 (ID:14943) ->
demo-app/worker-dcdc797d9-n9fj2: 8000 (ID:15426) to-endpoint FORWARDED (TCP Flags: SYN)
Oct 12 06:06:08.934: demo-app/frontend-5f47758b4c-ltk46: 55028 (ID:14943) ->
demo-app/worker-dcdc797d9-n9fj2: 8000 (ID:15426) to-endpoint FORWARDED (TCP Flags: SYN)

eBPF networking +
observability

@breakawaybilly
Security

apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "etc-files"
spec:
kprobes:
- call: "fd_install"

matchArgs:
- index: 1
operator: "Prefix"
values:
- "/etc/"


$ kubectl logs ds/tetragon -c export-stdout -f | tetragon
observe
?????? process default/xwing /usr/bin/vi /etc/passwd
?????? open default/xwing /usr/bin/vi /etc/passwd
?????? close default/xwing /usr/bin/vi
?????? open default/xwing /usr/bin/vi /etc/passwd
?????? write default/xwing /usr/bin/vi /etc/passwd 1275 bytes
?????? close default/xwing /usr/bin/vi
?????? exit default/xwing /usr/bin/vi /etc/passwd 0
Security observability

Runtime Enforcement

Security Observability &
Runtime Enforcement
43

@breakawaybilly
Tracing and Profiling

@breakawaybilly
Tracing and Profiling

@breakawaybilly
eBPF tools provide rich,
context-aware event streams

eBPF everything???
Or not?

@breakawaybilly
Still not a magic bullet

userspace
kernel
network call
read file
run process
podcontainer
pod containercontainer
“Add product X to cart”
open file 345
forward packet to 6.7.8.9
read file 111
create a socket


query service A
write to database

●eBPF doesn’t have business context!
●Requires kernel knowledge
●the data volume can be absurd
eBPF is challenging

Buzzing
Community

@breakawaybilly
Kernel Community
Happy 10th Birthday ??????

@breakawaybilly
eBPF Landscape

@breakawaybilly
eBPF
Landscape

@breakawaybilly
eBPF Landscape

@breakawaybilly
eBPF Acquisitions
•Flowmill ➡ Splunk (November 2020) Security
•Kinvolk ➡ Microsoft (April 2021) Observability
•Pixie ➡ New Relic (July 2021) Observability
•Cmd ➡ Elastic (October 2021) Security
•Optimyze ➡ Elastic (August 2021) Profiling
•Seekret ➡ Datadog (August 2022) Observability
•Pyroscope ➡ Grafana (March 2023)Profiling
•Akita ➡ Postman (July 2023) Observability
•Isovalent ➡ Cisco (April 2024) Networking, Observability, Security
•StackState ➡ SUSE (June 2024) Observability

@breakawaybilly
eBPF for Windows

@breakawaybilly
eBPF Research Funding

Where to go
Next

@breakawaybilly
eBPF Wikipedia

@breakawaybilly
ebpf.io

@breakawaybilly
ebpf.io
en Frrançais
Italiano
Português
Swahili
Español
繁體中文
简体中文

@breakawaybilly
ebpf.io
Looking for
help
translating

@breakawaybilly
ebpf.io Labs

@breakawaybilly
eBPF Summit
September 11th

@breakawaybilly
eBPF Newsletter

@breakawaybilly
eBPF Documentary - ebpfdocumentary.com

@breakawaybilly
The Illustrated Children’s Guide to eBPF

@breakawaybilly
State of eBPF

A Vision for
eBPF Inside

@breakawaybilly
A Vision for eBPF Inside

Thank you
ebpf.io
@breakawaybilly
ebpf.io
Download from
isovalent.com