Skip to content

Commit

Permalink
Merge pull request #113 from wenhuwang/openssl_v1_0_1
Browse files Browse the repository at this point in the history
fix attach uprobe failed on openssl v1.0.1 (fixes #112)
  • Loading branch information
apetruhin authored Jul 23, 2024
2 parents 409c784 + 9163bf8 commit c40380d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ebpftracer/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ func (t *Tracer) AttachOpenSslUprobes(pid uint32) []link.Link {
}
progs := []prog{
{symbol: "SSL_write", uprobe: writeEnter},
{symbol: "SSL_write_ex", uprobe: writeEnter},
{symbol: "SSL_read", uprobe: readEnter},
{symbol: "SSL_read_ex", uprobe: readExEnter},
{symbol: "SSL_read", uretprobe: readExit},
{symbol: "SSL_read_ex", uretprobe: readExit},
}
if semver.Compare(version, "v1.1.1") >= 0 {
progs = append(progs, []prog{
{symbol: "SSL_write_ex", uprobe: writeEnter},
{symbol: "SSL_read_ex", uprobe: readExEnter},
{symbol: "SSL_read_ex", uretprobe: readExit},
}...)
}
for _, p := range progs {
if p.uprobe != "" {
Expand Down

0 comments on commit c40380d

Please sign in to comment.