Commit 12e244f4 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Linus Torvalds

x86/ldt: Further fix FPU emulation

The previous fix confused a selector with a segment prefix.  Fix it.

Compile-tested only.

Cc: stable@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>
Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Fixes: 4809146b ("x86/ldt: Correct FPU emulation access to LDT")
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4809146b
...@@ -157,7 +157,7 @@ static long pm_address(u_char FPU_modrm, u_char segment, ...@@ -157,7 +157,7 @@ static long pm_address(u_char FPU_modrm, u_char segment,
addr->selector = PM_REG_(segment); addr->selector = PM_REG_(segment);
} }
descriptor = FPU_get_ldt_descriptor(segment); descriptor = FPU_get_ldt_descriptor(addr->selector);
base_address = SEG_BASE_ADDR(descriptor); base_address = SEG_BASE_ADDR(descriptor);
address = base_address + offset; address = base_address + offset;
limit = base_address limit = base_address
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment