mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Cc: Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
Date: Thu, 15 May 2025 13:33:19 +0200	[thread overview]
Message-ID: <212b2be3-5841-4e7f-84d7-4b3653054481@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2505121446370.8380@ubuntu-linux-20-04-desktop>


[-- Attachment #1.1.1: Type: text/plain, Size: 1071 bytes --]

On 12.05.25 23:54, Stefano Stabellini wrote:
> From: Stefano Stabellini <stefano.stabellini@amd.com>
> 
> dm_op hypercalls might come from userspace and pass memory addresses as
> parameters. The memory addresses typically correspond to buffers
> allocated in userspace to hold extra hypercall parameters.
> 
> On ARM, when CONFIG_ARM64_SW_TTBR0_PAN is enabled, they might not be
> accessible by Xen, as a result ioreq hypercalls might fail. See the
> existing comment in arch/arm64/xen/hypercall.S regarding privcmd_call
> for reference.
> 
> For privcmd_call, Linux calls uaccess_ttbr0_enable before issuing the
> hypercall thanks to commit 9cf09d68b89a. We need to do the same for
> dm_op. This resolves the problem.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> Fixes: 9cf09d68b89a ("arm64: xen: Enable user access before a privcmd
> hvc call")
> Cc: stable@kernel.org

I'm not an Arm specialist, but looking at the surrounding code this
seems to be correct.

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      reply	other threads:[~2025-05-15 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 21:54 Stefano Stabellini
2025-05-15 11:33 ` Jürgen Groß [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=212b2be3-5841-4e7f-84d7-4b3653054481@suse.com \
    --to=jgross@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=stable@kernel.org \
    --cc=xen-devel@lists.xenproject.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

all inboxes | Powered by JetHome®