-
Notifications
You must be signed in to change notification settings - Fork 326
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
matchBinaries improvements #686
Commits on Feb 24, 2023
-
There are some issues regarding matchBinaries. In this patch we still support up to 4 values in matchBinaries. Increasing this will be a followup. For matchBinaries, we use names_map that has binary names to id translations. During exec events we check if the binary name exists in this map and if that is true we keep that id in the execve_map_value struct. Now we write in the matchBinaries selectors the value 1 everywhere. To fix that we introduce a single global variable that get a new unique ID for each binary specified. We cannot use a separate names_map for each kprobe as they should also be shared with the execve kprobe. We keep a single names_map for all kprobes. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1ca4828 - Browse repository at this point
Copy the full SHA 1ca4828View commit details -
Increase the number of values in matchBinaries
Before that we had a limit to 4 values in the matchBinaries selector. This patch uses a map per kprobe (sel_names_map) to remove this limitation. The current limit is 256 values (the size of the map) and should be enough for all cases. As a follow-up we can also clear entries from the (shared) names_map when we remove kprobes. For now we also increase the size of that map to 256 entries. This means that we can define up to 256 unique binary names among all matchBinaries selectors. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 87f94db - Browse repository at this point
Copy the full SHA 87f94dbView commit details -
Add NotIn operator for matchBinaries
For now we only supported In operator in matchBinaries. This patch adds support for the NotIn operator. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 84e71d2 - Browse repository at this point
Copy the full SHA 84e71d2View commit details -
Fix names_map update in generic tracepoints
After loading a tracepoint program we should update names_map with new enties in a similar way to kprobes. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ceec3cc - Browse repository at this point
Copy the full SHA ceec3ccView commit details -
Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b5d2ef4 - Browse repository at this point
Copy the full SHA b5d2ef4View commit details -
matchBinaries: Do not match the parent binary
Now, if the process binary does not match these that we have in matchBinaries selector, it will also check the parent binary name. This is not the desired behaviour and this patch removed that. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for eb1a47c - Browse repository at this point
Copy the full SHA eb1a47cView commit details -
matchBinaries: Skip binary check for long binary names
In the case where the binary name is > 255 characters we simply skip the test. In order to support that we have to filter using data events that can be a follow-up. Generally, 255 characters for binary names should be enough in most cases. Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4586261 - Browse repository at this point
Copy the full SHA 4586261View commit details -
Convert max binary size to a define
Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2fc6811 - Browse repository at this point
Copy the full SHA 2fc6811View commit details