Message ID | 20201218192957.11035-1-rearnsha@arm.com |
---|---|
Headers | show |
Series | Memory tagging support | expand |
On Fri, Dec 18, 2020 at 11:31 AM Richard Earnshaw via Libc-alpha <libc-alpha@sourceware.org> wrote: > > Main changes in this version: > > - collapse the changes to the malloc code to a single patch. > - change _LIBC_MTAG to USE_MTAG. Should we use ENABLE_MTAG instead of USE_MTAG? The same glibc binary should work with and without memory tag > - comments around definition of PROT_MTE. > - tunable renamed to glibc.mem.tagging. > - cleanups to assembler files for aarch64 support. > > I'll push a copy of this patch set to rearnsha/mte-v4.0 shortly. > > 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 | 22 ++ > configure.ac | 15 + > elf/dl-tunables.list | 9 + > malloc/arena.c | 59 ++- > malloc/hooks.c | 79 ++-- > malloc/malloc.c | 336 ++++++++++++++---- > malloc/malloc.h | 7 + > manual/install.texi | 13 + > manual/tunables.texi | 35 ++ > sysdeps/aarch64/Makefile | 5 + > sysdeps/aarch64/__mtag_address_get_tag.S | 32 ++ > sysdeps/aarch64/__mtag_memset_tag.S | 53 +++ > sysdeps/aarch64/__mtag_new_tag.S | 37 ++ > sysdeps/aarch64/__mtag_tag_region.S | 51 +++ > 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 | 1 + > .../unix/sysv/linux/aarch64/cpu-features.c | 30 ++ > .../unix/sysv/linux/aarch64/cpu-features.h | 2 + > sysdeps/unix/sysv/linux/sys/prctl.h | 18 + > 24 files changed, 836 insertions(+), 97 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 > > -- > 2.29.2 >
On 12/19/20 12:59 AM, Richard Earnshaw via Libc-alpha wrote: > Main changes in this version: > > - collapse the changes to the malloc code to a single patch. > - change _LIBC_MTAG to USE_MTAG. > - comments around definition of PROT_MTE. > - tunable renamed to glibc.mem.tagging. > - cleanups to assembler files for aarch64 support. > I've tested the build to verify that --enable-memory-tagging works correctly on x86_64 and the resulting bins don't regress the testsuite. I'm working through the individual patches to review; will post comments shortly. Siddhesh
On 12/21/20 5:58 PM, Siddhesh Poyarekar wrote: > On 12/19/20 12:59 AM, Richard Earnshaw via Libc-alpha wrote: >> Main changes in this version: >> >> - collapse the changes to the malloc code to a single patch. >> - change _LIBC_MTAG to USE_MTAG. >> - comments around definition of PROT_MTE. >> - tunable renamed to glibc.mem.tagging. >> - cleanups to assembler files for aarch64 support. >> > > I've tested the build to verify that --enable-memory-tagging works > correctly on x86_64 and the resulting bins don't regress the testsuite. > I'm working through the individual patches to review; will post > comments shortly. I've gone through the patch series and I think it is good to go with a couple of minor changes I've suggested in the reviews. I've mostly deferred to Szabolcs' review for 5/6 and 6/6 since they're aarch64-specific. The changes are small enough that you could commit with the changes. However, please post the series that you commit so that we know what went in finally. Thanks, Siddhesh