[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] x86/PV: fix off-by-one in I/O bitmap limit check
commit 5ede9f9600f7eef9e5da34bc68e445b17eb5d8db Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Mar 6 15:55:33 2018 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Mar 6 15:55:33 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/pv/emul-priv-op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c index b965b3ece7..642ca312bf 100644 --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c @@ -145,7 +145,7 @@ static bool guest_io_okay(unsigned int port, unsigned int bytes, if ( iopl_ok(v, regs) ) return true; - 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.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |