[PATCH 1/2] rtld: Enable MTE for stack when specified in .dynamic.
Yury Khrustalev
yury.khrustalev@arm.com
Thu Feb 26 10:06:30 GMT 2026
On Thu, Feb 26, 2026 at 09:52:02AM +0000, Yury Khrustalev wrote:
> On Fri, Mar 14, 2025 at 01:21:41PM +0000, Cupertino Miranda wrote:
> > MTE stack tagging enabled executables are flagged by setting the dynamic
> > array tag DT_AARCH64_MEMTAG_STACK as described in section 6 from:
> > https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst
> >
> > Also the mode in which MTE would react to MTE faults is set by the tag
> > DT_AARCH64_MEMTAG_MODE.
> >
> > This patch verifies for the presence of those tags in the dynamic array
> > and performs mprotect on the main application stack map with the extra
> > PROT_MTE flag.
>
> ...
>
> > ...
> >
> > +void
> > +_dl_mte_stack_check (struct link_map *l, const char *program)
> > +{
> > + /* TODO: Replace the dynamic info by gnu.property entry. */
>
> Using GNU property instead of dynamic array entry needs to be discussed
> first. If we deviate from the mem tag ABI we should agree on the
> interface first.
We should raise an issue here and discuss this because it will need to
be documented:
https://github.com/ARM-software/abi-aa
Regards,
Yury
More information about the Libc-alpha
mailing list