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

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



commit fb7a786c7364e8704217f2b8b5f9cda20a6a6ed3
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Mar 6 16:06:40 2018 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Mar 6 16:06:40 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 c57d367614..b4c275aa56 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1922,7 +1922,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.9

_______________________________________________
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®.