guard metadata with Memory Protection Keys (MPK)

This commit is contained in:
Daniel Micay 2018-10-19 21:29:40 -04:00
parent ac8c68de53
commit 0b963078d5
6 changed files with 126 additions and 18 deletions

8
util.h
View file

@ -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