From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>, Marc Zyngier <maz@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH] KVM: arm64: Pass the actual page address to mte_clear_page_tags()
Date: Fri, 20 Jan 2023 17:38:51 +0530 [thread overview]
Message-ID: <34b65af4-0775-09a1-0f67-1c8c74caac1b@arm.com> (raw)
In-Reply-To: <20230119170902.1574756-1-catalin.marinas@arm.com>
On 1/19/23 22:39, Catalin Marinas wrote:
> Commit d77e59a8fccd ("arm64: mte: Lock a page for MTE tag
> initialisation") added a call to mte_clear_page_tags() in case a
> prior mte_copy_tags_from_user() failed in order to avoid stale tags in
> the guest page (it should have really been a separate commit).
> Unfortunately, the argument passed to this function was the address of
> the struct page rather than the actual page address. Fix this function
> call.
>
> Fixes: d77e59a8fccd ("arm64: mte: Lock a page for MTE tag initialisation")
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> arch/arm64/kvm/guest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
> index 5626ddb540ce..cf4c495a4321 100644
> --- a/arch/arm64/kvm/guest.c
> +++ b/arch/arm64/kvm/guest.c
> @@ -1079,7 +1079,7 @@ long kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm,
>
> /* uaccess failed, don't leave stale tags */
> if (num_tags != MTE_GRANULES_PER_PAGE)
> - mte_clear_page_tags(page);
> + mte_clear_page_tags(maddr);
> set_page_mte_tagged(page);
>
> kvm_release_pfn_dirty(pfn);
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
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:[~2023-01-20 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 17:09 [PATCH] KVM: arm64: Pass the actual page address to mte_clear_page_tags() Catalin Marinas
2023-01-19 19:38 ` Oliver Upton
2023-01-20 12:08 ` Anshuman Khandual [this message]
2023-01-20 14:14 ` Cornelia Huck
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=34b65af4-0775-09a1-0f67-1c8c74caac1b@arm.com \
--to=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@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;
as well as URLs for NNTP newsgroup(s).