diff options
| author | Andi Kleen <ak@muc.de> | 2003-11-07 21:59:23 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-11-07 21:59:23 -0800 |
| commit | 954caecd2ecebc5d1382efd1185b5736aaf99d8e (patch) | |
| tree | 5c748a9f7772962cbb0d0f11d4e6e73ae4041b5f /include | |
| parent | 35d64a3345463ace22f42ca6ca993b84e1d5f1e9 (diff) | |
[PATCH] Fix TSS limit on x86-64
The limit of the TSS segment was incorrectly set to a too big value
on x86-64. This lead to the CPU reading random memory behind the main
TSS when iopl was >0, but there was no ioperm bitmap set. This caused
random failures in port accesses in this state.
Set the correct limit.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86_64/desc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index f9d7d6a1a131..f1270929cd63 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h @@ -118,7 +118,7 @@ static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned d.base1 = PTR_MIDDLE(tss) & 0xFF; d.type = type; d.p = 1; - d.limit1 = 0xF; + d.limit1 = (size >> 16) & 0xF; d.base2 = (PTR_MIDDLE(tss) >> 8) & 0xFF; d.base3 = PTR_HIGH(tss); memcpy(ptr, &d, 16); |
