From a564698e5b3030ed0ef8df56b53d0d75432d19b8 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Wed, 1 Feb 2006 03:06:28 -0800 Subject: [PATCH] --- yaml --- r: 19433 b: refs/heads/master c: 4cd7ed94428babb0cdbf08cc14c257e223186079 h: refs/heads/master i: 19431: e999d92686d8345f4b8c95f4704230a7d07273d9 v: v3 --- [refs] | 2 +- trunk/include/asm-um/ldt-x86_64.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f64589616590..38afc694cba9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e5cf888631af95c8022d659d77fb595e0c3ac778 +refs/heads/master: 4cd7ed94428babb0cdbf08cc14c257e223186079 diff --git a/trunk/include/asm-um/ldt-x86_64.h b/trunk/include/asm-um/ldt-x86_64.h index 57159f12dde2..96b35aada79a 100644 --- a/trunk/include/asm-um/ldt-x86_64.h +++ b/trunk/include/asm-um/ldt-x86_64.h @@ -39,11 +39,13 @@ typedef struct uml_ldt { } uml_ldt_t; /* - * macros stolen from include/asm-i386/desc.h + * macros stolen from include/asm-x86_64/desc.h */ #define LDT_entry_a(info) \ ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) +/* Don't allow setting of the lm bit. It is useless anyways because + * 64bit system calls require __USER_CS. */ #define LDT_entry_b(info) \ (((info)->base_addr & 0xff000000) | \ (((info)->base_addr & 0x00ff0000) >> 16) | \ @@ -54,6 +56,7 @@ typedef struct uml_ldt { ((info)->seg_32bit << 22) | \ ((info)->limit_in_pages << 23) | \ ((info)->useable << 20) | \ + /* ((info)->lm << 21) | */ \ 0x7000) #define LDT_empty(info) (\ @@ -64,6 +67,7 @@ typedef struct uml_ldt { (info)->seg_32bit == 0 && \ (info)->limit_in_pages == 0 && \ (info)->seg_not_present == 1 && \ - (info)->useable == 0 ) + (info)->useable == 0 && \ + (info)->lm == 0) #endif