Skip to content

Conversation

@ddelnano
Copy link
Member

@ddelnano ddelnano commented Jul 23, 2024

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

  • BPF tests pass on all kernels -- see this build-and-test run for the results.
  • 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.

  • 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.
  • 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.
  • 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

…ies out of uprobe attachment

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-uprobe-opt-out-list branch from 38474a7 to b739298 Compare July 23, 2024 17:11
ddelnano added 2 commits July 23, 2024 18:01
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano marked this pull request as ready for review July 23, 2024 18:19
@ddelnano ddelnano requested a review from a team as a code owner July 23, 2024 18:19
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Copy link
Contributor

@oazizi000 oazizi000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Comments are all pretty minor.

ddelnano added 3 commits July 28, 2024 21:00
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
… doc string to method

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/add-uprobe-opt-out-list branch from afbaa9c to d895cad Compare July 28, 2024 21:43
@ddelnano
Copy link
Member Author

@oazizi000 thanks for the review. I've addressed the comments and it's ready for another look when you have the chance.

@ddelnano ddelnano merged commit 50ddcd3 into pixie-io:main Jul 29, 2024
@ddelnano ddelnano deleted the ddelnano/add-uprobe-opt-out-list branch July 29, 2024 06:10
ddelnano added a commit to ddelnano/pixie that referenced this pull request Sep 23, 2024
…m uprobe attachment (pixie-io#1971)

Summary: Add `--stirling_uprobe_opt_out` cli flag to allow opting
binaries from uprobe attachment

See pixie-io#1970 for the motivation of
this change.

Relevant Issues: pixie-io#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 <ddelnano@gmail.com>
GitOrigin-RevId: 50ddcd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants