Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit address space in 32-bit rr to avoid interfering with kernel space. #3633

Merged
Merged
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
7 changes: 6 additions & 1 deletion src/AddressSpace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,12 @@ MemoryRange AddressSpace::get_global_exclusion_range(const RecordSession* sessio
}

static remote_ptr<void> usable_address_space_end(Task* t) {
return remote_ptr<void>((uint64_t(1) << addr_bits(t->arch())) - page_size());
auto addr_end = remote_ptr<void>((uint64_t(1) << addr_bits(t->arch())) - page_size());
#if defined(__i386)
// Further limit address space in 32-bit rr to avoid interfering with kernel space.
addr_end = min(addr_end, remote_ptr<void>(0xc0000000 - page_size()));
#endif
return addr_end;
}

static const remote_ptr<void> addr_space_start(0x40000);
Expand Down