[PATCH] D128958: Add assembler plumbing for sanitize_memtag

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 01:13:55 PDT 2022


peter.smith added a comment.

Purely on the ABI front, I've got some questions and suggestions.

As a general open question, what are your ABI plans? Is it to create an Android specific ABI for .memtag, which presumably will need to be maintained for some period of time? I assume that if there is an alternative Linux ABI defined, presumably in the AArch64 ABI https://github.com/ARM-software/abi-aa then you'll consider adopting that?

As an aside the ABI is open for contributions https://github.com/ARM-software/abi-aa/blob/main/CONTRIBUTING.md if there is an effort to get a memtag ABI defined (not aware of one internally) we'd like to work with everyone to write something up. The PAuthABI (https://discourse.llvm.org/t/llvm-pointer-authentication-sync-ups/62661/5) is an example of that. We have an ELF extension https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst that has some additional relocations and dynamic relocations reserved.

For Arm/AArch64 specific sections, although I can't find it written down as "reserved" we try and follow a naming convention for Arm/AArch64 specific sections such as `.ARM.attributes` . My expectation is that anything that we define that is `SHT_PROGBITS` that is specific to Arm/AArch64 will have a `.ARM.` or `.AArch64.` prefix. If your section name is specific to Android, but could be supported on other architectures at some future point, could you use something like `.Android.memtag`?

For the `.memtag` directive there could be a parameter, potentially optional that changed its behaviour. For example `.memtag huge, android` `.memtag huge, arm`. It wouldn't be the end of the world if there had to be a second directive with a different name, although that would be potentially confusing. There doesn't seem to be a naming convention for directives in GNU assembler like there would be section names.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128958/new/

https://reviews.llvm.org/D128958



More information about the llvm-commits mailing list