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

Fix crash on aarch64 linux. #225

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
SELinux on CentOS blocks the first 64k
SegHaxx committed Nov 27, 2020
commit 45e5b4e28e07349fddd798d66b6dd79c4ce16415
5 changes: 2 additions & 3 deletions BasiliskII/src/CrossPlatform/vm_alloc.cpp
Original file line number Diff line number Diff line change
@@ -98,14 +98,13 @@ typedef unsigned long vm_uintptr_t;
#elif !REAL_ADDRESSING
/* linux does not implement any useful fallback behavior
such as allocating the next available address
and the first 4k of address space is marked unavailable
and the first 4k-64k of address space is marked unavailable
for security reasons (see https://wiki.debian.org/mmap_min_addr)
so we must start requesting after the first page
(or we get a high 64bit address and break on aarch64)

leaving NULL unmapped is a good idea anyway for debugging reasons
so we do this unconditionally on all platforms
some of which use upwards of 64k pages, so lets start there, just in case */
so we do this unconditionally on all platforms */
#define MAP_BASE 0x00010000
#else /* must be 0x0 when REAL_ADDRESSING=1 */
#define MAP_BASE 0x00000000