mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
avoid an ifdef
This commit is contained in:
parent
f214bd541a
commit
bcb93cab63
1 changed files with 2 additions and 4 deletions
|
@ -977,19 +977,17 @@ int get_metadata_key(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline void thread_set_metadata_access(UNUSED unsigned access) {
|
||||
#ifdef USE_PKEY
|
||||
static inline void thread_set_metadata_access(unsigned access) {
|
||||
if (ro.metadata_pkey == -1) {
|
||||
return;
|
||||
}
|
||||
pkey_set(ro.metadata_pkey, access);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void thread_unseal_metadata(void) {
|
||||
#ifdef USE_PKEY
|
||||
thread_set_metadata_access(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void thread_seal_metadata(void) {
|
||||
|
|
Loading…
Add table
Reference in a new issue