NFC: external_pointer address_cast earlier
Make it easier to justify our avoidance of capptr_from_client and capptr_reveal in external_pointer by performing address_cast earlier. In particular, with this change, we can see that the pointer (and so its authority, in CHERI) is not passed to any called function other than address_cast and pointer_offset, and so authority is merely propagated and neither exercised nor amplified. Remove the long-disused capptr_reveal_wild, which was added for earlier versions of external_pointer.
This commit is contained in:
committed by
Nathaniel Filardo
parent
db3ae1c8e3
commit
09bc0c6be7
@@ -476,7 +476,7 @@ void test_remaining_bytes()
|
||||
char* p = (char*)alloc.alloc(size);
|
||||
for (size_t offset = 0; offset < size; offset++)
|
||||
{
|
||||
auto rem = alloc.remaining_bytes(p + offset);
|
||||
auto rem = alloc.remaining_bytes(address_cast(pointer_offset(p, offset)));
|
||||
if (rem != (size - offset))
|
||||
{
|
||||
printf(
|
||||
|
||||
Reference in New Issue
Block a user