Merge "Update bionic to the v2 MTE patch set." am: 2dd382d9b6 am: d53f4f847d

Change-Id: I38a6f6a9b5c5e7a991ce458b98b1628990c89155
This commit is contained in:
Automerger Merge Worker 2020-02-28 17:09:52 +00:00
commit 1a94111c80
2 changed files with 7 additions and 6 deletions

View file

@ -46,7 +46,8 @@ void SetDefaultHeapTaggingLevel() {
// or hardware doesn't support MTE, and we will fall back to just enabling tagged pointers in
// syscall arguments.
if (prctl(PR_SET_TAGGED_ADDR_CTRL,
PR_TAGGED_ADDR_ENABLE | PR_MTE_TCF_ASYNC | (1 << PR_MTE_EXCL_SHIFT), 0, 0, 0) == 0) {
PR_TAGGED_ADDR_ENABLE | PR_MTE_TCF_ASYNC | (0xfffe << PR_MTE_TAG_SHIFT), 0, 0,
0) == 0) {
heap_tagging_level = M_HEAP_TAGGING_LEVEL_ASYNC;
return;
}

View file

@ -37,7 +37,7 @@
#ifdef ANDROID_EXPERIMENTAL_MTE
#define HWCAP2_MTE (1 << 10)
#define HWCAP2_MTE (1 << 18)
#define PROT_MTE 0x20
#define PR_MTE_TCF_SHIFT 1
@ -45,10 +45,10 @@
#define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
#define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
#define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
#define PR_MTE_EXCL_SHIFT 3
#define PR_MTE_EXCL_MASK (0xffffUL << PR_MTE_EXCL_SHIFT)
#define PR_MTE_TAG_SHIFT 3
#define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
#define SEGV_MTEAERR 6
#define SEGV_MTESERR 7
#define SEGV_MTEAERR 8
#define SEGV_MTESERR 9
#endif