-
Notifications
You must be signed in to change notification settings - Fork 165
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(modern): try to address a page fault caused by bpf_probe_read_kernel
#1858
Merged
poiana
merged 4 commits into
falcosecurity:master
from
Andreagit97:fix_kernel_fault_vsyscall
May 13, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cdbd5ab
cleanup(modern): remove no more needed macro definition
Andreagit97 2a9f3c7
new(modern): add `likely` `unlikely` definitions
Andreagit97 a5d1950
fix(modern): add some safety checks on struct* file
Andreagit97 03e4ec2
fix: use `vtid` instead of `vpid`
Andreagit97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,11 @@ static __always_inline uint16_t maps__get_statsd_port() | |
return g_settings.statsd_port; | ||
} | ||
|
||
static __always_inline int32_t maps__get_scap_tid() | ||
{ | ||
return g_settings.scap_tid; | ||
} | ||
|
||
/*=============================== SETTINGS ===========================*/ | ||
|
||
/*=============================== KERNEL CONFIGS ===========================*/ | ||
|
@@ -76,6 +81,16 @@ static __always_inline void maps__set_is_dropping(bool value) | |
is_dropping = value; | ||
} | ||
|
||
static __always_inline void* maps__get_socket_file_ops() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now this info is only in kernel space |
||
{ | ||
return socket_file_ops; | ||
} | ||
|
||
static __always_inline void maps__set_socket_file_ops(void* value) | ||
{ | ||
socket_file_ops = value; | ||
} | ||
|
||
/*=============================== KERNEL CONFIGS ===========================*/ | ||
|
||
/*=============================== SAMPLING TABLES ===========================*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#if defined(__x86_64__) || defined(__EMSCRIPTEN__) | ||
#include "syscall_compat_x86_64.h" | ||
#elif defined(__aarch64__) | ||
#include "syscall_compat_aarch64.h" | ||
#elif defined(__s390x__) | ||
#include "syscall_compat_s390x.h" | ||
#elif defined(__powerpc__) | ||
#include "syscall_compat_ppc64le.h" | ||
#elif defined(__riscv) | ||
#include "syscall_compat_riscv64.h" | ||
#elif defined(__loongarch__) | ||
#include "syscall_compat_loongarch64.h" | ||
#endif /* __x86_64__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now we use libbpf 1.3 so this macro shouldn't be necessary