[PATCH v3 0/8] Memory tagging support

Richard Earnshaw Richard.Earnshaw@foss.arm.com
Thu Dec 17 11:31:31 GMT 2020


On 17/12/2020 03:57, DJ Delorie via Libc-alpha wrote:
> 
> So I gave the full patch set a review (having forgotten what I mentioned
> the last time :-P ) keeping in mind my original comments when you first
> brought this up - "As long as you don't impact other platforms, go for
> it."  :-)
> 
> I did note that sometimes you used the "(void) ..." idiom and sometimes
> you didn't, and as I just noted that in another thread, I feel obliged
> to be consistent here, and ask that you use it consistently ;-)
> 

I really don't like the (void) idiom, but used it in a couple of cases
because it's needed.  For example,

+  /* Mark the chunk as belonging to the library again.  */
+  (void)TAG_REGION (chunk2rawmem (p), __malloc_usable_size (mem));

TAG_REGION returns it's first argument (because there are cases where
this valude is wanted) and in case where MTE is disabled, this just
expands to a statement with no effect - and thus a compiler warning.
The "(void)" idiom suppresses those warnings.


> But otherwise LGETM (looks good enough for me!) :-)
> 
> Reviewed-by: DJ Delorie <dj@redhat.com>
> 

Many thanks,

R.


More information about the Libc-alpha mailing list