Peter Collingbourne | e5373c7 | 2023-03-15 14:29:53 -0700 | [diff] [blame] | 1 | # |
| 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 |
| 22 | ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),) |
Florian Mayer | b820c1c | 2024-12-11 05:27:10 -0800 | [diff] [blame] | 23 | SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap memtag_stack memtag_globals) |
Peter Collingbourne | e5373c7 | 2023-03-15 14:29:53 -0700 | [diff] [blame] | 24 | SANITIZE_TARGET_DIAG := $(strip $(SANITIZE_TARGET_DIAG) memtag_heap) |
| 25 | endif |
| 26 | PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.default=sync |
Florian Mayer | beb5bed | 2023-11-07 10:12:26 -0800 | [diff] [blame] | 27 | PRODUCT_SCUDO_ALLOCATION_RING_BUFFER_SIZE := 131072 |