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

Cherry-pick #22787 to 7.10: system/socket: Add ip_local_out alternative #22870

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Dec 2, 2020

Cherry-pick of PR #22787 to 7.10 branch. Original message:

What does this PR do?

This PR adds a new function alternative, __ip_local_out for selecting a proper ip_local_out function, and fixes guess_ip_local_out logic in order to account for this new function.

The new order of precedence is:

  • ip_local_out_sk (kernels before 3.16)
  • __ip_local_out (for kernels where ip_local_out calls are inlined)
  • ip_local_out (all others).

Why is it important?

In some systems, the socket dataset won't start with an error:

unable to guess one or more required parameters: guess_ip_local_out failed: timeout while waiting for event

This is caused by Auditbeat expecting a kprobe set to ip_local_out to trigger, but it never does. The reason is that calls to this function might have been inlined. In those cases we need to attach the kprobe to __ip_local_out instead.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Relates #18755

This commit adds a new function alternative, `__ip_local_out` for selecting
a proper ip_local_out function, and fixes `guess_ip_local_out` logic in
order to account for this new function.

The new order of precedence is:
- ip_local_out_sk (kernels before 3.16)
- __ip_local_out (for kernels where ip_local_out calls are inlined)
- ip_local_out (all others).

Relates elastic#18755

(cherry picked from commit b627fb7)
@adriansr adriansr requested a review from a team as a code owner December 2, 2020 19:42
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 2, 2020
@adriansr adriansr requested review from a team and removed request for a team December 2, 2020 19:43
@adriansr adriansr added the review label Dec 2, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #22870 opened

  • Start Time: 2020-12-02T19:43:26.630+0000

  • Duration: 26 min 49 sec

Test stats 🧪

Test Results
Failed 0
Passed 228
Skipped 33
Total 261

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 228
Skipped 33
Total 261

@adriansr adriansr merged commit 3662d95 into elastic:7.10 Dec 3, 2020
@zube zube bot removed the [zube]: Done label Mar 4, 2021
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.

3 participants