[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.8] x86/PV: fix off-by-one in I/O bitmap limit check
commit a442d40e9b4269845bd1eec58d406b5ad03a4ccb Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Mar 6 16:15:32 2018 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Mar 6 16:15:32 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 820f94b1eb..480094a93a 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -2061,7 +2061,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.8 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |