-
Notifications
You must be signed in to change notification settings - Fork 168
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
feat(libsinsp_e2e): add unix_udp_client_server_read test #2231
Conversation
f0cafa7
to
19036af
Compare
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2231 +/- ##
=======================================
Coverage 75.09% 75.09%
=======================================
Files 276 276
Lines 34391 34391
Branches 5927 5927
=======================================
Hits 25826 25826
Misses 8565 8565
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
19036af
to
7e8e51c
Compare
Thanks @therealbobo ! Since this PR highlights a test failure we should try to fix it up before the 0.20.0 release. |
Signed-off-by: Roberto Scolaro <[email protected]>
7e8e51c
to
38e20c8
Compare
In the meantime, i rebased the PR on latest master. |
/hold |
a056f3c
to
78aa54d
Compare
driver/bpf/filler_helpers.h
Outdated
// The first byte to 0 can be confused with an `abstract socket address` for this reason | ||
// we put also the second byte to 0 to comunicate to the caller that the address is not | ||
// valid. | ||
sunaddr->sun_path[1] = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same fix applied in #2215 for kmod.
@@ -776,7 +776,7 @@ static __always_inline void auxmap__store_socktuple_param(struct auxiliary_map * | |||
|
|||
case AF_UNIX: { | |||
struct unix_sock *socket_local = (struct unix_sock *)sk; | |||
struct unix_sock *socket_remote = (struct unix_sock *)BPF_CORE_READ(socket_local, peer); | |||
struct unix_sock *socket_peer = (struct unix_sock *)BPF_CORE_READ(socket_local, peer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A rename.
unsigned long start_reading_point; | ||
char first_path_byte = *(char *)path; | ||
if(first_path_byte == '\0') { | ||
if(path[0] == '\0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid convoluted logic with multiple variables involved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have the suspect it was used to avoid some verifier madness, but let's see 🤞
@@ -861,6 +861,11 @@ static struct socket *ppm_sockfd_lookup_light(int fd, int *err, int *fput_needed | |||
*/ | |||
|
|||
static void unix_socket_path(char *dest, const char *path, size_t size) { | |||
if(path == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid de-referencing a possibly null ptr.
… paths handling in drivers. Signed-off-by: Federico Di Pierro <[email protected]>
50bc294
to
e1baab6
Compare
unsigned long start_reading_point; | ||
char first_path_byte = *(char *)path; | ||
if(first_path_byte == '\0') { | ||
if(path[0] == '\0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have the suspect it was used to avoid some verifier madness, but let's see 🤞
… data is missing. Signed-off-by: Federico Di Pierro <[email protected]> Co-authored-by: Andrea Terzolo <[email protected]>
e1baab6
to
258aa7e
Compare
X64 matrix; same failures we see on master (related to #2027) :/
Will try to fix them in this same PR. |
Signed-off-by: Andrea Terzolo <[email protected]>
… to avoid limit size failures. Signed-off-by: Federico Di Pierro <[email protected]>
f2d861b
to
600fefb
Compare
Latest kernel matrix is finally back green 🚀
|
/unhold |
LGTM label has been added. Git tree hash: fed2fa492496b13098a891d9d9fe081a27d43f43
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, therealbobo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: