Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code not matching the comment #223

Merged
merged 1 commit into from
Jul 10, 2023
Merged

Fix code not matching the comment #223

merged 1 commit into from
Jul 10, 2023

Conversation

mozillazg
Copy link
Contributor

@mozillazg mozillazg commented Jul 8, 2023

Signed-off-by: mozillazg <mozillazg101@gmail.com>
@@ -162,7 +162,7 @@ func InjectFilter(program *ebpf.ProgramSpec, filterExpr string) (err error) {
// stack area is safe to use. Here we use stack from -40
// because -32, -24, -16 are reserved for pcap-filter ebpf, see
// the comments in compile.go
StackOffset: 40,
StackOffset: 32,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right.

StackOffset: 32 means cloudfare/cbpfc is able to use stack area from r10-32 downwards, in another word, the first available stack pointer points to r10-40. Your change made it in line with the real situation, thanks.

@brb brb merged commit fe0c59f into cilium:main Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants