Re: [PATCH v4 0/4] Application Data Integrity feature introduced by SPARC M7

From: David Miller
Date: Mon Jan 16 2017 - 23:52:35 EST


From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Date: Wed, 11 Jan 2017 08:33:30 -0800

> Is there a cost in the hardware associated with doing this "ADI
> checking"? For instance, instead of having this new mprotect()
> interface, why not just always set TTE.mcd on all PTEs?

If we did this then for every page mapped into userspace we'd have
to explicitly set all of the tags to zero, otherwise we'd get TAG
mismatch exceptions.

That would be like clearing the every mapped anonymous page twice, or
worse.