From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org
Cc: Mark Brown <broonie@kernel.org>, Will Deacon <will@kernel.org>,
Emanuele Rocca <emanuele.rocca@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2 2/3] arm64: gcs: Honour mprotect(PROT_NONE) on shadow stack mappings
Date: Mon, 23 Feb 2026 20:20:35 +0100 [thread overview]
Message-ID: <f82a2464-d1ea-4ee9-933a-654024e33cf6@kernel.org> (raw)
In-Reply-To: <20260223174533.1478164-3-catalin.marinas@arm.com>
On 2/23/26 18:45, Catalin Marinas wrote:
> vm_get_page_prot() short-circuits the protection_map[] lookup for a
> VM_SHADOW_STACK mapping since it uses a different PIE index from the
> typical read/write/exec permissions. However, the side effect is that it
> also ignores mprotect(PROT_NONE) by creating an accessible PTE.
>
> Special-case the !(vm_flags & VM_ACCESS_FLAGS) flags to use the
> protection_map[VM_NONE] permissions instead. No GCS attributes are
> required for an inaccessible PTE.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Fixes: 6497b66ba694 ("arm64/mm: Map pages for guarded control stack")
> Cc: <stable@vger.kernel.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: David Hildenbrand <david@kernel.org>
> ---
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
next prev parent reply other threads:[~2026-02-23 19:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 17:45 [PATCH v2 0/3] arm64: Assorted GCS fixes Catalin Marinas
2026-02-23 17:45 ` [PATCH v2 1/3] arm64: gcs: Do not set PTE_SHARED on GCS mappings if FEAT_LPA2 is enabled Catalin Marinas
2026-02-23 19:20 ` David Hildenbrand (Arm)
2026-02-23 17:45 ` [PATCH v2 2/3] arm64: gcs: Honour mprotect(PROT_NONE) on shadow stack mappings Catalin Marinas
2026-02-23 19:20 ` David Hildenbrand (Arm) [this message]
2026-02-23 17:45 ` [PATCH v2 3/3] kselftest: arm64: Check access to GCS after mprotect(PROT_NONE) Catalin Marinas
2026-02-23 18:48 ` Mark Brown
2026-02-26 0:06 ` [PATCH v2 0/3] arm64: Assorted GCS fixes Will Deacon
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=f82a2464-d1ea-4ee9-933a-654024e33cf6@kernel.org \
--to=david@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=emanuele.rocca@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=skhan@linuxfoundation.org \
--cc=will@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