mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-08-07 22:22:16 -04:00
add configuration for self-init
This needs to be disabled for compatibility with the exploit protection compatibility mode on GrapheneOS. hardened_malloc shouldn't be trying to initialize itself when exploit protection compatibility mode is enabled. This has to be handled in our Bionic integration instead.
This commit is contained in:
parent
dd427cb3b8
commit
8f38bbdee6
5 changed files with 11 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -84,6 +84,10 @@ ifeq (,$(filter $(CONFIG_STATS),true false))
|
|||
$(error CONFIG_STATS must be true or false)
|
||||
endif
|
||||
|
||||
ifeq (,$(filter $(CONFIG_SELF_INIT),true false))
|
||||
$(error CONFIG_SELF_INIT must be true or false)
|
||||
endif
|
||||
|
||||
CPPFLAGS += \
|
||||
-DCONFIG_SEAL_METADATA=$(CONFIG_SEAL_METADATA) \
|
||||
-DZERO_ON_FREE=$(CONFIG_ZERO_ON_FREE) \
|
||||
|
@ -102,7 +106,8 @@ CPPFLAGS += \
|
|||
-DFREE_SLABS_QUARANTINE_RANDOM_LENGTH=$(CONFIG_FREE_SLABS_QUARANTINE_RANDOM_LENGTH) \
|
||||
-DCONFIG_CLASS_REGION_SIZE=$(CONFIG_CLASS_REGION_SIZE) \
|
||||
-DN_ARENA=$(CONFIG_N_ARENA) \
|
||||
-DCONFIG_STATS=$(CONFIG_STATS)
|
||||
-DCONFIG_STATS=$(CONFIG_STATS) \
|
||||
-DCONFIG_SELF_INIT=$(CONFIG_SELF_INIT)
|
||||
|
||||
$(OUT)/libhardened_malloc$(SUFFIX).so: $(OBJECTS) | $(OUT)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -shared $^ $(LDLIBS) -o $@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue