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
5
memory.h
5
memory.h
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
int get_metadata_key(void);
|
||||
|
||||
void *memory_map(size_t size);
|
||||
int memory_map_fixed(void *ptr, size_t size);
|
||||
int memory_unmap(void *ptr, size_t size);
|
||||
int memory_protect_rw(void *ptr, size_t size);
|
||||
int memory_protect_ro(void *ptr, size_t size);
|
||||
int memory_protect_rw(void *ptr, size_t size);
|
||||
int memory_protect_rw_metadata(void *ptr, size_t size);
|
||||
int memory_remap(void *old, size_t old_size, size_t new_size);
|
||||
int memory_remap_fixed(void *old, size_t old_size, void *new, size_t new_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue