blob: fed66e7ef26c7d16d3ef10eb07f67994786f71f8 [file] [log] [blame]
Peter Collingbournee5373c72023-03-15 14:29:53 -07001#
2# Copyright (C) 2023 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# Enables more comprehensive detection of memory errors on hardware that
18# supports the ARM Memory Tagging Extension (MTE), by building the image with
19# MTE stack instrumentation and forcing MTE on in SYNC mode in all processes.
20# For more details, see:
21# https://source.android.com/docs/security/test/memory-safety/arm-mte
22ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
Florian Mayerb820c1c2024-12-11 05:27:10 -080023 SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap memtag_stack memtag_globals)
Peter Collingbournee5373c72023-03-15 14:29:53 -070024 SANITIZE_TARGET_DIAG := $(strip $(SANITIZE_TARGET_DIAG) memtag_heap)
25endif
26PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.default=sync
Florian Mayerbeb5bed2023-11-07 10:12:26 -080027PRODUCT_SCUDO_ALLOCATION_RING_BUFFER_SIZE := 131072