|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86_emulate: protmode_load_seg() cannot l
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249635283 -3600
# Node ID 71d6d6f2ecd6e4a33b7dc1363e0dfe6b89dcc416
# Parent b9cdcf502aa35818581d41cee7e6e30ae49acb92
x86_emulate: protmode_load_seg() cannot load system segments in long mode.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/x86_emulate/x86_emulate.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff -r b9cdcf502aa3 -r 71d6d6f2ecd6 xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c Thu Aug 06 11:14:48 2009 +0100
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c Fri Aug 07 09:54:43 2009 +0100
@@ -1037,8 +1037,17 @@ protmode_load_seg(
goto raise_exn;
}
- /* System segments must have the system flag (S) set. */
- if ( (desc.b & (1u<<12)) == (!is_x86_user_segment(seg) << 12) )
+ if ( !is_x86_user_segment(seg) )
+ {
+ /* System segments must have S flag == 0. */
+ if ( desc.b & (1u << 12) )
+ goto raise_exn;
+ /* We do not support 64-bit descriptor types. */
+ if ( in_longmode(ctxt, ops) )
+ return X86EMUL_UNHANDLEABLE;
+ }
+ /* User segments must have S flag == 1. */
+ else if ( !(desc.b & (1u << 12)) )
goto raise_exn;
dpl = (desc.b >> 13) & 3;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86_emulate: protmode_load_seg() cannot load system segments in long mode.,
Xen patchbot-unstable <=
|
|
|
|
|