[RFD 0/5] Add support for MTE stack tagging.

Indu Bhagat indu.bhagat@oracle.com
Thu Dec 5 22:58:27 GMT 2024


Hello,

I am sending some WIP patches to follow up on some of the questions I
have had with regard to Binutils support for MTE stack tagging.
https://gcc.gnu.org/pipermail/gcc-patches/2024-November/670319.html

Since sending of the above message to gcc-patches mailing list, I
changed the command line options a bit.  I also realised that some text
in the gcc-patches message was a bit incorrect.  So I am sending the
patches, hopefully that conveys the picture better.

The commit log of each commit has some of the above questions listed
too.  Most of the questions are around the implementation of the two
dynamic tags (related to MTE stack tagging).  Although the patchset
addresses three different aspects (i.e., .cfi_mte_tagged_frame CFI
directive, DT_AARCH64_MEMTAG_MODE and DT_AARCH64_MEMTAG_STACK), I am
sending them together for discussion/coordination for next steps.

(PS: I can get rid of the ChangeLog in the commit message later when the
patches are more mature. Also, I have an erratic and sparse work
schedule for December, my responses may be slow.)

Thanks,

Indu Bhagat (5):
  binutils: make read_cie aware of new augmentation char 'G'
  gas: aarch64: suppport CFI directive .cfi_mte_tagged_frame
  ld: aarch64: make EH Frame parsing aware of augmentation char 'G'
  ld/aarch64elf: add support for DT_AARCH64_MEMTAG_MODE dynamic tag
  ld/aarch64elf: add support for DT_AARCH64_MEMTAG_STACK dynamic tag

 bfd/elf-eh-frame.c                            |  2 +
 bfd/elfnn-aarch64.c                           | 21 ++++++++-
 bfd/elfxx-aarch64.h                           | 27 ++++++++++-
 binutils/dwarf.c                              |  2 +
 binutils/readelf.c                            |  3 ++
 gas/config/tc-aarch64.c                       |  9 ++++
 gas/config/tc-aarch64.h                       | 17 +++++--
 gas/doc/c-aarch64.texi                        | 10 ++++
 gas/testsuite/gas/aarch64/mte_tagged_stack.d  | 47 +++++++++++++++++++
 gas/testsuite/gas/aarch64/mte_tagged_stack.s  | 24 ++++++++++
 include/elf/aarch64.h                         |  2 +
 ld/emultempl/aarch64elf.em                    | 47 ++++++++++++++++++-
 ld/ld.texi                                    | 14 ++++++
 ld/testsuite/ld-aarch64/aarch64-elf.exp       |  4 ++
 ld/testsuite/ld-aarch64/dt-memtag-mode.d      |  7 +++
 ld/testsuite/ld-aarch64/dt-memtag-stack.d     |  7 +++
 ld/testsuite/ld-aarch64/dt-memtag.s           |  7 +++
 .../ld-aarch64/mte-tagged-frame-bar.s         | 17 +++++++
 .../ld-aarch64/mte-tagged-frame-foo.s         | 16 +++++++
 ld/testsuite/ld-aarch64/mte-tagged-frame.d    | 29 ++++++++++++
 20 files changed, 303 insertions(+), 9 deletions(-)
 create mode 100644 gas/testsuite/gas/aarch64/mte_tagged_stack.d
 create mode 100644 gas/testsuite/gas/aarch64/mte_tagged_stack.s
 create mode 100644 ld/testsuite/ld-aarch64/dt-memtag-mode.d
 create mode 100644 ld/testsuite/ld-aarch64/dt-memtag-stack.d
 create mode 100644 ld/testsuite/ld-aarch64/dt-memtag.s
 create mode 100644 ld/testsuite/ld-aarch64/mte-tagged-frame-bar.s
 create mode 100644 ld/testsuite/ld-aarch64/mte-tagged-frame-foo.s
 create mode 100644 ld/testsuite/ld-aarch64/mte-tagged-frame.d

-- 
2.43.0



More information about the Binutils mailing list