From 8023a6c906bc847378a6dfa4bfbb99e5bc560463 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Mon, 18 Oct 2021 22:18:14 +0100 Subject: [PATCH] backend/address_space: drop spurious !StrictProvenance guard This dates back to the much earlier design that required the use of an authority map. Since the current CHERI design does not, go ahead and ask the platform whenever underlying allocation requests are sufficiently aligned. --- src/backend/address_space.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/address_space.h b/src/backend/address_space.h index e197e77..02c48f0 100644 --- a/src/backend/address_space.h +++ b/src/backend/address_space.h @@ -53,12 +53,10 @@ namespace snmalloc SNMALLOC_ASSERT(size >= sizeof(void*)); /* - * For sufficiently large allocations with platforms that support - * aligned allocations and architectures that don't require - * StrictProvenance, try asking the platform first. + * For sufficiently large allocations with platforms that support aligned + * allocations, try asking the platform directly. */ - if constexpr ( - pal_supports && !aal_supports) + if constexpr (pal_supports) { if (size >= PAL::minimum_alloc_size) {