-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--stirling_uprobe_opt_out
cli flag to allow opting binaries fro…
…m uprobe attachment (#1971) Summary: Add `--stirling_uprobe_opt_out` cli flag to allow opting binaries from uprobe attachment See #1970 for the motivation of this change. Relevant Issues: #1970 Type of change: /kind feature Test Plan: Verified the following scenarios - [x] BPF tests pass on all kernels -- see [this build-and-test run](https://github.com/pixie-io/pixie/actions/runs/10063985263) for the results. - [x] Dynamically linked OpenSSL application is skipped from uprobe attachment ``` # Run //src/stirling/source_connectors/socket_tracer/testing/containers:nginx_alpine_openssl_3_0_8_image # Run stirling_wrapper with --stirling_uprobe_opt_out=nginx,non_matching --vmodule=uprobe_manager=1 [ .. ] I20240723 17:40:54.208112 739524 uprobe_manager.cc:584] binary filename '/proc/738767/root/usr/sbin/nginx' contained in uprobe opt out list, skipping. I20240723 17:40:54.209451 739524 uprobe_manager.cc:584] binary filename '/proc/738731/root/usr/sbin/nginx' contained in uprobe opt out list, skipping. ``` - [x] Statically linked BoringSSL application is skipped from uprobe attachment ``` # Run //src/stirling/source_connectors/socket_tracer/testing/containers/bssl:bssl_image # Run stirling_wrapper with --stirling_uprobe_opt_out=bssl,non_matching --vmodule=uprobe_manager=1 [ .. ] I20240723 17:51:14.265595 742187 uprobe_manager.cc:584] binary filename '/proc/741971/root/app/bssl.runfiles/boringssl/bssl' contained in uprobe opt out list, skipping. ``` - [x] Nodejs application is skipped from uprobe attachment ``` # Run //src/stirling/source_connectors/socket_tracer/testing/containers:node_14_18_1_alpine_image # Run stirling_wrapper with --stirling_uprobe_opt_out=https_server.js,non_matching --vmodule=uprobe_manager=1 [ .. ] I20240723 16:50:01.197883 725584 uprobe_manager.cc:486] binary filename 'https_server.js' contained in uprobe opt out list, skipping. ``` - [x] Go application attachment is skipped with `--stirling_uprobe_opt_out=https_server.js,non_matching` ``` # Run //src/stirling/testing/demo_apps/go_https/server:golang_1_21_https_server # Run stirling_wrapper with --stirling_uprobe_opt_out=golang_1_21_server_binary,non_matching --vmodule=uprobe_manager=1 [ .. ] I20240723 17:29:54.166582 736461 uprobe_manager.cc:635] binary filename '/golang_1_21_server_binary' contained in uprobe opt out list, skipping. ``` Changelog Message: Add mechanism for opting out specific binaries from uprobe attachment --------- Signed-off-by: Dom Del Nano <[email protected]>
- Loading branch information
Showing
5 changed files
with
66 additions
and
9 deletions.
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
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