[PATCH v3 2/4] prtcl: introduce PR_MTE_STORE_ONLY

Yeo Reum Yun YeoReum.Yun at arm.com
Mon Apr 28 08:46:17 PDT 2025


Hi David.

> > PR_MTE_STORE_ONLY is used to restrict the MTE tag check for store
> > opeartion only.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun at arm.com>
> > ---
> >   include/uapi/linux/prctl.h | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
> > index 15c18ef4eb11..83ac566251d8 100644
> > --- a/include/uapi/linux/prctl.h
> > +++ b/include/uapi/linux/prctl.h
> > @@ -244,6 +244,8 @@ struct prctl_mm_map {
> >   # define PR_MTE_TAG_MASK            (0xffffUL << PR_MTE_TAG_SHIFT)
> >   /* Unused; kept only for source compatibility */
> >   # define PR_MTE_TCF_SHIFT           1
> > +/* MTE tag check store only */
> > +# define PR_MTE_STORE_ONLY           (1UL << 19)
>
> That is the next available bit after PR_MTE_TAG_MASK, correct?
>
> Would we want to leave some space to grow PR_MTE_TAG_MASK in the future
> (could that happen?)?

Yes it is. But I don't think it would grow up
since  GCR_EL1's exlude field size 16 bits where PR_MTE_TAG_MASK value is set
and the next bit is used by other purpose. 

thou, exclude field would be some bit filed in GCR_EL1
AFAIK there's no plan to add new exclude field to extend
and when new field is added for this, I think it would be better to add correspond
MASK for the new field.

Thanks.

---
Sincerely,
Yeoreum Yun



More information about the linux-arm-kernel mailing list