mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
	linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [PATCH 6/8] uml: skas0-hold-own-ldt fixups for x86-64
Date: Thu, 19 Jan 2006 00:55:15 +0100	[thread overview]
Message-ID: <20060118235514.4626.78783.stgit@zion.home.lan> (raw)
In-Reply-To: <20060118235132.4626.74049.stgit@zion.home.lan>


In a recent fixup i386 code was copied raw to x86_64 subarch to make it compile
again.

Here there are some little fixups and resyncs needed for it (mainly for
cleanliness sake) - I did an audit and found the rest of the code to be safe.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 include/asm-um/ldt-x86_64.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h
index 57159f1..96b35aa 100644
--- a/include/asm-um/ldt-x86_64.h
+++ b/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


  parent reply	other threads:[~2006-01-19  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18 23:51 [PATCH 0/8] Other UML batch Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:54 ` [PATCH 1/8] uml: typo fixup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [PATCH 2/8] uml: comments about libc-conflict guards Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [PATCH 3/8] uml: fix hugest stack users Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [PATCH 4/8] uml: fix "apples/bananas" typo Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [PATCH 5/8] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` Paolo 'Blaisorblade' Giarrusso [this message]
2006-01-18 23:55 ` [PATCH 7/8] uml: some harmless sparse warning fixes Paolo 'Blaisorblade' Giarrusso
2006-01-18 23:55 ` [PATCH 8/8] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages Paolo 'Blaisorblade' Giarrusso
2006-01-19  4:21   ` [uml-devel] " Jeff Dike
2006-01-19 15:01     ` Blaisorblade
2006-01-19 19:43       ` Jeff Dike
2006-01-19 23:41         ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060118235514.4626.78783.stgit@zion.home.lan \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®