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 @@ -322,7 +322,6 @@ impl Descriptor {
322322 iomap_size : u16 ,
323323 ) -> Descriptor {
324324 use self :: DescriptorFlags as Flags ;
325- use core:: mem:: size_of;
326325
327326 let ptr = tss as * const _ as u64 ;
328327
@@ -331,10 +330,10 @@ impl Descriptor {
331330 low. set_bits ( 16 ..40 , ptr. get_bits ( 0 ..24 ) ) ;
332331 low. set_bits ( 56 ..64 , ptr. get_bits ( 24 ..32 ) ) ;
333332 // limit (the `-1` is needed since the bound is inclusive)
334- let iomap_limit = tss. iomap_base as u64 + iomap_size as u64 - 1 ;
333+ let iomap_limit = tss. iomap_base as u64 + iomap_size as u64 ;
335334 low. set_bits (
336335 0 ..16 ,
337- cmp:: max ( mem:: size_of :: < TaskStateSegment > ( ) as u64 , iomap_limit) ,
336+ cmp:: max ( mem:: size_of :: < TaskStateSegment > ( ) as u64 , iomap_limit) - 1 ,
338337 ) ;
339338 // type (0b1001 = available 64-bit tss)
340339 low. set_bits ( 40 ..44 , 0b1001 ) ;
You can’t perform that action at this time.
0 commit comments