Skip to content

refactor: cleanup the TLS ebpf functions#27

Merged
kemingy merged 2 commits into
mainfrom
cleanup_tls_ebpf
Apr 29, 2026
Merged

refactor: cleanup the TLS ebpf functions#27
kemingy merged 2 commits into
mainfrom
cleanup_tls_ebpf

Conversation

@kemingy
Copy link
Copy Markdown
Member

@kemingy kemingy commented Apr 29, 2026

No description provided.

Signed-off-by: Keming <kemingyang@tensorchord.ai>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the TLS-related eBPF probe implementations (OpenSSL + BoringSSL) by moving shared call/event emission logic into a common header and by splitting out dedicated write entry probes so read/write attach points map to the correct programs.

Changes:

  • Introduces shared call_info / call_info_ex structs and helper functions (new_call_info*, emit_ssl_events) in tls/ssl_common.h and uses them from both OpenSSL and BoringSSL eBPF programs.
  • Adds missing write entry probes (OpenSSL + BoringSSL) and updates generated bpf2go bindings accordingly.
  • Fixes probe attachment wiring and improves attach failure logging fields (notably for OpenSSL, and adds probe naming for BoringSSL).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tls/ssl_common.h Adds shared call-info structs and reusable helpers for populating call info and emitting ringbuf events.
tls/ssl.bpf.c Uses common helpers; adds ssl_write_entry / ssl_write_ex_entry programs and refactors event emission.
tls/boring.bpf.c Uses common helpers; adds boring_ssl_write_entry program and refactors event emission.
tls/openssl.go Corrects program-to-symbol mapping for SSL_write / SSL_write_ex and improves warning log fields.
tls/boring.go Attaches distinct read/write entry programs and improves naming/log context for attached probes.
tls/ssl_x86_bpfel.go Regenerates bindings to include new programs and updated call_info_ex layout.
tls/ssl_arm64_bpfel.go Regenerates bindings to include new programs and updated call_info_ex layout.
tls/boring_x86_bpfel.go Regenerates bindings to include new programs and updated program constants/Close() list.
tls/boring_arm64_bpfel.go Regenerates bindings to include new programs and updated program constants/Close() list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tls/ssl_common.h
Comment thread tls/ssl_common.h
Signed-off-by: Keming <kemingyang@tensorchord.ai>
@kemingy kemingy merged commit 2ccc39f into main Apr 29, 2026
3 checks passed
@kemingy kemingy deleted the cleanup_tls_ebpf branch April 29, 2026 03:13
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