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
3a3b0f98
Commit
3a3b0f98
authored
Feb 09, 2017
by
Brenden Blanco
Committed by
GitHub
Feb 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #916 from pchaigno/use-pid-to-resolve-lib
Use PID to resolve path of target libraries
parents
6a94f777
d73c58f0
Changes
2
Show 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 @
3a3b0f98
...
@@ -201,9 +201,10 @@ if not library:
...
@@ -201,9 +201,10 @@ if not library:
b
.
attach_kretprobe
(
event_re
=
pattern
,
fn_name
=
"trace_func_return"
)
b
.
attach_kretprobe
(
event_re
=
pattern
,
fn_name
=
"trace_func_return"
)
matched
=
b
.
num_open_kprobes
()
matched
=
b
.
num_open_kprobes
()
else
:
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
,
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
()
matched
=
b
.
num_open_uprobes
()
if
matched
==
0
:
if
matched
==
0
:
...
...
tools/sslsniff.py
View file @
3a3b0f98
...
@@ -130,18 +130,20 @@ b = BPF(text=prog)
...
@@ -130,18 +130,20 @@ b = BPF(text=prog)
# on its exit (Mark Drayton)
# on its exit (Mark Drayton)
#
#
if
args
.
openssl
:
if
args
.
openssl
:
b
.
attach_uprobe
(
name
=
"ssl"
,
sym
=
"SSL_write"
,
fn_name
=
"probe_SSL_write"
)
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"
)
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"
,
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
:
if
args
.
gnutls
:
b
.
attach_uprobe
(
name
=
"gnutls"
,
sym
=
"gnutls_record_send"
,
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"
,
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"
,
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
# define output data structure in Python
TASK_COMM_LEN
=
16
# linux/sched.h
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