[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/2] domctl: Handle XEN_DOMCTL_getpageframeinfo3 without the domctl lock
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 11 Jun 2026 10:25:39 -0400
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781187942; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=hWWP/VKoTAppFucoEMfjeJWddtXW1qqJrnfJNCSjCiA=; b=Mp8lGOghI4w8tFW8sdoA+ZZTGBViocYaSMNkzTdNXfPU7x/33P5S7rB1kS5gtGcIyhdoj15Po4mtUoUBGvvBJyQ9oW/42l/IHuKB2NbYLKlCNHNvpsmdVzw0ZqQqDCt2JnsS5ReVP7cgDl8N1XBpDacCEvQX03Spr+hFFoCyzR4=
- Arc-seal: i=1; a=rsa-sha256; t=1781187942; cv=none; d=zohomail.com; s=zohoarc; b=iUB9NjPkztSucQYFwILCw7LsCwxwkV/RsRsQLISwhb2+FBcYlcPdyDtHAshuIS5XidjL4UkxzTeKsRBNbrpxZMwvsl0kJ+necixxs9YtnechXIr2gxBFFjl6WRVq+NJgpZJ3C2cSiar6mqF0xBLV/rXm5fnpFv1Fudr8cU6i7jw=
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=zoho header.d=apertussolutions.com header.i="dpsmith@xxxxxxxxxxxxxxxxxxxx" header.h="Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding"
- Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Thu, 11 Jun 2026 14:25:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 6/11/26 10:23 AM, Roger Pau Monné wrote:
On Thu, Jun 11, 2026 at 09:11:15AM -0400, Daniel P. Smith wrote:
On 6/9/26 11:15 AM, Ross Lagerwall wrote:
It does not have side effects and is protected from concurrent changes
by the P2M read lock therefore skip taking the domctl lock.
Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
---
xen/arch/x86/domctl.c | 4 ++++
xen/common/domctl.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 83bf51e498df..0e9a2532887e 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -301,6 +301,10 @@ long arch_do_domctl(
/* Games to allow this code block to handle a compat guest. */
void __user *guest_handle = domctl->u.getpageframeinfo3.array.p;
+ ret = xsm_domctl(XSM_OTHER, d, domctl);
+ if ( ret )
+ break;
+
if ( unlikely(num > 1024) ||
unlikely(num != domctl->u.getpageframeinfo3.num) )
{
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 3efa5b9d55b9..35144d95b808 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -555,6 +555,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t)
u_domctl)
case XEN_DOMCTL_gsi_permission:
case XEN_DOMCTL_bind_pt_irq:
case XEN_DOMCTL_unbind_pt_irq:
+ case XEN_DOMCTL_getpageframeinfo3:
ret = arch_do_domctl(op, d, u_domctl);
goto domctl_out_unlock_domonly;
I would respectfully ask to be mindful when XSM hooks are being manipulated
in a patch that a review from an XSM maintainer should be sought before
committing a patch. In this case case the change itself is good, though I
would have liked the opportunity to comment that the commit message should
have had some explanation on the xsm change.
I've already replied to 2/2, but would like to re-instate my apology
here so it doesn't seem like this went unnoticed:
Sorry, this was already picked up in a rush to get it into 4.22 and I
didn't realize it was missing an XSM maintainer Ack. That's entirely
my fault, there was no intention to bypass or overrule your opinion.
No worries, thank you for the apologies.
.
|