Skip to content

in_ebpf: Implement openssl trace - #11793

Merged
edsiper merged 5 commits into
masterfrom
cosmo0920-implement-openssl-trace
Jul 2, 2026
Merged

in_ebpf: Implement openssl trace#11793
edsiper merged 5 commits into
masterfrom
cosmo0920-implement-openssl-trace

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented May 11, 2026

Copy link
Copy Markdown
Contributor

In this PR, I implemented OpenSSL's uprobe traces for read, write, handshake, and shutdown.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
$ sudo bin/fluent-bit -i ebpf -ptrace=trace_openssl -o stdout -v
  • Debug log output from testing the change
Fluent Bit v5.0.8
* Copyright (C) 2015-2026 The Fluent Bit Authors
* Fluent Bit is a CNCF graduated project under the Fluent organization
* https://fluentbit.io

______ _                  _    ______ _ _           _____  _____ 
|  ___| |                | |   | ___ (_) |         |  ___||  _  |
| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   _|___ \ | |/' |
|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / /   \ \|  /| |
| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V //\__/ /\ |_/ /
\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/ \____(_)\___/


[2026/06/25 11:34:25.878] [ info] Configuration:
[2026/06/25 11:34:25.899] [ info]  flush time     | 1.000000 seconds
[2026/06/25 11:34:25.904] [ info]  grace          | 5 seconds
[2026/06/25 11:34:25.904] [ info]  daemon         | 0
[2026/06/25 11:34:25.904] [ info] ___________
[2026/06/25 11:34:25.905] [ info]  inputs:
[2026/06/25 11:34:25.905] [ info]      ebpf
[2026/06/25 11:34:25.905] [ info] ___________
[2026/06/25 11:34:25.905] [ info]  filters:
[2026/06/25 11:34:25.906] [ info] ___________
[2026/06/25 11:34:25.906] [ info]  outputs:
[2026/06/25 11:34:25.906] [ info]      stdout.0
[2026/06/25 11:34:25.906] [ info] ___________
[2026/06/25 11:34:25.907] [ info]  collectors:
[2026/06/25 11:34:25.969] [ info] [fluent bit] version=5.0.8, commit=3028035a28, pid=224738
[2026/06/25 11:34:25.980] [debug] [engine] coroutine stack size: 24576 bytes (24.0K)
[2026/06/25 11:34:25.985] [ info] [storage] ver=1.5.4, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2026/06/25 11:34:25.985] [ info] [simd    ] SSE2
[2026/06/25 11:34:25.986] [ info] [cmetrics] version=2.1.5
[2026/06/25 11:34:25.986] [ info] [ctraces ] version=0.7.1
[2026/06/25 11:34:26.001] [ info] [input:ebpf:ebpf.0] initializing
[2026/06/25 11:34:26.001] [ info] [input:ebpf:ebpf.0] storage_strategy='memory' (memory only)
[2026/06/25 11:34:26.003] [debug] [ebpf:ebpf.0] created event channels: read=21 write=22
[2026/06/25 11:34:26.003] [debug] [input:ebpf:ebpf.0] initializing eBPF input plugin
[2026/06/25 11:34:26.008] [debug] [input:ebpf:ebpf.0] processing trace: trace_openssl
[2026/06/25 11:34:26.008] [debug] [input:ebpf:ebpf.0] setting up trace configuration for: trace_openssl
[2026/06/25 11:34:30.926] [debug] [input:ebpf:ebpf.0] attaching BPF program for trace: trace_openssl
[2026/06/25 11:34:30.978] [debug] [input:ebpf:ebpf.0] registering trace handler for: trace_openssl
[2026/06/25 11:34:30.980] [ info] [input:ebpf:ebpf.0] registered trace handler for: trace_openssl
[2026/06/25 11:34:30.981] [ info] [input:ebpf:ebpf.0] trace configuration completed for: trace_openssl
[2026/06/25 11:34:30.981] [debug] [input:ebpf:ebpf.0] setting up collector with poll interval: 1000 ms
[2026/06/25 11:34:30.983] [ info] [input:ebpf:ebpf.0] eBPF input plugin initialized successfully
[2026/06/25 11:34:30.989] [debug] [stdout:stdout.0] created event channels: read=67 write=68
[2026/06/25 11:34:31.026] [ info] [sp] stream processor started
[2026/06/25 11:34:31.028] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2026/06/25 11:34:31.040] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:31.041] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:31.042] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:31.048] [ info] [output:stdout:stdout.0] worker #0 started
[2026/06/25 11:34:32.028] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:32.036] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:32.036] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:33.028] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:33.029] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:33.029] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:34.028] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:34.029] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:34.029] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:35.040] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:35.041] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:35.084] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[0] ebpf.0: [[1782354875.044002408, {}], {"event_type"=>"tls_handshake", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_handshake", "ssl_ptr"=>99681321833392, "latency_ns"=>14253782, "ret"=>-1}]
[1] ebpf.0: [[1782354875.075568726, {}], {"event_type"=>"tls_handshake", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_handshake", "ssl_ptr"=>99681321833392, "latency_ns"=>1103621, "ret"=>1}]
[2] ebpf.0: [[1782354875.076574457, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4124, "ret"=>-1}]
[3] ebpf.0: [[1782354875.077565174, {}], {"event_type"=>"tls_write", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>99681321833392, "latency_ns"=>7742, "ret"=>64}]
[4] ebpf.0: [[1782354875.077764874, {}], {"event_type"=>"tls_write", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>99681321833392, "latency_ns"=>2374, "ret"=>40}]
[5] ebpf.0: [[1782354875.077898029, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>54618, "ret"=>49}]
[6] ebpf.0: [[1782354875.078046849, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>1936, "ret"=>-1}]
[7] ebpf.0: [[1782354875.078172600, {}], {"event_type"=>"tls_write", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>99681321833392, "latency_ns"=>25927, "ret"=>9}]
[8] ebpf.0: [[1782354875.078297267, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>48446, "ret"=>710}]
[2026/06/25 11:34:36.034] [debug] [task] created task=0x85015e0 id=0 OK
[2026/06/25 11:34:36.036] [debug] [output:stdout:stdout.0] task_id=0 assigned to thread #0
[2026/06/25 11:34:36.037] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:36.037] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:36.039] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[9] ebpf.0: [[1782354875.078655149, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>9062, "ret"=>1369}]
[10] ebpf.0: [[1782354875.078812956, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6603, "ret"=>1369}]
[11] ebpf.0: [[1782354875.078983494, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6958, "ret"=>1369}]
[12] ebpf.0: [[1782354875.079109857, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7115, "ret"=>1369}]
[13] ebpf.0: [[1782354875.079235732, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6552, "ret"=>1369}]
[14] ebpf.0: [[1782354875.079368946, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6897, "ret"=>1369}]
[15] ebpf.0: [[1782354875.079492852, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6811, "ret"=>1369}]
[16] ebpf.0: [[1782354875.079617759, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6871, "ret"=>1369}]
[17] ebpf.0: [[1782354875.079749702, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7102, "ret"=>1369}]
[18] ebpf.0: [[1782354875.079877371, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6830, "ret"=>1369}]
[19] ebpf.0: [[1782354875.080013210, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6659, "ret"=>1369}]
[20] ebpf.0: [[1782354875.080137693, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6837, "ret"=>1369}]
[21] ebpf.0: [[1782354875.080306809, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6908, "ret"=>1369}]
[22] ebpf.0: [[1782354875.080458720, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7884, "ret"=>1369}]
[23] ebpf.0: [[1782354875.080584101, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6610, "ret"=>1369}]
[24] ebpf.0: [[1782354875.080719381, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6831, "ret"=>1369}]
[25] ebpf.0: [[1782354875.080842613, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6767, "ret"=>1369}]
[26] ebpf.0: [[1782354875.080971530, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6814, "ret"=>1369}]
[27] ebpf.0: [[1782354875.081104068, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7249, "ret"=>-1}]
[28] ebpf.0: [[1782354875.081229038, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>13168, "ret"=>-1}]
[29] ebpf.0: [[1782354875.081723379, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>41278, "ret"=>1369}]
[30] ebpf.0: [[1782354875.081882873, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>11724, "ret"=>1369}]
[31] ebpf.0: [[1782354875.082037480, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7038, "ret"=>1369}]
[32] ebpf.0: [[1782354875.082173833, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6469, "ret"=>1369}]
[33] ebpf.0: [[1782354875.082300212, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7403, "ret"=>1369}]
[34] ebpf.0: [[1782354875.082425524, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>8199, "ret"=>1369}]
[35] ebpf.0: [[1782354875.082557585, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7297, "ret"=>1369}]
[36] ebpf.0: [[1782354875.082681848, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>10173, "ret"=>-1}]
[37] ebpf.0: [[1782354875.082816721, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>5695, "ret"=>-1}]
[38] ebpf.0: [[1782354875.082945716, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>37099, "ret"=>1369}]
[39] ebpf.0: [[1782354875.083072414, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6305, "ret"=>1369}]
[40] ebpf.0: [[1782354875.083204854, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4472, "ret"=>1369}]
[41] ebpf.0: [[1782354875.083328894, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4496, "ret"=>1369}]
[42] ebpf.0: [[1782354875.083452936, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4553, "ret"=>1369}]
[43] ebpf.0: [[1782354875.083588323, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6398, "ret"=>-1}]
[44] ebpf.0: [[1782354875.083716822, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>2364, "ret"=>-1}]
[45] ebpf.0: [[1782354875.083870634, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>37285, "ret"=>1369}]
[46] ebpf.0: [[1782354875.084031360, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>6053, "ret"=>1369}]
[47] ebpf.0: [[1782354875.084178579, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4848, "ret"=>1369}]
[48] ebpf.0: [[1782354875.084335977, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4487, "ret"=>1369}]
[49] ebpf.0: [[1782354875.084485041, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>4484, "ret"=>1369}]
[2026/06/25 11:34:36.065] [debug] [out flush] cb_destroy coro_id=0
[2026/06/25 11:34:36.074] [debug] [task] destroy task=0x85015e0 (task_id=0)
[0] ebpf.0: [[1782354876.037907195, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>82109, "ret"=>7735}]
[1] ebpf.0: [[1782354876.038522645, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>20994, "ret"=>9}]
[2] ebpf.0: [[1782354876.038742331, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>10308, "ret"=>-1}]
[2026/06/25 11:34:37.028] [debug] [task] created task=0x85d8b30 id=0 OK
[2026/06/25 11:34:37.030] [debug] [output:stdout:stdout.0] task_id=0 assigned to thread #0
[2026/06/25 11:34:37.031] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:37.034] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:37.034] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[3] ebpf.0: [[1782354876.038965932, {}], {"event_type"=>"tls_shutdown", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_shutdown", "ssl_ptr"=>99681321833392, "latency_ns"=>77185, "ret"=>0}]
[4] ebpf.0: [[1782354876.039239655, {}], {"event_type"=>"tls_read", "pid"=>224816, "tid"=>224816, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>99681321833392, "latency_ns"=>7038, "ret"=>-1}]
[2026/06/25 11:34:37.036] [debug] [out flush] cb_destroy coro_id=1
[2026/06/25 11:34:37.037] [debug] [task] destroy task=0x85d8b30 (task_id=0)
[2026/06/25 11:34:38.029] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:38.029] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:38.029] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:39.029] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:39.029] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:39.035] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[0] ebpf.0: [[1782354879.030887095, {}], {"event_type"=>"tls_handshake", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_handshake", "ssl_ptr"=>97406730863264, "latency_ns"=>19365082, "ret"=>-1}]
[1] ebpf.0: [[1782354879.032086925, {}], {"event_type"=>"tls_handshake", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_handshake", "ssl_ptr"=>97406730863264, "latency_ns"=>747307, "ret"=>1}]
[2] ebpf.0: [[1782354879.032749684, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>3805, "ret"=>-1}]
[3] ebpf.0: [[1782354879.033390483, {}], {"event_type"=>"tls_write", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>97406730863264, "latency_ns"=>13914, "ret"=>64}]
[2026/06/25 11:34:40.029] [debug] [task] created task=0x8f02550 id=0 OK
[2026/06/25 11:34:40.029] [debug] [output:stdout:stdout.0] task_id=0 assigned to thread #0
[2026/06/25 11:34:40.029] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:40.029] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:40.031] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[4] ebpf.0: [[1782354879.033575149, {}], {"event_type"=>"tls_write", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>97406730863264, "latency_ns"=>2497, "ret"=>36}]
[5] ebpf.0: [[1782354879.033756987, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>49529, "ret"=>40}]
[6] ebpf.0: [[1782354879.033979816, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>1925, "ret"=>-1}]
[7] ebpf.0: [[1782354879.034392584, {}], {"event_type"=>"tls_write", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>97406730863264, "latency_ns"=>17683, "ret"=>9}]
[8] ebpf.0: [[1782354879.034580680, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>26393, "ret"=>9}]
[9] ebpf.0: [[1782354879.034970875, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>1809, "ret"=>-1}]
[2026/06/25 11:34:40.033] [debug] [out flush] cb_destroy coro_id=2
[2026/06/25 11:34:40.033] [debug] [task] destroy task=0x8f02550 (task_id=0)
[2026/06/25 11:34:41.029] [debug] [task] created task=0x8f932c0 id=0 OK
[2026/06/25 11:34:41.030] [debug] [output:stdout:stdout.0] task_id=0 assigned to thread #0
[0] ebpf.0: [[1782354880.029452975, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>63046, "ret"=>406}]
[1] ebpf.0: [[1782354880.029801636, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>11146, "ret"=>239}]
[2] ebpf.0: [[1782354880.030242881, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>7497, "ret"=>17}]
[3] ebpf.0: [[1782354880.030405016, {}], {"event_type"=>"tls_write", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_write", "ssl_ptr"=>97406730863264, "latency_ns"=>67030, "ret"=>17}]
[4] ebpf.0: [[1782354880.030568978, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>6554, "ret"=>-1}]
[5] ebpf.0: [[1782354880.030718590, {}], {"event_type"=>"tls_shutdown", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_shutdown", "ssl_ptr"=>97406730863264, "latency_ns"=>13064, "ret"=>0}]
[6] ebpf.0: [[1782354880.030868421, {}], {"event_type"=>"tls_read", "pid"=>224881, "tid"=>224881, "comm"=>"curl", "trace"=>"openssl_tls_read", "ssl_ptr"=>97406730863264, "latency_ns"=>8486, "ret"=>-1}]
[2026/06/25 11:34:41.034] [debug] [out flush] cb_destroy coro_id=3
[2026/06/25 11:34:41.031] [debug] [input:ebpf:ebpf.0] collecting events from ring buffers
[2026/06/25 11:34:41.034] [debug] [input:ebpf:ebpf.0] consuming events from ring buffer trace_openssl
[2026/06/25 11:34:41.035] [debug] [input:ebpf:ebpf.0] successfully consumed events from ring buffer trace_openssl
[2026/06/25 11:34:41.035] [debug] [task] destroy task=0x8f932c0 (task_id=0)
^C[2026/06/25 11:34:41] [engine] caught signal (SIGINT)
[2026/06/25 11:34:41.643] [ warn] [engine] service will shutdown in max 5 seconds
[2026/06/25 11:34:41.644] [ info] [engine] pausing all inputs..
[2026/06/25 11:34:41.646] [ info] [input] pausing ebpf.0
[2026/06/25 11:34:41.648] [debug] [input:ebpf:ebpf.0] collector paused
[2026/06/25 11:34:42.032] [ info] [engine] service has stopped (0 pending tasks)
[2026/06/25 11:34:42.033] [ info] [input] pausing ebpf.0
[2026/06/25 11:34:42.033] [debug] [input:ebpf:ebpf.0] collector paused
[2026/06/25 11:34:42.035] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
[2026/06/25 11:34:42.043] [ info] [output:stdout:stdout.0] thread worker #0 stopped
[2026/06/25 11:34:42.528] [ info] [input:ebpf:ebpf.0] eBPF input plugin exited
  • Attached Valgrind output that shows no leaks or memory corruption was found
==224738== 
==224738== HEAP SUMMARY:
==224738==     in use at exit: 0 bytes in 0 blocks
==224738==   total heap usage: 4,798 allocs, 4,798 frees, 21,307,333 bytes allocated
==224738== 
==224738== All heap blocks were freed -- no leaks are possible
==224738==

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Extended OpenSSL/TLS tracing to emit additional event types for TLS handshake, read, write, and shutdown.
    • Events now include TLS-specific details such as the SSL pointer, operation latency, and operation return/byte counts.
  • Configuration/Compatibility

    • Improved OpenSSL library detection for eBPF uprobes, with support for overriding the resolved libssl path.
  • Tests

    • Added runtime coverage for OpenSSL TLS event encoding across supported event types, including validation for unknown types.

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds OpenSSL TLS tracing to the in_ebpf plugin: new TLS event types and payloads, a generated eBPF probe for SSL handshake/read/write/shutdown, a userspace handler and registration, and runtime test coverage.

Changes

OpenSSL TLS tracing

Layer / File(s) Summary
Shared TLS event contract
plugins/in_ebpf/traces/includes/common/events.h, plugins/in_ebpf/traces/includes/common/encoder.h
Adds TLS event kinds, TLS payload structs, union members, and string names for handshake, read, write, and shutdown events.
OpenSSL probe build and BPF code
plugins/in_ebpf/CMakeLists.txt, plugins/in_ebpf/traces/openssl/bpf.c.in
Sets libssl paths, generates the OpenSSL BPF source, and adds entry/return probes that store TLS state and emit TLS events.
OpenSSL userspace handler
plugins/in_ebpf/traces/openssl/handler.h, plugins/in_ebpf/traces/openssl/handler.c, plugins/in_ebpf/traces/traces.h
Adds OpenSSL event encoding, trace handling, skeleton inclusion, and trace-table registration.
OpenSSL runtime tests
tests/runtime/CMakeLists.txt, tests/runtime/in_ebpf_openssl_handler.c
Registers the runtime test target and checks encode_openssl_event() for supported and unsupported event types.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • fluent/fluent-bit#11646 — Extends the shared in_ebpf event schema and encoder with new event types and trace dispatch paths.
  • fluent/fluent-bit#11735 — Also adds a new trace family to the shared in_ebpf event model and handler registration.
  • fluent/fluent-bit#11743 — Updates events.h and encoder.h with additional event kinds and payload handling in the same trace framework.

Suggested reviewers

  • edsiper

Poem

A rabbit hopped through TLS glow,
with handshake, read, and write in tow.
The burrow hummed with eBPF light,
and tiny logs came out just right. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the new OpenSSL trace support in the in_ebpf plugin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-implement-openssl-trace

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920
cosmo0920 force-pushed the cosmo0920-implement-openssl-trace branch from df24026 to ad57117 Compare June 25, 2026 01:17
@cosmo0920
cosmo0920 marked this pull request as ready for review June 25, 2026 01:18
@cosmo0920
cosmo0920 requested a review from edsiper as a code owner June 25, 2026 01:18
@cosmo0920 cosmo0920 added this to the Fluent Bit v5.0.9 milestone Jun 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
plugins/in_ebpf/traces/includes/common/events.h (1)

170-181: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

tls_handshake_event and tls_io_event are byte-for-byte identical.

Both structs share the same fields (ssl_ptr, __s64 latency_ns, int ret), and the downstream handler branches on ev->type purely to select between two interchangeable layouts. A single struct tls_event (with both union members aliasing it, or a single member) would remove the duplication and the redundant branching in handler.c.

Keeping them split is acceptable if you intend the two payloads to diverge later; otherwise consider consolidating.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/in_ebpf/traces/includes/common/events.h` around lines 170 - 181, The
two event payload structs are duplicated and should be consolidated if they are
meant to stay identical. Update the shared event model in events.h by
introducing a single tls_event layout (or a shared alias/union-backed type) and
then update the downstream logic in handler.c to use that common type instead of
branching between tls_handshake_event and tls_io_event for the same fields. Keep
the split only if you plan to add different payloads later; otherwise remove the
redundant struct definitions and redundant type-based handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/in_ebpf/traces/openssl/handler.c`:
- Around line 32-43: `encode_openssl_event` currently treats any unknown
`ev->type` as `openssl_tls_handshake`, which can produce inconsistent payloads
when later fields are encoded as `tls_io`. Update the event-type handling in
`encode_openssl_event` to explicitly accept the known TLS read/write/shutdown
cases, add a dedicated handshake branch for `EVENT_TYPE_TLS_HANDSHAKE`, and
return an error for any unsupported `ev->type`. Make the same validation
consistent across the body/status/message encoding paths so only valid event
types are encoded and no default fallback is used.

---

Nitpick comments:
In `@plugins/in_ebpf/traces/includes/common/events.h`:
- Around line 170-181: The two event payload structs are duplicated and should
be consolidated if they are meant to stay identical. Update the shared event
model in events.h by introducing a single tls_event layout (or a shared
alias/union-backed type) and then update the downstream logic in handler.c to
use that common type instead of branching between tls_handshake_event and
tls_io_event for the same fields. Keep the split only if you plan to add
different payloads later; otherwise remove the redundant struct definitions and
redundant type-based handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 80c20ac5-6008-490d-95b5-30131ebd69f9

📥 Commits

Reviewing files that changed from the base of the PR and between c2b1cfd and ad57117.

📒 Files selected for processing (9)
  • plugins/in_ebpf/CMakeLists.txt
  • plugins/in_ebpf/traces/includes/common/encoder.h
  • plugins/in_ebpf/traces/includes/common/events.h
  • plugins/in_ebpf/traces/openssl/bpf.c.in
  • plugins/in_ebpf/traces/openssl/handler.c
  • plugins/in_ebpf/traces/openssl/handler.h
  • plugins/in_ebpf/traces/traces.h
  • tests/runtime/CMakeLists.txt
  • tests/runtime/in_ebpf_openssl_handler.c

Comment thread plugins/in_ebpf/traces/openssl/handler.c

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad571174bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/in_ebpf/CMakeLists.txt Outdated
Comment thread plugins/in_ebpf/traces/openssl/bpf.c.in
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/in_ebpf/traces/openssl/bpf.c.in (1)

45-59: 🔒 Security & Privacy | 🟠 Major

Do not hard-code mntns_id to 0; retrieve it and optionally filter by mount namespace.

The fill_common function hard-codes event->common.mntns_id to 0, ignoring the included <gadget/mntns_filter.h>. This prevents container-aware filtering and causes event metadata to report unscoped namespaces. Align with the pattern used in plugins/in_ebpf/traces/vfs/bpf.c and plugins/in_ebpf/traces/tcp/bpf.c to correctly capture the namespace ID.

<details>
<summary>Reference pattern from plugins/in_ebpf/traces/tcp/bpf.c</summary>

```c
__u64 mntns_id = gadget_get_mntns_id();
if (gadget_should_discard_mntns_id(mntns_id)) {
    return 0;
}
// ...
event->common.mntns_id = mntns_id;
```
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/in_ebpf/traces/openssl/bpf.c.in` around lines 45 - 59, The
fill_common helper in the OpenSSL eBPF trace is hard-coding
event->common.mntns_id to 0 instead of reading the current mount namespace and
honoring namespace filtering. Update fill_common to follow the same
gadget_get_mntns_id and gadget_should_discard_mntns_id pattern used in vfs/tcp
trace programs, and assign the retrieved mntns_id to event->common.mntns_id so
container-scoped metadata is correct.
🧹 Nitpick comments (1)
plugins/in_ebpf/traces/openssl/bpf.c.in (1)

192-203: 🩺 Stability & Availability | 🔵 Trivial

Verify strict symbol requirements for uprobe attachment

Although fallback probes for SSL_read and SSL_write are present in the code, ensure the eBPF skeleton attachment logic (trace_openssl) is configured to ignore failures for missing SSL_read_ex/SSL_write_ex symbols. If the loader treats the absence of these specific symbols as a fatal error, the plugin will fail to start on older OpenSSL versions despite the fallback definitions being available. Confirm that missing _ex symbols do not abort the initialization process.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/in_ebpf/traces/openssl/bpf.c.in` around lines 192 - 203, The eBPF
loader for trace_openssl should not fail hard when SSL_read_ex/SSL_write_ex are
missing, since fallback SSL_read/SSL_write probes already exist. Update the
attachment logic in trace_openssl to treat missing _ex symbols as optional and
continue initialization, while still attaching the available fallback probes.
Make sure the probe setup around trace_uprobe_ssl_read_ex and
trace_uretprobe_ssl_read_ex ignores these specific attachment failures instead
of aborting startup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@plugins/in_ebpf/traces/openssl/bpf.c.in`:
- Around line 45-59: The fill_common helper in the OpenSSL eBPF trace is
hard-coding event->common.mntns_id to 0 instead of reading the current mount
namespace and honoring namespace filtering. Update fill_common to follow the
same gadget_get_mntns_id and gadget_should_discard_mntns_id pattern used in
vfs/tcp trace programs, and assign the retrieved mntns_id to
event->common.mntns_id so container-scoped metadata is correct.

---

Nitpick comments:
In `@plugins/in_ebpf/traces/openssl/bpf.c.in`:
- Around line 192-203: The eBPF loader for trace_openssl should not fail hard
when SSL_read_ex/SSL_write_ex are missing, since fallback SSL_read/SSL_write
probes already exist. Update the attachment logic in trace_openssl to treat
missing _ex symbols as optional and continue initialization, while still
attaching the available fallback probes. Make sure the probe setup around
trace_uprobe_ssl_read_ex and trace_uretprobe_ssl_read_ex ignores these specific
attachment failures instead of aborting startup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a67f0122-3093-4b04-8b4d-f2db25163c5e

📥 Commits

Reviewing files that changed from the base of the PR and between ad57117 and 3028035.

📒 Files selected for processing (3)
  • plugins/in_ebpf/traces/openssl/bpf.c.in
  • plugins/in_ebpf/traces/openssl/handler.c
  • tests/runtime/in_ebpf_openssl_handler.c
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/in_ebpf/traces/openssl/handler.c

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
plugins/in_ebpf/CMakeLists.txt (1)

47-53: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Distro-specific fallback and no existence check can silently bake an invalid uprobe path.

The resolved LIBSSL_PATH is interpolated into the BPF SEC("uprobe/@LIBSSL_PATH@:SSL_*") strings at build time, so an unreachable path only fails later when libbpf tries to attach. Two gaps here:

  • The fallback /lib64/libssl.so.3 is RHEL/Fedora-specific. Debian/Ubuntu place the runtime object at /usr/lib/<arch>/libssl.so.3, so the fallback resolves to a nonexistent file on those distros.
  • Nothing validates that the resolved path actually exists; only the static-archive case (lines 56-60) emits a diagnostic.

Consider validating existence and surfacing a clearer error/warning when nothing usable was found:

♻️ Suggested validation
   if (NOT LIBSSL_PATH)
     set(LIBSSL_PATH "/lib64/libssl.so.3")
   endif()
 endif()

+if (NOT EXISTS "${LIBSSL_PATH}")
+  message(WARNING
+          "eBPF OpenSSL uprobes resolved a libssl path that does not exist: ${LIBSSL_PATH}. "
+          "Set FLB_IN_EBPF_LIBSSL_PATH to the target host libssl shared object.")
+endif()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/in_ebpf/CMakeLists.txt` around lines 47 - 53, The `LIBSSL_PATH`
fallback logic in the CMake setup can silently select a distro-specific path
that does not exist, which later breaks the `SEC("uprobe/@LIBSSL_PATH@:SSL_*")`
probe targets. Update the resolution flow around the `find_library(LIBSSL_PATH
...)` and `/lib64/libssl.so.3` fallback to validate that the chosen path exists
before accepting it. If no usable shared object is found, emit a clear warning
or fatal diagnostic instead of baking an invalid path into the BPF build, and
keep the existing static-archive handling consistent with this validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@plugins/in_ebpf/CMakeLists.txt`:
- Around line 47-53: The `LIBSSL_PATH` fallback logic in the CMake setup can
silently select a distro-specific path that does not exist, which later breaks
the `SEC("uprobe/@LIBSSL_PATH@:SSL_*")` probe targets. Update the resolution
flow around the `find_library(LIBSSL_PATH ...)` and `/lib64/libssl.so.3`
fallback to validate that the chosen path exists before accepting it. If no
usable shared object is found, emit a clear warning or fatal diagnostic instead
of baking an invalid path into the BPF build, and keep the existing
static-archive handling consistent with this validation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d2a7900a-538a-45dc-b5dd-5b987eda3f4a

📥 Commits

Reviewing files that changed from the base of the PR and between e89c53f and 8ade5be.

📒 Files selected for processing (1)
  • plugins/in_ebpf/CMakeLists.txt

@edsiper
edsiper merged commit 92825bb into master Jul 2, 2026
88 of 90 checks passed
@edsiper
edsiper deleted the cosmo0920-implement-openssl-trace branch July 2, 2026 18:08
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.

2 participants