mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-09-22 22:14:38 -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
Makefile
5
Makefile
|
@ -1,5 +1,6 @@
|
|||
CONFIG_CXX_ALLOCATOR := true
|
||||
CONFIG_UBSAN := false
|
||||
CONFIG_SEAL_METADATA := false
|
||||
|
||||
CPPFLAGS := -D_GNU_SOURCE
|
||||
SHARED_FLAGS := -O2 -flto -fPIC -fvisibility=hidden -fno-plt -pipe -Wall -Wextra -Wcast-align=strict -Wcast-qual -Wwrite-strings
|
||||
|
@ -22,6 +23,10 @@ ifeq ($(CONFIG_UBSAN),true)
|
|||
CXXFLAGS += -fsanitize=undefined
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SEAL_METADATA),true)
|
||||
CPPFLAGS += -DCONFIG_SEAL_METADATA
|
||||
endif
|
||||
|
||||
hardened_malloc.so: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -shared $^ $(LDLIBS) -o $@
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue