All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/HVM: off-by-1 in new XEN_DOMCTL_ioport_mapping checks
@ 2026-11-17 15:41 Jan Beulich
  2026-11-17 15:51 ` Roger Pau Monné
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2026-11-17 15:41 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, Teddy Astie, Roger Pau Monné

The new checking introduced not so long ago would wrongly reject exactly
adjacent regions.

Fixes: fa61af950bb4 ("x86/HVM: more checking for XEN_DOMCTL_ioport_mapping")
Reported-by: Roger Pau Monné <roger.pau@amd.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -756,8 +756,8 @@ long arch_do_domctl(
                     found = 1;
                     break;
                 }
-                if ( fmp + np >= g2m_ioport->mport &&
-                     g2m_ioport->mport + g2m_ioport->np >= fmp )
+                if ( fmp + np > g2m_ioport->mport &&
+                     g2m_ioport->mport + g2m_ioport->np > fmp )
                 {
                     ret = -EBUSY;
                     break;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-17 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 15:41 [PATCH] x86/HVM: off-by-1 in new XEN_DOMCTL_ioport_mapping checks Jan Beulich
2026-11-17 15:51 ` Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.