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

Issue 9452002: Ensure that executable pages are properly guarded. (Closed)

Created:
8 years, 10 months ago by Vyacheslav Egorov (Chromium)
Modified:
8 years, 10 months ago
Reviewers:
Erik Corry, Cris Neckar
CC:
v8-dev
Visibility:
Public.

Description

Ensure that executable pages are properly guarded. Split executable memory chunks into two pieces: header with all metadata (protection: RW) and body (protection: RWX). Separate header from metadata with a guard page and add a guard page after the page body. R=erik.corry@gmail.com BUG=http://crbug.com/115151 Committed: https://code.google.com/p/v8/source/detail?r=10809

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -202 lines) Patch
M src/deoptimizer.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M src/heap.h View 2 chunks +1 line, -4 lines 0 comments Download
M src/heap.cc View 22 chunks +30 lines, -28 lines 0 comments Download
M src/heap-inl.h View 4 chunks +3 lines, -8 lines 0 comments Download
M src/mark-compact.cc View 19 chunks +62 lines, -48 lines 1 comment Download
M src/objects-visiting.h View 1 chunk +1 line, -1 line 0 comments Download
M src/platform.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/platform-cygwin.cc View 1 chunk +11 lines, -0 lines 1 comment Download
M src/platform-freebsd.cc View 1 chunk +6 lines, -0 lines 1 comment Download
M src/platform-linux.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/platform-macos.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/platform-nullos.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/platform-openbsd.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/platform-solaris.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/platform-win32.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/serialize.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/serialize.cc View 3 chunks +13 lines, -3 lines 0 comments Download
M src/spaces.h View 21 chunks +61 lines, -44 lines 0 comments Download
M src/spaces.cc View 29 chunks +143 lines, -35 lines 0 comments Download
M src/spaces-inl.h View 1 chunk +2 lines, -4 lines 0 comments Download
M src/store-buffer.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/test-alloc.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M test/cctest/test-heap.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-mark-compact.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/test-serialize.cc View 6 chunks +7 lines, -6 lines 0 comments Download
M test/cctest/test-spaces.cc View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Vyacheslav Egorov (Chromium)
8 years, 10 months ago (2012-02-23 01:40:08 UTC) #1
Vyacheslav Egorov (Chromium)
fyi: Cris.
8 years, 10 months ago (2012-02-23 01:40:52 UTC) #2
Erik Corry
LGTM http://codereview.chromium.org/9452002/diff/1/src/mark-compact.cc File src/mark-compact.cc (right): http://codereview.chromium.org/9452002/diff/1/src/mark-compact.cc#newcode3077 src/mark-compact.cc:3077: int cell_index = I think it is clearer ...
8 years, 10 months ago (2012-02-23 12:00:39 UTC) #3
Cris Neckar
8 years, 10 months ago (2012-02-23 19:04:25 UTC) #4
LGTM Thanks Slava!

On 2012/02/23 12:00:39, Erik Corry wrote:
> LGTM
> 
> http://codereview.chromium.org/9452002/diff/1/src/mark-compact.cc
> File src/mark-compact.cc (right):
> 
> http://codereview.chromium.org/9452002/diff/1/src/mark-compact.cc#newcode3077
> src/mark-compact.cc:3077: int cell_index =
> I think it is clearer to move this down to immediately before the for loop. 
> Especially in this case, but also in the other cases in this file.
> 
> http://codereview.chromium.org/9452002/diff/1/src/platform-cygwin.cc
> File src/platform-cygwin.cc (right):
> 
>
http://codereview.chromium.org/9452002/diff/1/src/platform-cygwin.cc#newcode362
> src/platform-cygwin.cc:362: PAGE_READONLY | PAGE_GUARD)) {
> Can we not map it with no permissions at all, instead of read only?
> 
> http://codereview.chromium.org/9452002/diff/1/src/platform-freebsd.cc
> File src/platform-freebsd.cc (right):
> 
>
http://codereview.chromium.org/9452002/diff/1/src/platform-freebsd.cc#newcode416
> src/platform-freebsd.cc:416: return true;
> You could have put this in the posix file.

Powered by Google App Engine
This is Rietveld 408576698