mbox series

[v2,0/6] Memory tagging support

Message ID 20200624155349.12134-1-rearnsha@arm.com
Headers show
Series Memory tagging support | expand

Message

Richard Earnshaw June 24, 2020, 3:53 p.m. UTC
Changes since version 1:

Regerated INSTALL

cpu-features - ensure that the memtag tunable is cleared if the HW
does not support MTE.

Fix issues with MALLOC_CHECK_ != 0; disable the guard byte code when
memory tagging is enabled - it serves no purpose since the tags
provide the checking.

Rework the __malloc_usable_size/musable code so that when memory
tagging is disabled at run-time, but enabled in the library, we avoid
wasting the word in the malloc chunk header unnecessarily.  Move the
round-up allocation size inside checked_request2size and do it after
the out-of-bounds check; the check can now be simplified to a simple
round-up to a granule boundary.

Make some new function pointers static; they shouldn't be used outside
the malloc module.

Rebase onto 6f3331f26d2ee5d210ba768389828c391750f7a0, eliminating the
need for changes to memchr.S strchr.S strchrnul.S strcmp.S strcpy.S

R.

==========

Richard Earnshaw (6):
  config: Allow memory tagging to be enabled when configuring glibc
  elf: Add a tunable to control use of tagged memory
  malloc: Basic support for memory tagging in the malloc() family
  linux: Add compatibility definitions to sys/prctl.h for MTE
  aarch64: Add sysv specific enabling code for memory tagging
  aarch64: Add aarch64-specific files for memory tagging support

 INSTALL                                       |  14 ++
 config.h.in                                   |   3 +
 config.make.in                                |   2 +
 configure                                     |  17 ++
 configure.ac                                  |  10 +
 elf/dl-tunables.list                          |   9 +
 malloc/arena.c                                |  43 +++-
 malloc/hooks.c                                |   6 +
 malloc/malloc.c                               | 186 ++++++++++++++----
 malloc/malloc.h                               |   7 +
 manual/install.texi                           |  13 ++
 manual/tunables.texi                          |  31 +++
 sysdeps/aarch64/Makefile                      |   5 +
 sysdeps/aarch64/__mtag_address_get_tag.S      |  31 +++
 sysdeps/aarch64/__mtag_memset_tag.S           |  46 +++++
 sysdeps/aarch64/__mtag_new_tag.S              |  38 ++++
 sysdeps/aarch64/__mtag_tag_region.S           |  44 +++++
 sysdeps/aarch64/libc-mtag.h                   |  57 ++++++
 sysdeps/generic/libc-mtag.h                   |  52 +++++
 sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h  |   1 +
 sysdeps/unix/sysv/linux/aarch64/bits/mman.h   |  32 +++
 .../unix/sysv/linux/aarch64/cpu-features.c    |  28 +++
 .../unix/sysv/linux/aarch64/cpu-features.h    |   1 +
 sysdeps/unix/sysv/linux/sys/prctl.h           |  18 ++
 24 files changed, 652 insertions(+), 42 deletions(-)
 create mode 100644 sysdeps/aarch64/__mtag_address_get_tag.S
 create mode 100644 sysdeps/aarch64/__mtag_memset_tag.S
 create mode 100644 sysdeps/aarch64/__mtag_new_tag.S
 create mode 100644 sysdeps/aarch64/__mtag_tag_region.S
 create mode 100644 sysdeps/aarch64/libc-mtag.h
 create mode 100644 sysdeps/generic/libc-mtag.h
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/mman.h