[PATCH v3 0/8] Memory tagging support

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Nov 24 10:12:59 GMT 2020


The 11/23/2020 15:42, Richard Earnshaw wrote:
> This is the third iteration of the patch set to enable memory tagging
> in glibc's malloc code.  It mainly addresses the following issues raised
> during the previous review:
> 
>  - Clean up/add some internal API documentation
>  - Remove ROUND_UP_ALLOCATION_SIZE and use some conditionalized code
>    in checked_request2size instead.
>  - Support MALLOC_CHECK_ in conjuction with _MTAG_ENABLE.
> 
> The first two issues are addressed in patch 4 of this series, and the
> third in patch 5.  I intend to merge patches 3, 4 and 5 into a single
> update to the malloc code before the final commit; I've kept them
> separate for now to (hopefully) simplify the review.
> 
> The patches have all been rebased against master as of 2020/11/20.
> 
> I spent quite a bit of time while working on these looking at whether
> the code could be refactored in order to reduce the places where
> SIZE_SZ was being added (in different multiples) to various pointers.
> I eventually concluded that this wasn't significantly improving the
> readability of the code, but one change has survived - I've replaced
> usage of 2 * SIZE_SZ with CHUNK_HDR_SZ when it is clear that this is
> referring to the header block at the start of a chunk.
> 
> I've pushed a copy of this patch series to rearnsha/mte-v3.0, since I
> understand some people want to try the patch series as a whole.

cross testing with --enable-memory-tagging and
_MTAG_ENABLE=3 in qemu with arm64 for-next/mte
linux branch, the new failures i see:

FAIL: malloc/tst-malloc-backtrace
FAIL: malloc/tst-mallocstate
FAIL: malloc/tst-safe-linking
FAIL: malloc/tst-tcfree1
FAIL: malloc/tst-tcfree2
FAIL: malloc/tst-tcfree3
	all these tests have use after free
FAIL: posix/tst-mmap
	unaligned mmap over malloced memory now
	fails with ENOMEM instead of EINVAL.

i think these are all reasonable failures for mte.
(the malloc/ ones can be unsupported, and the mmap
test can use mmaped memory instead of malloced)



More information about the Libc-alpha mailing list