XOR encoded next_object

This commit adds a simple XOR encoding to the next_object pointer in
FreeObjects.  This removes the trivial way of getting hold of a physical
address from the system by observing the free list pointers in
deallocated objects.
This commit is contained in:
Matthew Parkinson
2021-07-26 09:56:48 +01:00
committed by Matthew Parkinson
parent b69505fc5d
commit 81bf341732
9 changed files with 136 additions and 65 deletions

View File

@@ -130,4 +130,13 @@ check_client_impl(bool test, const char* const str)
# define check_client(test, str) check_client_impl(test, str)
#else
# define check_client(test, str)
#endif
#endif
namespace snmalloc
{
#ifdef SNMALLOC_CHECK_CLIENT
static constexpr bool CHECK_CLIENT = true;
#else
static constexpr bool CHECK_CLIENT = false;
#endif
} // namespace snmalloc