x86/HVM: off-by-1 in new XEN_DOMCTL_ioport_mapping checks
PATCH 1/1 x86/HVM: off-by-1 in new XEN_DOMCTL_ioport_mapping checks
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é <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/domctl.c +2 -2
@@ -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 ;
Quoted 6 lines · Jan Beulich
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é <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Acked-by Roger Pau Monné <[email protected]>
Thanks, Roger.