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 {
457457 iomap_size : u16 ,
458458 ) -> Descriptor {
459459 use self :: DescriptorFlags as Flags ;
460- use core:: mem:: size_of;
461460
462461 let ptr = tss as * const _ as u64 ;
463462
@@ -466,10 +465,10 @@ impl Descriptor {
466465 low. set_bits ( 16 ..40 , ptr. get_bits ( 0 ..24 ) ) ;
467466 low. set_bits ( 56 ..64 , ptr. get_bits ( 24 ..32 ) ) ;
468467 // 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 ;
470469 low. set_bits (
471470 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 ,
473472 ) ;
474473 // type (0b1001 = available 64-bit tss)
475474 low. set_bits ( 40 ..44 , 0b1001 ) ;
You can’t perform that action at this time.
0 commit comments