[PATCH v3 0/2] Enable MTE support for stack

claudiu.zissulescu-ianculescu@oracle.com claudiu.zissulescu-ianculescu@oracle.com
Tue Mar 10 14:11:05 GMT 2026


From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>

Hello,

This is a follow up of v2 with the next changes:

 - use mprotect flags PROT_GROWSDOWN/PROT_GROWSUP.
 - corrects macros in cpu-feature.h, and fixes code styles in dl-mte.c
 - adds MTE-aware setjmp/longjmp support for stack tag cleanup.
 - adds a configure check for -fsanitize=memtag-stack compiler flag.
 - adds two new tests.

Changes history:
  - dropped changes related to stack creation for threads. No longer
    needed.
  - Adaped code to changes introduced with:
      "elf: early conversion of elf p_flags to mprotect flags"
 
Best wishes,
Claudiu

Claudiu Zissulescu (1):
  aarch64: Add memory tagging support for setjmp/longjmp routines

Cupertino Miranda (1):
  rtld: Enable MTE for stack when specified in .dynamic

 configure                                     |  36 ++++++
 configure.ac                                  |  17 +++
 elf/elf.h                                     |   7 +-
 sysdeps/aarch64/Makefile                      |  10 ++
 sysdeps/aarch64/__longjmp.S                   |  33 ++++++
 sysdeps/aarch64/cpu-features.h                |  12 ++
 sysdeps/aarch64/dl-mte.c                      |  85 ++++++++++++++
 sysdeps/aarch64/dl-prop.h                     |   4 +
 sysdeps/aarch64/tst-mte-jmp.c                 | 108 ++++++++++++++++++
 sysdeps/aarch64/tst-mte-stack.c               |  74 ++++++++++++
 sysdeps/unix/sysv/linux/aarch64/Makefile      |   4 +
 .../unix/sysv/linux/aarch64/dl-mte-stack.c    |  45 ++++++++
 12 files changed, 434 insertions(+), 1 deletion(-)
 create mode 100644 sysdeps/aarch64/dl-mte.c
 create mode 100644 sysdeps/aarch64/tst-mte-jmp.c
 create mode 100644 sysdeps/aarch64/tst-mte-stack.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-mte-stack.c

-- 
2.53.0



More information about the Libc-alpha mailing list