mte: note why 0 tag is excluded

pull/226/head
Dmitry Muhomor 2023-10-30 12:31:12 +02:00 committed by Daniel Micay
parent 009f2dad76
commit b560431c01
1 changed files with 2 additions and 1 deletions

View File

@ -577,7 +577,8 @@ static void *tag_and_clear_slab_slot(struct slab_metadata *metadata, void *slot_
// is constructed. // is constructed.
u8 *slot_tags = metadata->arm_mte_tags; u8 *slot_tags = metadata->arm_mte_tags;
// Tag exclusion mask // Tag exclusion mask. 0 tag is always excluded to detect accesses to slab memory via untagged
// pointers. Moreover, 0 tag is excluded in bionic via PR_MTE_TAG_MASK prctl
u64 tem = (1 << 0) | (1 << RESERVED_TAG); u64 tem = (1 << 0) | (1 << RESERVED_TAG);
// current or previous tag of left neighbor or 0 if there's no left neighbor or if it was never used // current or previous tag of left neighbor or 0 if there's no left neighbor or if it was never used