[PATCH v3 3/8] malloc: Basic support for memory tagging in the malloc() family
Richard Earnshaw
Richard.Earnshaw@foss.arm.com
Wed Nov 25 17:32:05 GMT 2020
On 25/11/2020 14:58, Florian Weimer via Libc-alpha wrote:
> * Richard Earnshaw via Libc-alpha:
>
>> +/* Set the tags for a region of memory, which must have size and alignment
>> + that are multiples of __MTAG_GRANULE_SIZE. Size cannot be zero.
>> + void *__libc_mtag_tag_region (const void *, size_t) */
>> +#define __libc_mtag_tag_region(p, s) (p)
>
> I think we need a description of how the tagging operation is supposed
> to work. For example, it's surprising that the requested tag is not
> specified in an argument.
>
> Thanks,
> Florian
>
The (new) tag is already encoded in the pointer. It's (obviously)
implementation specific how that is done. I'll clarify the comment.
R.
More information about the Libc-alpha
mailing list