mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Shi <yang@os.amperecomputing.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: LAK <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [Question] mprotect() can't clear PROT_MTE
Date: Wed, 29 Oct 2025 15:41:17 -0700	[thread overview]
Message-ID: <04ea9978-e6aa-4498-b899-76d56e19b084@os.amperecomputing.com> (raw)

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


             reply	other threads:[~2025-10-29 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29 22:41 Yang Shi [this message]
2025-10-31 18:48 ` Catalin Marinas
2025-11-03 18:22   ` Yang Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04ea9978-e6aa-4498-b899-76d56e19b084@os.amperecomputing.com \
    --to=yang@os.amperecomputing.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®