All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH manpages] modify_ldt.2: Clarify the lm bit's behavior
@ 2015-02-04 21:53 Andy Lutomirski
  2015-02-05  7:51 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2015-02-04 21:53 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages), linux-kernel; +Cc: Andy Lutomirski

The lm bit should never have existed in the first place.  Sigh.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---
 man2/modify_ldt.2 | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2
index 1c2cf9cdef93..d6e0514973a6 100644
--- a/man2/modify_ldt.2
+++ b/man2/modify_ldt.2
@@ -187,12 +187,21 @@ The normal use for
 .BR modify_ldt (2)
 is to run legacy 16-bit or segmented 32-bit code.
 Not all kernels allow 16-bit segments to be installed, however.
+.PP
+Even on 64-bit kernels,
+.BR modify_ldt (2)
+cannot be used to create a long mode (i.e. 64-bit) code segment.  The
+undocumented field "lm" in
+.IR user_desc
+is not useful, and, despite its name, does not result in a long mode segment.
 .SH BUGS
 On 64-bit kernels before Linux 3.19,
 .\" commit e30ab185c490e9a9381385529e0fd32f0a399495
-setting the "lm" padding bit in
+setting the "lm" bit in
 .IR user_desc
-prevents the descriptor from being considered empty.
+prevents the descriptor from being considered empty.  Keep in mind that the
+"lm" bit does not exist in the 32-bit headers, but these buggy kernels
+will still notice the bit even when set in a 32-bit process.
 .SH SEE ALSO
 .BR arch_prctl (2),
 .BR set_thread_area (2),
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-05  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 21:53 [PATCH manpages] modify_ldt.2: Clarify the lm bit's behavior Andy Lutomirski
2015-02-05  7:51 ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.