From: Ryan Roberts <ryan.roberts@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] arm64/ptdump: Test PMD_TYPE_MASK for block mapping
Date: Wed, 9 Oct 2024 14:29:46 +0100 [thread overview]
Message-ID: <db908eb5-fa01-400a-a6c1-36a5ebddb47c@arm.com> (raw)
In-Reply-To: <20241005123824.1366397-4-anshuman.khandual@arm.com>
On 05/10/2024 13:38, Anshuman Khandual wrote:
> arm64 block mapping requires given page table entry's bits[1:0] to be "01".
> But now only bit[1] is checked to be clear, while also implicitly assuming
> bit[0] to be set. This modifies ptdump to check both the relevant bits via
> the mask PMD_TYPE_MASK and check the resultant value against PMD_TYPE_MASK.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> arch/arm64/mm/ptdump.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
> index 264c5f9b97d8..8cec0da4cff2 100644
> --- a/arch/arm64/mm/ptdump.c
> +++ b/arch/arm64/mm/ptdump.c
> @@ -80,10 +80,10 @@ static const struct ptdump_prot_bits pte_bits[] = {
> .set = "CON",
> .clear = " ",
> }, {
> - .mask = PTE_TABLE_BIT,
> - .val = PTE_TABLE_BIT,
> - .set = " ",
> - .clear = "BLK",
> + .mask = PMD_TYPE_MASK,
> + .val = PMD_TYPE_SECT,
> + .set = "BLK",
> + .clear = " ",
> }, {
> .mask = PTE_UXN,
> .val = PTE_UXN,
next prev parent reply other threads:[~2024-10-09 13:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 12:38 [PATCH 0/5] arm64/mm: Drop PXD_TABLE_BIT Anshuman Khandual
2024-10-05 12:38 ` [PATCH 1/5] arm64/mm: Drop pte_mkhuge() Anshuman Khandual
2024-10-09 13:20 ` Ryan Roberts
2024-10-14 8:59 ` Anshuman Khandual
2024-10-14 11:08 ` Ryan Roberts
2024-10-15 4:23 ` Anshuman Khandual
2024-10-05 12:38 ` [PATCH 2/5] arm64/mm: Replace PXD_TABLE_BIT with PXD_TYPE_[MASK|SECT] Anshuman Khandual
2024-10-09 13:28 ` Ryan Roberts
2024-10-14 10:48 ` Anshuman Khandual
2024-10-14 11:33 ` Ryan Roberts
2024-10-15 3:50 ` Anshuman Khandual
2024-10-05 12:38 ` [PATCH 3/5] arm64/ptdump: Test PMD_TYPE_MASK for block mapping Anshuman Khandual
2024-10-09 13:29 ` Ryan Roberts [this message]
2024-10-05 12:38 ` [PATCH 4/5] KVM: arm64: ptdump: " Anshuman Khandual
2024-10-09 13:30 ` Ryan Roberts
2024-10-05 12:38 ` [PATCH 5/5] arm64/mm: Drop PXD_TABLE_BIT Anshuman Khandual
2024-10-09 13:32 ` [PATCH 0/5] " Ryan Roberts
2024-10-15 6:47 ` Anshuman Khandual
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=db908eb5-fa01-400a-a6c1-36a5ebddb47c@arm.com \
--to=ryan.roberts@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--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
Powered by JetHome