[PATCH v3 7/8] aarch64: Add sysv specific enabling code for memory tagging

Siddhesh Poyarekar siddhesh@gotplt.org
Wed Nov 25 16:23:08 GMT 2020


On 11/25/20 9:50 PM, Siddhesh Poyarekar wrote:
> On 11/25/20 9:36 PM, Richard Earnshaw wrote:
>> Well, I could rewrite (0xfffe << PR_MTE_TAG_SHIFT) as
>>
>>    (PR_MTE_TAG_MASK & ~(1UL << PR_MTE_TAG_SHIFT))
>>
>> but I'm not entirely convinced that's a lot more understandable: it's
>> just a bit-mask of tags that can be enabled.
> 
> It isn't, I think what would work is a single macro that describes what 
> (PR_MTE_TAG_MASK & ~(1UL << PR_MTE_TAG_SHIFT)) is, e.g.  DISALLOW_TAG_0 
> assuming that that's the intention since I can't tell what it's for at 
> the moment.

Of course, I should have read your response properly before suggesting; 
ALLOWED_TAGS_BITMASK should be intuitive enough as long as one isn't 
talking to their kid while reading code.

Siddhesh


More information about the Libc-alpha mailing list