Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
d73c58f0
Commit
d73c58f0
authored
Jan 21, 2017
by
Paul Chaignon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PID to resolve path of target libraries
Leverage commit
690b7e6d
parent
b79b589a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
tools/funclatency.py
tools/funclatency.py
+3
-2
tools/sslsniff.py
tools/sslsniff.py
+8
-6
No files found.
tools/funclatency.py
View file @
d73c58f0
...
...
@@ -201,9 +201,10 @@ if not library:
b
.
attach_kretprobe
(
event_re
=
pattern
,
fn_name
=
"trace_func_return"
)
matched
=
b
.
num_open_kprobes
()
else
:
b
.
attach_uprobe
(
name
=
library
,
sym_re
=
pattern
,
fn_name
=
"trace_func_entry"
)
b
.
attach_uprobe
(
name
=
library
,
sym_re
=
pattern
,
fn_name
=
"trace_func_entry"
,
pid
=
args
.
pid
or
-
1
)
b
.
attach_uretprobe
(
name
=
library
,
sym_re
=
pattern
,
fn_name
=
"trace_func_return"
)
fn_name
=
"trace_func_return"
,
pid
=
args
.
pid
or
-
1
)
matched
=
b
.
num_open_uprobes
()
if
matched
==
0
:
...
...
tools/sslsniff.py
View file @
d73c58f0
...
...
@@ -130,18 +130,20 @@ b = BPF(text=prog)
# on its exit (Mark Drayton)
#
if
args
.
openssl
:
b
.
attach_uprobe
(
name
=
"ssl"
,
sym
=
"SSL_write"
,
fn_name
=
"probe_SSL_write"
)
b
.
attach_uprobe
(
name
=
"ssl"
,
sym
=
"SSL_read"
,
fn_name
=
"probe_SSL_read_enter"
)
b
.
attach_uprobe
(
name
=
"ssl"
,
sym
=
"SSL_write"
,
fn_name
=
"probe_SSL_write"
,
pid
=
args
.
pid
or
-
1
)
b
.
attach_uprobe
(
name
=
"ssl"
,
sym
=
"SSL_read"
,
fn_name
=
"probe_SSL_read_enter"
,
pid
=
args
.
pid
or
-
1
)
b
.
attach_uretprobe
(
name
=
"ssl"
,
sym
=
"SSL_read"
,
fn_name
=
"probe_SSL_read_exit"
)
fn_name
=
"probe_SSL_read_exit"
,
pid
=
args
.
pid
or
-
1
)
if
args
.
gnutls
:
b
.
attach_uprobe
(
name
=
"gnutls"
,
sym
=
"gnutls_record_send"
,
fn_name
=
"probe_SSL_write"
)
fn_name
=
"probe_SSL_write"
,
pid
=
args
.
pid
or
-
1
)
b
.
attach_uprobe
(
name
=
"gnutls"
,
sym
=
"gnutls_record_recv"
,
fn_name
=
"probe_SSL_read_enter"
)
fn_name
=
"probe_SSL_read_enter"
,
pid
=
args
.
pid
or
-
1
)
b
.
attach_uretprobe
(
name
=
"gnutls"
,
sym
=
"gnutls_record_recv"
,
fn_name
=
"probe_SSL_read_exit"
)
fn_name
=
"probe_SSL_read_exit"
,
pid
=
args
.
pid
or
-
1
)
# define output data structure in Python
TASK_COMM_LEN
=
16
# linux/sched.h
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment