This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Add shadow offset for SystemZ.
ClosedPublic

Authored by koriakin on Apr 28 2016, 2:57 AM.

Details

Summary

SystemZ on Linux currently has 53-bit address space. In theory, the hardware
could support a full 64-bit address space, but that's not supported due to
kernel limitations (it'd require 5-level page tables), and there are no plans
for that. The default process layout stays within first 4TB of address space
(to avoid creating 4-level page tables), so any offset >= (1 << 42) is fine.
Let's use 1 << 52 here, ie. exactly half the address space.

I've originally used 7 << 50 (uses top 1/8th of the address space), but ASan
runtime assumes there's some space after the shadow area. While this is
fixable, it's simpler to avoid the issue entirely.

Also, I've originally wanted to have the shadow aligned to 1/8th the address
space, so that we can use OR like X86 to assemble the offset. I no longer
think it's a good idea, since using ADD enables us to load the constant just
once and use it with register + register indexed addressing.

Diff Detail

Repository
rL LLVM

Event Timeline

koriakin retitled this revision from to [ASan] Add shadow offset for SystemZ..
koriakin updated this object.
koriakin added reviewers: uweigand, eugenis, kcc.
koriakin set the repository for this revision to rL LLVM.
koriakin added a project: Restricted Project.
koriakin added a subscriber: llvm-commits.
aizatsky accepted this revision.Apr 28 2016, 1:49 PM
aizatsky added a reviewer: aizatsky.
This revision is now accepted and ready to land.Apr 28 2016, 1:49 PM
This revision was automatically updated to reflect the committed changes.