NFC: CapPtr in external_pointer; drop capptr_rebound

capptr_rebound was only ever going to be used for external_pointer, which now
operates entirely using pointer_offset.  So instead, just make external_pointer
use capptr::AllocWild<void>, capptr_from_client, and a new capptr_reveal_wild.
This commit is contained in:
Nathaniel Wesley Filardo
2021-10-19 13:33:10 +01:00
committed by Nathaniel Wesley Filardo
parent 3462c53983
commit c54d2b527d
4 changed files with 23 additions and 32 deletions

View File

@@ -202,21 +202,6 @@ namespace snmalloc
UNUSED(size);
return CapPtr<T, BOut>(a.template as_static<T>().unsafe_capptr);
}
/**
* For architectures which do not enforce StrictProvenance, there's nothing
* to be done, so just return the pointer unmodified with new annotation.
*/
template<
typename T,
SNMALLOC_CONCEPT(capptr::ConceptBound) BOut,
SNMALLOC_CONCEPT(capptr::ConceptBound) BIn>
static SNMALLOC_FAST_PATH CapPtr<T, BOut>
capptr_rebound(CapPtr<void, BOut> a, CapPtr<T, BIn> r) noexcept
{
UNUSED(a);
return CapPtr<T, BOut>(r.unsafe_capptr);
}
};
} // namespace snmalloc

View File

@@ -53,12 +53,6 @@ namespace snmalloc
{ AAL::template capptr_bound<void, capptr::bounds::Chunk>(auth, sz) }
noexcept
-> ConceptSame<capptr::Chunk<void>>;
/**
* Construct a copy of auth with its target set to that of ret.
*/
{ AAL::capptr_rebound(auth, ret) } noexcept
-> ConceptSame<capptr::Chunk<void>>;
};
template<typename AAL>