[hwasan][fuchsia] Fix features bitmask checking

Update the address tagging bitmask check to just see if
ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI is enabled rather than checking
if it's the only thing that's enabled.

Differential Revision: https://reviews.llvm.org/D129318
This commit is contained in:
Leonard Chan 2022-07-07 14:42:08 -07:00
parent 8e218026f8
commit c211041802
1 changed files with 3 additions and 3 deletions

View File

@ -190,11 +190,11 @@ void InitializeOsSupport() {
uint32_t features = 0;
CHECK_EQ(zx_system_get_features(ZX_FEATURE_KIND_ADDRESS_TAGGING, &features),
ZX_OK);
if (features != ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI &&
if (!(features & ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI) &&
flags()->fail_without_syscall_abi) {
Printf(
"FATAL: HWAddressSanitizer requires a kernel with tagged address "
"ABI.\n");
"FATAL: HWAddressSanitizer requires "
"ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI.\n");
Die();
}
#endif