Enable execute-only memory layouts by default.

This enables execute-only memory (XOM) layouts to be used by default in
the build system. As of now, there's only support for ARM64 devices, so
this only affects those. Since userland XOM requires kernel support,
devices without the necessary support will continue to allow pages
marked execute-only to be read and they should be unaffected by this.

Bug: 77958880
Test: Device with and without kernel support boot.
Test: Binary throws segfault when reading from XOM on supported device.
Test: Debugger works and stack traces are still generated correctly.
Test: Teamfooding, stable during regular usage.

Change-Id: I8db4235c8e60eea6d701bdf3c43b79a06d6b01cd
This commit is contained in:
Ivan Lozano
2019-01-10 09:46:52 -08:00
parent db3c8985be
commit c244c21573
2 changed files with 2 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ ifneq ($(NATIVE_COVERAGE),true)
my_native_coverage := false
endif
ifeq ($(strip $(ENABLE_XOM)),true)
ifneq ($(strip $(ENABLE_XOM)),false)
ifndef LOCAL_IS_HOST_MODULE
my_xom := true
# Disable XOM in excluded paths.

View File

@@ -83,7 +83,7 @@ $(call add_json_bool, Safestack, $(filter true,$(USE_SAF
$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI))))
$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS))
$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS))
$(call add_json_bool, EnableXOM, $(filter true,$(ENABLE_XOM)))
$(call add_json_bool, EnableXOM, $(call invert_bool,$(filter false,$(ENABLE_XOM))))
$(call add_json_list, XOMExcludePaths, $(XOM_EXCLUDE_PATHS) $(PRODUCT_XOM_EXCLUDE_PATHS))
$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))