Revert "Revert "arm64: expand CFI shadow to cover 48-bit virtual addresses""
This reverts commit ea3df0c52b6ebe5e24f2d36259d97fd06f8e8a1a, and
increases the address limit on non-aarch64 64-bit platforms as well.
RLIMIT_AS problem fixed in a different commit.
Bug: 63141434, 64293803
Test: device boots
(cherry picked from commit abb163f5f0e3fcba4fd8f75aa0a00e4cf36f7d53)
Change-Id: I53ee7cb50bbc0b535923bee8a8c0e2e416a81d41
diff --git a/libc/private/CFIShadow.h b/libc/private/CFIShadow.h
index 26351db..1423d86 100644
--- a/libc/private/CFIShadow.h
+++ b/libc/private/CFIShadow.h
@@ -61,10 +61,8 @@
// Alignment of __cfi_check.
static constexpr uintptr_t kCfiCheckAlign = 1UL << kCfiCheckGranularity; // 4K
-#if defined(__aarch64__)
- static constexpr uintptr_t kMaxTargetAddr = 0x7fffffffff;
-#elif defined (__LP64__)
- static constexpr uintptr_t kMaxTargetAddr = 0x7fffffffffff;
+#if defined (__LP64__)
+ static constexpr uintptr_t kMaxTargetAddr = 0xffffffffffff;
#else
static constexpr uintptr_t kMaxTargetAddr = 0xffffffff;
#endif