Comments (3)
pwru attaches to kernel functions that take a sk_buff
as a parameter. Depending on which parameter hold the sk_buff
, a different kprobe program needs to be used. For example, if the sk_buff
is the second parameter, kprobe/skb-2
will be used since PT_REGS_PARM2
retrieves the second parameter from the CPU registers. If it's the fourth parameter, then kprobe/skb-4
is used, etc.
from pwru.
It extracts from the kernel BTF: https://github.com/cilium/pwru/blob/master/internal/pwru/utils.go#L15
from pwru.
pwru attaches to kernel functions that take a
sk_buff
as a parameter. Depending on which parameter hold thesk_buff
, a different kprobe program needs to be used. For example, if thesk_buff
is the second parameter,kprobe/skb-2
will be used sincePT_REGS_PARM2
retrieves the second parameter from the CPU registers. If it's the fourth parameter, thenkprobe/skb-4
is used, etc.
Makes sense. However, I am having trouble understanding some parts of the userspace code. How do you decide what these functions are?
from pwru.
Related Issues (20)
- IPv6 filtering is broken
- Release script fails to create group HOT 1
- Add large GHA runner to replace self-hosted
- How to uninstall all probes after a ssh disconnection? HOT 1
- IPv6 L4 Protocol HOT 1
- Enable kprobe-multi backend for kernel modules tracing (--kmods)
- Add datetime to the output HOT 2
- a few minutes delay to complete the pwru multi kprobe attachment HOT 16
- IPv6 filter-src-ip/filter-dst-ip does not filter packets HOT 2
- no BTF found for kernel HOT 2
- pwru fails to run if compiled on machine with more CPUs than target HOT 2
- Long start time on bpf-next (6.4-rc3) HOT 5
- Track SKB clones HOT 6
- Failed to --output-skb on Ubuntu 23.04 HOT 4
- kprobe_pwru.c:set_tuple() reads wrong L4 for ESP on some kprobes HOT 2
- "make release" fails: ln: failed to create symbolic link './clang': File exists
- release.yaml: Cross compile libpcap.a for arm64
- Update vendored cilium/ebpf
- Use clang for libpcap and CGO compilation HOT 5
- Can this watch arp request? HOT 3
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.
from pwru.