[PATCH v4 3/6] malloc: Basic support for memory tagging in the malloc() family

Richard Earnshaw rearnsha@arm.com
Fri Dec 18 19:29:54 GMT 2020


This patch adds the basic support for memory tagging.

Various flavours are supported, particularly being able to turn on
tagged memory at run-time: this allows the same code to be used on
systems where memory tagging support is not present without neededing
a separate build of glibc.  Also, depending on whether the kernel
supports it, the code will use mmap for the default arena if morecore
does not, or cannot support tagged memory (on AArch64 it is not
available).

All the hooks use function pointers to allow this to work without
needing ifuncs.
---
 malloc/arena.c              |  59 ++++++-
 malloc/hooks.c              |  79 ++++++---
 malloc/malloc.c             | 336 +++++++++++++++++++++++++++++-------
 malloc/malloc.h             |   7 +
 sysdeps/generic/libc-mtag.h |  52 ++++++
 5 files changed, 436 insertions(+), 97 deletions(-)
 create mode 100644 sysdeps/generic/libc-mtag.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4-0003-malloc-Basic-support-for-memory-tagging-in-the-ma.patch
Type: text/x-patch
Size: 43139 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20201218/62109950/attachment-0001.bin>


More information about the Libc-alpha mailing list