From: Will Deacon <will@kernel.org>
To: linux-arm-kernel@lists.infradead.org, Will Deacon <will@kernel.org>
Cc: catalin.marinas@arm.com, kernel-team@android.com,
Ard Biesheuvel <ardb@kernel.org>,
stable@vger.kernel.org, Asahi Lina <lina@asahilina.net>
Subject: Re: [PATCH] arm64: mm: Fix lockless walks with static and dynamic page-table folding
Date: Thu, 25 Jul 2024 13:43:00 +0100 [thread overview]
Message-ID: <172191005619.4039653.10092210051964314188.b4-ty@kernel.org> (raw)
In-Reply-To: <20240725090345.28461-1-will@kernel.org>
On Thu, 25 Jul 2024 10:03:45 +0100, Will Deacon wrote:
> Lina reports random oopsen originating from the fast GUP code when
> 16K pages are used with 4-level page-tables, the fourth level being
> folded at runtime due to lack of LPA2.
>
> In this configuration, the generic implementation of
> p4d_offset_lockless() will return a 'p4d_t *' corresponding to the
> 'pgd_t' allocated on the stack of the caller, gup_fast_pgd_range().
> This is normally fine, but when the fourth level of page-table is folded
> at runtime, pud_offset_lockless() will offset from the address of the
> 'p4d_t' to calculate the address of the PUD in the same page-table page.
> This results in a stray stack read when the 'p4d_t' has been allocated
> on the stack and can send the walker into the weeds.
>
> [...]
Applied to arm64 (for-next/core), thanks!
[1/1] arm64: mm: Fix lockless walks with static and dynamic page-table folding
https://git.kernel.org/arm64/c/36639013b346
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
prev parent reply other threads:[~2024-07-25 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 9:03 [PATCH] arm64: mm: Fix lockless walks with static and dynamic page-table folding Will Deacon
2024-07-25 9:11 ` Ard Biesheuvel
2024-07-25 12:43 ` Will Deacon [this message]
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=172191005619.4039653.10092210051964314188.b4-ty@kernel.org \
--to=will@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@android.com \
--cc=lina@asahilina.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=stable@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