Conversation
Owner
Author
|
As an experiment: @copilot what do you think? |
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies small “errata” cleanups across the eBPF examples, mainly making array handling more idiomatic when passing stack buffers to BPF helpers and slightly tidying user-space output formatting.
Changes:
- Remove unnecessary address-of (
&) when passing array fields (e.g.,data.message,data.command,data.path) into BPF helper calls across multiple examples. - Minor user-space output tweak in
find-map.cto print a more readable label.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| chapter7/hello.bpf.c | Updates helper-call buffer arguments to use array decay instead of &array. |
| chapter6/hello-verifier.bpf.c | Same array-argument cleanup for helper calls. |
| chapter5/hello-buffer-config.bpf.c | Same array-argument cleanup for comm/path/message reads. |
| chapter5/find-map.c | Adjusts printed label for map name output. |
| chapter4/hello-ring-buffer-config.py | Updates embedded BPF C program to pass arrays without &. |
| chapter4/hello-buffer-config.py | Updates embedded BPF C program to pass arrays without &. |
| chapter2/hello-file-ring-buffer.py | Updates embedded BPF C program to pass arrays without &. |
| chapter2/hello-buffer.py | Updates embedded BPF C program to pass arrays without &. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liz Rice <liz@lizrice.com>
Ensure path is null-terminated Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liz Rice <liz@lizrice.com>
lizrice
commented
Mar 23, 2026
Signed-off-by: Liz Rice <liz@lizrice.com>
Signed-off-by: Liz Rice <liz@lizrice.com>
Owner
Author
|
@copilot any more comments? |
Contributor
…and chapter7 Co-authored-by: lizrice <458616+lizrice@users.noreply.github.com> Agent-Logs-Url: https://github.com/lizrice/learning-ebpf/sessions/4a8ea66b-0d3b-43f5-8b94-bfadc211cd96
Use bpf_probe_read_*_str for all string buffer reads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.