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(libsinsp): fix regression in signed comparison #1905

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

LucaGuerra
Copy link
Contributor

@LucaGuerra LucaGuerra commented Jun 12, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area libsinsp

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

Libs 0.17.0 had some changes in numeric compare and casting. However, it looks like we are now doing unsigned comparison even if the data is signed, meaning that sinsp is thinking that -1 > 10000. This requires a bit of testing to see if it is the case but we need to fix it for the next patch release. Also cover comparisons with tests.

See: falcosecurity/falco#3245

/milestone 0.17.2

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix(libsinsp): fix signed compare operator

jasondellaluce
jasondellaluce previously approved these changes Jun 12, 2024
@poiana
Copy link
Contributor

poiana commented Jun 12, 2024

LGTM label has been added.

Git tree hash: 06048a84b35a1ecb6b3005c344d01d4078e1bb47

@FedeDP
Copy link
Contributor

FedeDP commented Jun 12, 2024

/hold

@LucaGuerra
Copy link
Contributor Author

/hold

adding a couple test to make sure this is actually fixed

@LucaGuerra LucaGuerra force-pushed the fix/signed_numeric_comparison branch from f69be8c to 90df565 Compare June 12, 2024 17:40
@LucaGuerra
Copy link
Contributor Author

/unhold

Copy link
Contributor

@incertum incertum left a comment

Choose a reason for hiding this comment

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

/approve

Nice job!

@jasondellaluce could you re-approve?

@poiana
Copy link
Contributor

poiana commented Jun 12, 2024

LGTM label has been added.

Git tree hash: 19fe676a31a4e0be180f14aaaddf7329d75ffc31

@poiana
Copy link
Contributor

poiana commented Jun 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: incertum, leogr, LucaGuerra

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:
  • OWNERS [LucaGuerra,incertum,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 774db6b into falcosecurity:master Jun 13, 2024
40 checks passed
@LucaGuerra LucaGuerra deleted the fix/signed_numeric_comparison branch June 13, 2024 09:01
@FedeDP FedeDP mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants