Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/trusted/service_runtime/posix/addrspace_teardown.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ void NaClAddrSpaceFree(struct NaClApp *nap) {
uintptr_t addrsp_size = (uintptr_t) 1U << nap->addr_bits;
size_t full_size = (NACL_ADDRSPACE_LOWER_GUARD_SIZE + addrsp_size +
NACL_ADDRSPACE_UPPER_GUARD_SIZE);
if (g_prereserved_sandbox_size > 0) {
NaClLog(LOG_WARNING, "NaClAddrSpaceFree: can't unmap when memory is prereserved by bootstrap helper\n");
return;
}
if (munmap(base, full_size) != 0) {
NaClLog(LOG_FATAL, "NaClAddrSpaceFree: munmap() failed, errno %d\n",
errno);
Expand Down
3 changes: 3 additions & 0 deletions src/trusted/service_runtime/sel_addrspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ NaClErrorCode NaClAllocateSpace(void **mem, size_t addrsp_size) NACL_WUR;
*
* Note that this does not free any other data structures associated
* with the NaClApp. In particular, it does not free mem_map.
*
* FIXME: does not work when memory is prereserved by nacl_bootstrap_helper
* since we don't know what vm.mmap_min_addr sysctl was
*/
void NaClAddrSpaceFree(struct NaClApp *nap);

Expand Down
2 changes: 1 addition & 1 deletion src/trusted/validator_arm/build.scons
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ validator_tests = {
# The following tests generate ARM nexes from assembly and validate the
# generate file. They're all expected to fail and produce the golden files'
# stdout. Stderr is expected to be empty.
if env.Bit('build_arm'):
if env.Bit('build_arm') and UsingNaclMode():
untrusted_env = env.MakeUntrustedNativeEnv()
for test, exit_status in validator_tests.items():
nexe = untrusted_env.ComponentProgram(test, 'testdata/' + test + '.S',
Expand Down