Re: [RFC PATCH 0/2] kasan: hw_tags: Add option to tag only at allocation time
Harry Yoo <[email protected]> Mon, 22 Jun 2026 21:56:24 +0900
| Newsgroups | org.kernel.vger.workflows,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 6/19/26 10:04 PM, Catalin Marinas wrote: > On Thu, Jun 18, 2026 at 11:05:43PM +0900, Harry Yoo wrote: >> On 6/18/26 10:35 PM, Harry Yoo wrote: >>> On 6/12/26 1:44 PM, Dev Jain wrote: >>>> Introduce a boot option to tag only at allocation time of the objects. This >>>> reduces KASAN MTE overhead, the tradeoff being reduced ability of >>>> catching bugs. >>> >>> I think most of overhead when enabling MTE comes from loading and >>> validing tags for every memory access (either in SYNC or ASYNC mode), >>> rather than from storing tags. >> >> Is there any reason not to use STGM instead of STG + DC GVA when >> setting/clearing tags for large sizes when we know they are properly >> aligned? > > STGM is intended for copying tags when paired with LDGM. Have you seen > hardware where STGM is faster than STG or DC GVA? No, I haven't. It was a question I had after learning that there are multiple ways to store tags ;) > For properly aligned > buffers, I'd expect DC GVA to behave at least on par with STGM. Thanks for answering! -- Cheers, Harry / Hyeonggon
OpenPGP_signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQQ1ub6gR5ogjaKRmOGXBN6rc5S1gUCajkw+AAKCRCGXBN6rc5S 1qvyAPsF0DurImeEtMtFke9YXQWImsgXI+xfZ4SEz1mY+wbGswEA158qtw/Yf70R 7SKOnegedFGVqJzsq5p+vAkSpPMfJQw= =RsAK -----END PGP SIGNATURE-----