[PATCH 2/2] nptl: Enable MTE for stacks created for threads.
Florian Weimer
fweimer@redhat.com
Fri Mar 14 16:35:46 GMT 2025
* Cupertino Miranda:
> diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
> index 800ca89720..6155157063 100644
> --- a/nptl/allocatestack.c
> +++ b/nptl/allocatestack.c
> @@ -153,7 +153,8 @@ static int allocate_stack_mode = ALLOCATE_GUARD_MADV_GUARD;
> static inline int stack_prot (void)
> {
> return (PROT_READ | PROT_WRITE
> - | ((GL(dl_stack_flags) & PF_X) ? PROT_EXEC : 0));
> + | ((GL(dl_stack_flags) & PF_X) ? PROT_EXEC : 0)
> + | stack_mem_tagging_prot ());
> }
I think we should clean this up and arrange for the dynamic linker to
determine the PROT_* flags for stacks created at run time, so that we
can use that variable directly without further processing.
Thanks,
Florian
More information about the Libc-alpha
mailing list