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

Dataset string memcap 3910/v15 #11384

Closed
wants to merge 5 commits into from

Conversation

inashivb
Copy link
Member

Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/3910

Previous PR: #11296

Changes since v14:

  • remove THashData size check when checking for memcap for a value dequeued from the spare queue
  • rebased on top of latest master

SV_BRANCH=OISF/suricata-verify#1944

victorjulien and others added 5 commits June 28, 2024 12:07
Add a callback and helper function to handle data expiration.

Update datasets to explicitly not use expiration.
In order to have access to the length of datatypes with variable lengths
to correctly update memuse to calculate memcaps.

Bug 3910
So far, when the data size was passed to the THash API, it was sent as
a sizeof(Struct) which works fine for the other data types as they have
a fixed length but not for the StringType.
However, because of the sizeof construct, the length of a string type
dataset was always taken to be 16 Bytes which is only the size of the struct
itself. It did not accomodate the actual size of the string that the
StringType holds. Fix this so that the memuse that is used to determine
whether memcap was reached also takes into consideration the size of the
actual string.

Bug 3910
@victorjulien
Copy link
Member

Passed my QA. Ran this PR with SV PR OISF/suricata-verify#1944. Local pipeline 4962, run 506.

@victorjulien victorjulien modified the milestone: 8.0 Jun 28, 2024
@victorjulien
Copy link
Member

Will need a rebase after #11394 is merged, got a conflict when trying to stage them together.

@inashivb
Copy link
Member Author

inashivb commented Jul 1, 2024

Will need a rebase after #11394 is merged, got a conflict when trying to stage them together.

JFYI, the conflict is on 5d46096 so I'll wait for the merge of your PR.

@inashivb inashivb closed this Jul 2, 2024
@inashivb inashivb deleted the dataset-string-memcap-3910/v15 branch July 2, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants