From: Catalin Marinas <catalin.marinas@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
James Morse <james.morse@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan
Date: Tue, 15 Jun 2021 15:25:39 +0100 [thread overview]
Message-ID: <20210615142539.GJ26027@arm.com> (raw)
In-Reply-To: <1623749578-11231-1-git-send-email-anshuman.khandual@arm.com>
On Tue, Jun 15, 2021 at 03:02:58PM +0530, Anshuman Khandual wrote:
> When using CONFIG_ARM64_SW_TTBR0_PAN, a task's thread_info::ttbr0 must be
> the TTBR0_EL1 value used to run userspace. With 52-bit PAs, the PA must be
> packed into the TTBR using phys_to_ttbr(), but we forget to do this in some
> of the SW PAN code. Thus, if the value is installed into TTBR0_EL1 (as may
> happen in the uaccess routines), this could result in UNPREDICTABLE
> behaviour.
>
> Since hardware with 52-bit PA support almost certainly has HW PAN, which
> will be used in preference, this shouldn't be a practical issue, but let's
> fix this for consistency.
I'm ok with fixing this for consistency. We should never hit those paths
unless someone built hardware with 52-bit PA (8.2) but without PAN (8.1)
and it would not be architecture compliant.
I'll leave it with Will for 5.14, it's no a fix that needs urgent
queuing.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-15 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 9:32 [PATCH] arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan Anshuman Khandual
2021-06-15 14:25 ` Catalin Marinas [this message]
2021-06-15 14:26 ` Will Deacon
2021-06-15 19:18 ` 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=20210615142539.GJ26027@arm.com \
--to=catalin.marinas@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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