mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-24 00:41:11 -04:00
guard metadata with Memory Protection Keys (MPK)
This commit is contained in:
parent
ac8c68de53
commit
0b963078d5
6 changed files with 126 additions and 18 deletions
8
util.h
8
util.h
|
@ -38,4 +38,12 @@ typedef uint32_t u32;
|
|||
typedef uint64_t u64;
|
||||
typedef unsigned __int128 u128;
|
||||
|
||||
#ifdef CONFIG_SEAL_METADATA
|
||||
#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 27) && defined(__x86_64__)
|
||||
#define USE_PKEY
|
||||
#else
|
||||
#error "CONFIG_SEAL_METADATA requires Memory Protection Key support"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue