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

Issue 7648002: Modify the NaCl_page_alloc_hint function to use VirtualQuery to check (Closed)

Created:
9 years, 4 months ago by bbudge
Modified:
9 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Modify sel_memory functions to support pre-reserved sandbox memory on 32 bit platforms. Add a NaCl_find_sandbox_memory function to use VirtualQuery on Windows to check if the parent process has already reserved a 1Gb memory region. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2131 TEST=manual Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=6451

Patch Set 1 #

Total comments: 3

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 24

Patch Set 4 : '' #

Total comments: 5

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -6 lines) Patch
M src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/sel_memory.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/win/sel_memory.c View 1 2 3 4 7 chunks +52 lines, -6 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
bbudge
9 years, 4 months ago (2011-08-12 21:50:44 UTC) #1
Mark Seaborn
http://codereview.chromium.org/7648002/diff/1/src/trusted/service_runtime/win/sel_memory.c File src/trusted/service_runtime/win/sel_memory.c (right): http://codereview.chromium.org/7648002/diff/1/src/trusted/service_runtime/win/sel_memory.c#newcode113 src/trusted/service_runtime/win/sel_memory.c:113: if (num_bytes == kOneGb) { Having a special case ...
9 years, 4 months ago (2011-08-12 21:57:54 UTC) #2
bbudge
I'm trying an approach suggested by Mark, where we use a Windows quirk to poke ...
9 years, 4 months ago (2011-08-16 00:33:42 UTC) #3
Brad Chen
http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode14 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:14: const size_t kOneGb = 0x40000000; I'm used to 'b' ...
9 years, 4 months ago (2011-08-16 01:21:49 UTC) #4
bbudge
http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode36 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:36: result = NaCl_page_alloc_at_addr(mem, addrsp_size); On 2011/08/16 01:21:49, Brad Chen ...
9 years, 4 months ago (2011-08-16 17:21:02 UTC) #5
Brad Chen
http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode36 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:36: result = NaCl_page_alloc_at_addr(mem, addrsp_size); Nit: A brief comment before ...
9 years, 4 months ago (2011-08-16 17:28:38 UTC) #6
Brad Chen
Otherwise LGTM. Please check with Mark in case he has any other feedback.
9 years, 4 months ago (2011-08-16 17:33:42 UTC) #7
Mark Seaborn
The new organisation looks good. Some nits... http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode29 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:29: #elif NACL_WINDOWS ...
9 years, 4 months ago (2011-08-16 17:34:10 UTC) #8
bbudge
http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode14 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:14: const size_t kOneGb = 0x40000000; On 2011/08/16 01:21:49, Brad ...
9 years, 4 months ago (2011-08-16 19:46:22 UTC) #9
bsy
lgtm
9 years, 4 months ago (2011-08-16 20:08:41 UTC) #10
Mark Seaborn
LGTM with some nits. http://codereview.chromium.org/7648002/diff/7003/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7648002/diff/7003/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode30 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:30: * On 32 bit Windows ...
9 years, 4 months ago (2011-08-16 20:18:43 UTC) #11
bbudge
http://codereview.chromium.org/7648002/diff/7003/src/trusted/service_runtime/win/sel_memory.c File src/trusted/service_runtime/win/sel_memory.c (right): http://codereview.chromium.org/7648002/diff/7003/src/trusted/service_runtime/win/sel_memory.c#newcode45 src/trusted/service_runtime/win/sel_memory.c:45: while (mem_size = VirtualQuery((LPCVOID)start, &mem, sizeof(mem))) { On 2011/08/16 ...
9 years, 4 months ago (2011-08-16 20:35:58 UTC) #12
commit-bot: I haz the power
9 years, 4 months ago (2011-08-17 01:47:01 UTC) #13
Change committed as 6451

Powered by Google App Engine
This is Rietveld 408576698