libs icon indicating copy to clipboard operation
libs copied to clipboard

Support for big endian capture files

Open deepskyblue86 opened this issue 3 years ago • 7 comments

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area libscap

/area libsinsp

What this PR does / why we need it: Support for big endian capture files

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

feat: support for big endian capture files

deepskyblue86 avatar Jul 05 '22 17:07 deepskyblue86

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepskyblue86 To complete the pull request process, please assign ldegio after the PR has been reviewed. You can assign the PR to them by writing /assign @ldegio in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

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

poiana avatar Jul 06 '22 17:07 poiana

@jasondellaluce should I do anything about plugins?

deepskyblue86 avatar Jul 07 '22 08:07 deepskyblue86

@deepskyblue86 plugin events are not parsed by sinsp, and their events are regular sinsp_evts. Contents of the plugin event blocks are just accessed through sinsp_evt::get_type() and sinsp_evt::get_param(), so as long as we have them adapted we should be good to go.

jasondellaluce avatar Jul 07 '22 11:07 jasondellaluce

@jasondellaluce sinsp_evt::get_param doesn't know about the underlying type, so maybe the plugin owners will have to deal with the decoding themselves? :thinking:

deepskyblue86 avatar Jul 07 '22 13:07 deepskyblue86

As discussed privately with @deepskyblue86 , I don't think consumers of sinsp_evt should be aware of these changes. I think the endianess swap might be performed directly within sinsp_evt when decoding the parameters. The type of each parameter can be found by a simple array lookup to the g_event_info table.

This has the benefit of segregating all the logic in the same place from the perspective of libsinsp, and can potentially also be disabled while consuming events in live mode so that we don't add any overhead in that case.

jasondellaluce avatar Jul 07 '22 15:07 jasondellaluce

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

:memo: Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • f35d6a4 fix: scap_get_swap_endian ptr check

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

poiana avatar Jul 07 '22 15:07 poiana

A similar approach (using the event table and resolve endianess issues inside sinsp_evt) has been used in https://github.com/falcosecurity/libs/pull/551.

jasondellaluce avatar Aug 25 '22 10:08 jasondellaluce

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Nov 23 '22 15:11 poiana

/milestone 0.11.0

FedeDP avatar Dec 02 '22 13:12 FedeDP

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

poiana avatar Jan 01 '23 15:01 poiana

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana avatar Jan 31 '23 15:01 poiana

@poiana: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

poiana avatar Jan 31 '23 15:01 poiana