Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Issue 2083005: CPU profiler: add secure profiles by filtering out functions using security tokens. (Closed)

Created:
10 years, 7 months ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

CPU profiler: add secure profiles by filtering out functions using security tokens. As several pages can run in a single V8 instance, it is possible to have functions from different security contexts intermixed in a single CPU profile. To avoid exposing function names from one page to another, filtering is introduced. The basic idea is that instead of capturing return addresses from stack, we're now capturing JSFunction addresses (as we anyway work only with JS stack frames.) Each JSFunction can reach out for context's security token. When providing a profile to a page, the profile is filtered using the security token of caller page. Any functions with different security tokens are filtered out (yes, we only do fast path check for now) and their ticks are attributed to their parents. Committed: http://code.google.com/p/v8/source/detail?r=4673

Patch Set 1 #

Total comments: 14

Patch Set 2 : Comments addressed #

Total comments: 2

Patch Set 3 : Reworded comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+618 lines, -133 lines) Patch
M include/v8-profiler.h View 1 2 2 chunks +21 lines, -4 lines 0 comments Download
M src/api.cc View 1 2 chunks +17 lines, -6 lines 0 comments Download
M src/cpu-profiler.h View 1 5 chunks +9 lines, -7 lines 0 comments Download
M src/cpu-profiler.cc View 1 6 chunks +33 lines, -14 lines 0 comments Download
M src/cpu-profiler-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/log.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/profile-generator.h View 1 12 chunks +51 lines, -11 lines 0 comments Download
M src/profile-generator.cc View 1 21 chunks +257 lines, -30 lines 0 comments Download
M src/profile-generator-inl.h View 1 chunk +15 lines, -2 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M test/cctest/test-log-stack-tracer.cc View 5 chunks +15 lines, -35 lines 0 comments Download
M test/cctest/test-profile-generator.cc View 9 chunks +194 lines, -20 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
mnaganov (inactive)
10 years, 7 months ago (2010-05-14 16:38:53 UTC) #1
Søren Thygesen Gjesse
I think it should be possible to use the profiler through the API without having ...
10 years, 7 months ago (2010-05-17 07:39:25 UTC) #2
mnaganov (inactive)
As I observed for Chromium, function call subtrees from different contexts are rarely intermixed. I ...
10 years, 7 months ago (2010-05-17 17:20:38 UTC) #3
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/2083005/diff/6001/7001 File include/v8-profiler.h (right): http://codereview.chromium.org/2083005/diff/6001/7001#newcode143 include/v8-profiler.h:143: * Note on security tokens usage. As several ...
10 years, 7 months ago (2010-05-18 13:43:10 UTC) #4
mnaganov (inactive)
10 years, 7 months ago (2010-05-18 14:11:52 UTC) #5
Thanks, Soeren!

http://codereview.chromium.org/2083005/diff/6001/7001
File include/v8-profiler.h (right):

http://codereview.chromium.org/2083005/diff/6001/7001#newcode143
include/v8-profiler.h:143: * Note on security tokens usage. As several pages can
run in a
On 2010/05/18 13:43:10, Søren Gjesse wrote:
> Please be more general, and don't mention "pages".

Done.

Powered by Google App Engine
This is Rietveld 408576698