Skip to content

Conversation

@ekoops
Copy link
Contributor

@ekoops ekoops commented Sep 9, 2025

What type of PR is this?

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

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind test

/kind feature

Any specific area of the project related to this PR?

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

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This PR fixes the type char evaluation by re-introducing the previously-removed switch cases for pipe, pipe2, eventfd, eventfd2, signalfd, signalfd4, timerfd_create, inotify_init and inotify_init1.
Contextually, it removes PPME_SOCKET_ACCEPT_E, PPME_SOCKET_ACCEPT_5_E PPME_SOCKET_ACCEPT4_5_E switch cases, as these event types are converted in scap into their latest variants, before reaching sinsp.
Finally, it makes the logic based on exit event types instead of enter events types.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

/milestone 0.22.0

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented Sep 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops

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

The pull request process is described here

Details 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 poiana added the approved label Sep 9, 2025
@ekoops ekoops force-pushed the ekoops/fix-extract-typechar branch from 140cade to 6cf5af0 Compare September 9, 2025 12:25
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

Please double check driver/SCHEMA_VERSION file. See versioning.

/hold

Fix the type char evaluation by re-introducing the previously-removed
switch cases for `pipe`, `pipe2`, `eventfd`, `eventfd2`, `signalfd`,
`signalfd4`, `timerfd_create`, `inotify_init` and `inotify_init1`.
Contextually, remove `PPME_SOCKET_ACCEPT_E`, `PPME_SOCKET_ACCEPT_5_E`
`PPME_SOCKET_ACCEPT4_5_E` switch cases, as these event types are
converted in scap into their latest variants, before reaching sinsp.
Finally, make the logic based on exit event types instead of enter
events types.

Signed-off-by: Leonardo Di Giovanna <[email protected]>
@ekoops ekoops force-pushed the ekoops/fix-extract-typechar branch from 6cf5af0 to 44d5e9a Compare September 9, 2025 12:30
@ekoops ekoops changed the title fix(userspace/libsinsp)): fix sinsp_evt::extract_typechar() logic fix(userspace/libsinsp): fix sinsp_evt::extract_typechar() logic Sep 9, 2025
@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.06%. Comparing base (7c40230) to head (44d5e9a).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
userspace/libsinsp/event.h 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2619      +/-   ##
==========================================
- Coverage   78.09%   78.06%   -0.03%     
==========================================
  Files         298      298              
  Lines       31976    31988      +12     
  Branches     4696     4696              
==========================================
  Hits        24972    24972              
- Misses       7004     7016      +12     
Flag Coverage Δ
libsinsp 78.06% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@poiana poiana added the lgtm label Sep 9, 2025
@leogr
Copy link
Member

leogr commented Sep 9, 2025

Please double check driver/SCHEMA_VERSION file. See versioning.

/hold

/unhold

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Sep 9, 2025
@poiana poiana merged commit 534bc09 into falcosecurity:master Sep 9, 2025
56 of 59 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Sep 9, 2025
@ekoops ekoops deleted the ekoops/fix-extract-typechar branch September 9, 2025 13:32
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

Perf diff from master - unit tests

     5.52%     -0.46%  [.] sinsp_parser::reset
     1.55%     -0.28%  [.] libsinsp::sinsp_suppress::process_event
     1.29%     +0.27%  [.] sinsp::fetch_next_event
     1.41%     +0.22%  [.] scap_event_decode_params
     8.21%     -0.21%  [.] sinsp::next
     6.03%     -0.20%  [.] sinsp_evt::get_type
     3.11%     -0.18%  [.] gzfile_read
     5.75%     -0.16%  [.] sinsp_thread_manager::find_thread
     3.92%     +0.16%  [.] std::_Hashtable<unsigned long, std::pair<unsigned long const, std::shared_ptr<ppm_evt_hdr> >, std::allocator<std::pair<unsigned long const, std::shared_ptr<ppm_evt_hdr> > >, std::__detail::_Select1st, std::equal_to<unsigned long>, std::hash<unsigned long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     1.58%     +0.15%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: -753.30K

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            -0.0007         -0.0007           152           152           152           152
BM_sinsp_split_median                                          +0.0033         +0.0033           151           152           151           152
BM_sinsp_split_stddev                                          -0.3509         -0.3512             3             2             3             2
BM_sinsp_split_cv                                              -0.3505         -0.3508             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.1300         +0.1300            54            61            54            61
BM_sinsp_concatenate_paths_relative_path_median                +0.1461         +0.1461            52            60            52            60
BM_sinsp_concatenate_paths_relative_path_stddev                -0.4700         -0.4699             2             1             2             1
BM_sinsp_concatenate_paths_relative_path_cv                    -0.5310         -0.5308             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0154         +0.0154            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0117         +0.0117            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +2.4917         +2.4960             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +2.4387         +2.4429             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0613         +0.0613            60            64            60            64
BM_sinsp_concatenate_paths_absolute_path_median                +0.0588         +0.0588            60            64            60            64
BM_sinsp_concatenate_paths_absolute_path_stddev                +1.1494         +1.1498             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +1.0253         +1.0256             0             0             0             0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants