File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -457,7 +457,6 @@ impl Descriptor {
457
457
iomap_size : u16 ,
458
458
) -> Descriptor {
459
459
use self :: DescriptorFlags as Flags ;
460
- use core:: mem:: size_of;
461
460
462
461
let ptr = tss as * const _ as u64 ;
463
462
@@ -466,10 +465,10 @@ impl Descriptor {
466
465
low. set_bits ( 16 ..40 , ptr. get_bits ( 0 ..24 ) ) ;
467
466
low. set_bits ( 56 ..64 , ptr. get_bits ( 24 ..32 ) ) ;
468
467
// limit (the `-1` is needed since the bound is inclusive)
469
- let iomap_limit = tss. iomap_base as u64 + iomap_size as u64 - 1 ;
468
+ let iomap_limit = tss. iomap_base as u64 + iomap_size as u64 ;
470
469
low. set_bits (
471
470
0 ..16 ,
472
- cmp:: max ( mem:: size_of :: < TaskStateSegment > ( ) as u64 , iomap_limit) ,
471
+ cmp:: max ( mem:: size_of :: < TaskStateSegment > ( ) as u64 , iomap_limit) - 1 ,
473
472
) ;
474
473
// type (0b1001 = available 64-bit tss)
475
474
low. set_bits ( 40 ..44 , 0b1001 ) ;
You can’t perform that action at this time.
0 commit comments