Conversation

TIL: The most popular 64-bit architecture in the world has a small address space. Kills any hope of never reusing malloc addresses.
Quote Tweet
Replying to @DanielMicay @pcwalton and 2 others
On arm64, you typically only have a 39-bit address space although it can be 48-bit like x86_64. The kernel takes half so it's really 38-bit or 47-bit. 38-bit is already far too small to use hardened_malloc with the normal configuration. 47-bit is 128 TiB which isn't limitless.
5
84
Replying to
Can enable 4-level page tables in the Linux kernel for 48-bit address space. In practice, nearly everyone is using 3-level page tables. I made a thread about this here: twitter.com/DanielMicay/st ARMv8.3 has major pressure against large address space via pointer authentication.
Quote Tweet
Linux on 64-bit ARM is most commonly used with 4k pages and 3-level page tables. This results in a 39-bit address space rather than the full 64-bit address space. It's possible to use 4-level page tables and then you get a 48-bit address space like you typically have on x86_64.
Show this thread
1
5
Replying to and
If you don't control the kernel or if you don't want to give up high entropy pointer authentication, you're pretty much stuck with 39-bit address space on arm64 Linux. You can see the choices here: github.com/torvalds/linux Highlighted line is a nearly universal configuration.
1
5
Replying to and
Related fact: the standard Android Runtime (ART) on 64-bit still largely uses a 32-bit address space for data. Puts all the managed memory in the lower 4G of address space in order to use 32-bit pointers directly rather than paying the cost of 64-bit pointers or 32-bit offsets.
1
3
Show replies