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:
committed by
Nathaniel Wesley Filardo
parent
3462c53983
commit
c54d2b527d
@@ -371,6 +371,16 @@ namespace snmalloc
|
||||
return p.unsafe_capptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Like capptr_reveal, but sometimes we do mean to reveal wild pointers
|
||||
* (specifically in external_pointer, where we're revealing something
|
||||
* architecturally derived from a user pointer).
|
||||
*/
|
||||
inline SNMALLOC_FAST_PATH void* capptr_reveal_wild(capptr::AllocWild<void> p)
|
||||
{
|
||||
return p.unsafe_capptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a void* from the client, it's fine to call it AllocWild.
|
||||
* Roughly dual to capptr_reveal().
|
||||
|
||||
Reference in New Issue
Block a user