summaryrefslogtreecommitdiffstats
path: root/man2/modify_ldt.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man2/modify_ldt.2
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/modify_ldt.2')
-rw-r--r--man2/modify_ldt.228
1 files changed, 14 insertions, 14 deletions
diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2
index 0364289..7ef2722 100644
--- a/man2/modify_ldt.2
+++ b/man2/modify_ldt.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH modify_ldt 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH modify_ldt 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
modify_ldt \- get or set a per-process LDT entry
.SH LIBRARY
@@ -14,11 +14,11 @@ Standard C library
.BR "#include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "int syscall(SYS_modify_ldt, int " func ", void " ptr [. bytecount ],
.BI " unsigned long " bytecount );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrapper for
.BR modify_ldt (),
@@ -32,7 +32,7 @@ is an array of segment descriptors that can be referenced by user code.
Linux allows processes to configure a per-process (actually per-mm) LDT.
For more information about the LDT, see the Intel Software Developer's
Manual or the AMD Architecture Programming Manual.
-.PP
+.P
When
.I func
is 0,
@@ -46,7 +46,7 @@ the LDT is padded with additional trailing zero bytes.
On success,
.BR modify_ldt ()
will return the number of bytes read.
-.PP
+.P
When
.I func
is 1 or 0x11,
@@ -60,11 +60,11 @@ structure
and
.I bytecount
must equal the size of this structure.
-.PP
+.P
The
.I user_desc
structure is defined in \fI<asm/ldt.h>\fP as:
-.PP
+.P
.in +4n
.EX
struct user_desc {
@@ -80,10 +80,10 @@ struct user_desc {
};
.EE
.in
-.PP
+.P
In Linux 2.4 and earlier, this structure was named
.IR modify_ldt_ldt_s .
-.PP
+.P
The
.I contents
field is the segment type (data, expand-down data, non-conforming code, or
@@ -91,7 +91,7 @@ conforming code).
The other fields match their descriptions in the CPU manual, although
.BR modify_ldt ()
cannot set the hardware-defined "accessed" bit described in the CPU manual.
-.PP
+.P
A
.I user_desc
is considered "empty" if
@@ -108,7 +108,7 @@ is 1, by setting both
and
.I limit
to 0.
-.PP
+.P
A conforming code segment (i.e., one with
.IR contents==3 )
will be rejected if
@@ -117,7 +117,7 @@ func
is 1 or if
.I seg_not_present
is 0.
-.PP
+.P
When
.I func
is 2,
@@ -168,12 +168,12 @@ or
.BR arch_prctl (2)
instead, except on extremely old kernels that do not support those system
calls.
-.PP
+.P
The normal use for
.BR modify_ldt ()
is to run legacy 16-bit or segmented 32-bit code.
Not all kernels allow 16-bit segments to be installed, however.
-.PP
+.P
Even on 64-bit kernels,
.BR modify_ldt ()
cannot be used to create a long mode (i.e., 64-bit) code segment.