Browse Source

TSS: set IO map base address correctly. (#861)

This was set to an absurdly high value, meaning that
random bits of the kernel were being consulted to check
permissions for unprivileged code to perform programmed
IO.  Set it to sizeof(Tss) to mark it as not used.

See the SDM for more information.

Signed-off-by: Dan Cross <cross@gajendra.net>
Dan Cross 5 years ago
parent
commit
7b96bc46ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sys/src/9/amd64/vsvm.c

+ 1 - 1
sys/src/9/amd64/vsvm.c

@@ -151,7 +151,7 @@ tssinit(Mach *mach, uintptr_t sp)
 		tss->ist[ist] = sp;
 		tss->ist[ist+1] = sp>>32;
 	}
-	tss->iomap = 0xdfff;
+	tss->iomap = sizeof(*tss);
 }
 
 void acsyscallentry(void)