linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [Question] mprotect() can't clear PROT_MTE
@ 2025-10-29 22:41 Yang Shi
  2025-10-31 18:48 ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Shi @ 2025-10-29 22:41 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: LAK, Linux Kernel Mailing List

Hi Catalin,

Our customers have usecase to untag memory w/o unmapping it, but 
mprotect can't do it. It seems like an intended behavior because I saw 
MTE doc explicitly says PROT_MTE flags can't be cleared by mprotect().
But I don't see why mprotect() can't do it if I don't miss anything. So 
I'd like to know why it behaves in this way.

unmap + mmap or mmap(MAP_FIXED) can do the trick, but it is not feasible 
for anonymous mapping because unamp will wipe all the data.

Thanks,
Yang



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-03 18:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 22:41 [Question] mprotect() can't clear PROT_MTE Yang Shi
2025-10-31 18:48 ` Catalin Marinas
2025-11-03 18:22   ` Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).