malloc: Only support zeroing and not arbitrary memset with mtag

System Internals / glibc - Szabolcs Nagy [arm.com] - 26 March 2021 11:03 UTC

The memset api is suboptimal and does not provide much benefit. Memory tagging only needs a zeroing memset (and only for memory that's sized and aligned to multiples of the tag granule), so change the internal api and the target hooks accordingly. This is to simplify the implementation of the target hook.

c076a0bc69 malloc: Only support zeroing and not arbitrary memset with mtag
malloc/malloc.c | 17 ++++++++---------
sysdeps/aarch64/Makefile | 2 +-
.../{__mtag_memset_tag.S => __mtag_tag_zero_region.S} | 18 +++++++-----------
sysdeps/aarch64/libc-mtag.h | 4 ++--
sysdeps/generic/libc-mtag.h | 6 +++---
5 files changed, 21 insertions(+), 26 deletions(-)

Upstream: sourceware.org


  • Share