[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.7] x86/PV: fix off-by-one in I/O bitmap limit check



commit ec5815a86ab4992d6d1631731ca862b20ee2c883
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Mar 6 16:24:01 2018 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Mar 6 16:24:01 2018 +0100

    x86/PV: fix off-by-one in I/O bitmap limit check
    
    With everyone having their tags below agreeing that putting things the
    other way around in the comparison makes things easier to understand, do
    that rearrangement while changing the line anyway.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.apu@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: c6527bc66b6dd7a8dadaebb1047c8e52c6c5793c
    master date: 2018-02-27 14:10:00 +0100
---
 xen/arch/x86/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 51e471ef3b..7a186985df 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1951,7 +1951,7 @@ static int guest_io_okay(
     if ( iopl_ok(v, regs) )
         return 1;
 
-    if ( v->arch.pv_vcpu.iobmp_limit > (port + bytes) )
+    if ( (port + bytes) <= v->arch.pv_vcpu.iobmp_limit )
     {
         union { uint8_t bytes[2]; uint16_t mask; } x;
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.