[PATCH v3 1/2] rtld: Enable MTE for stack when specified in .dynamic

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Mar 16 16:24:23 GMT 2026



On 16/03/26 12:12, Yury Khrustalev wrote:
> On Mon, Mar 16, 2026 at 11:43:03AM -0300, Adhemerval Zanella Netto wrote:
>>
>> ...
>>
>>> We really cannot: that ABI has been ALPHA which means it's unstable and
>>> is subject to change.
>>
>> It is not clear to me exactly what you think we not commit wrt current 
>> AArch64 Memtag ABI.
> 
> Adhemerval, if you read the document [1], you will surely see (section
> 3. Scope):
> 
>   As an alpha document all details in this document are subject to change.
>    
> I really don't know what else to add here. My understanding was that
> Glibc does not add implementation for unstable ABI as a rule...
> 
>> Both gcc and clang support DT_AARCH64_MEMTAG_* for a
>> while, and even Memtag ABI Extension is not fully clear about all runtime
>> behavior compile support is ready and current definitions are reasonable. 
> 
> What exactly is implemented in gcc and clang with respect to stack
> tagging? There is an implementation in GCC that doesn't seem to be
> documented anywhere (at least I couldn't find any relevant spec).

The gcc has a wiki describing the planned support [1]. And gcc-16 has
support -fsanitize=memtag-stack, which pass z memtag-stack to enable
DT_AARCH64_MEMTAG_STACK creation.

> 
> For example, could you please point me to a place in [1] that explains
> what is expected to happen in longjmp / setjmp?

My understanding is Memtag ABI Extension to *ELF* do not, and I expect
not to, get into detail about the semantic of a *C* function. The documentation
is runtime neutral, so it should up to the implementers. 

> 
> We could use [1] as a vehicle to explore various options, but we should
> not really use this document as the only reason to merge related changes
> upstream.
> 
> [1]: https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst
> 

[1] https://gcc.gnu.org/wiki/MTE


More information about the Libc-alpha mailing list