1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (c) 1995 Michael Chastain (mec@duracef.shout.net), 22 July 1995.
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
26 .\" all rights reserved.
27 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
28 .\" Updated & Modified 2005-02-24, Yuichi SATO <ysato444@yahoo.co.jp>
29 .\" Updated 2007-06-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.57
32 .\"WORD: local descriptor table ローカル・ディスクリプタ・テーブル
33 .\"WORD: processer プロセッサ
36 .TH MODIFY_LDT 2 2007-06-01 "Linux" "Linux Programmer's Manual"
39 .\"O modify_ldt \- get or set ldt
40 modify_ldt \- ldt を設定または取得する
44 .B #include <sys/types.h>
46 .BI "int modify_ldt(int " "func" ", void *" "ptr" ", unsigned long " "bytecount" );
50 .\"O .BR modify_ldt ()
51 .\"O reads or writes the local descriptor table (ldt) for a process.
52 .\"O The ldt is a per-process memory management table used by the i386 processor.
53 .\"O For more information on this table, see an Intel 386 processor handbook.
55 はプロセスのローカル・ディスクリプタ・テーブル (local descriptor table; ldt)
57 ldt は i386 プロセッサで使用されるプロセスごとのメモリ管理テーブルである。
58 このテーブルに関してのより詳しい情報は Intel 386 processor handbook を
64 .\"O .BR modify_ldt ()
65 .\"O reads the ldt into the memory pointed to by
73 .\"O The number of bytes read is the smaller of
75 .\"O and the actual size of the ldt.
76 読み込むバイト数は実際の ldt のサイズか
83 .\"O .BR modify_ldt ()
84 .\"O modifies one ldt entry.
95 .\"O must equal the size of this structure.
101 はこの構造体の大きさに等しくなければならない。
103 .\" FIXME ? say something about func == 2 ans func == 0x11?
104 .\" In Linux 2.4, func == 2 returned "the default ldt"
105 .\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
106 .\" Linux 2.4 and 2.6 implement an operation for func == 0x11
110 .\"O structure is defined in \fI<asm/ldt.h>\fP as:
112 構造体は \fI<asm/ldt.h>\fP で以下のように定義されている:
117 unsigned int entry_number;
118 unsigned long base_addr;
120 unsigned int seg_32bit:1;
121 unsigned int contents:2;
122 unsigned int read_exec_only:1;
123 unsigned int limit_in_pages:1;
124 unsigned int seg_not_present:1;
125 unsigned int useable:1;
130 .\"O In Linux 2.4 and earlier, this structure was named
131 .\"O .IR modify_ldt_ldt_s .
132 Linux 2.4 以前では、この構造体は
136 .\"O .\" The ldt is specific for the calling process. Any attempts to change
137 .\"O .\" the ldt to include the address space of another process or the kernel
138 .\"O .\" will result in a segmentation violation when trying to access the memory
139 .\"O .\" outside of the process address space. The memory protection is enforced
140 .\"O .\" at the paging layer.
141 .\" ldt は呼び出し元プロセスに固有のものである。
142 .\" 他のプロセスやカーネルのアドレス空間を含むように ldt を変更しようすると、
143 .\" プロセスアドレス空間の外のメモリにアクセスしようとしたときに、
144 .\" セグメンテーション違反 (segmentation violation) になる。
145 .\" メモリ保護はページングレイヤで実施される。
146 .\"O .SH "RETURN VALUE"
149 .\"O .BR modify_ldt ()
150 .\"O returns either the actual number of bytes read (for reading)
151 .\"O or 0 (for writing).
154 は (読み込みの場合は) 実際に読み込んだバイト数、
155 または (書き込みの場合は) 0 を返す。
157 .\"O .BR modify_ldt ()
158 .\"O returns \-1 and sets
160 .\"O to indicate the error.
171 .\"O points outside the address space.
182 .\"O is not equal to the size of the structure
183 .\"O .IR modify_ldt_ldt_s ,
186 .\"O is 1 and the new ldt entry has invalid values.
197 が 1 で新しい ldt エントリが無効な値である。
201 .\"O is neither 0 nor 1.
204 .\"O .SH "CONFORMING TO"
206 .\"O This call is Linux-specific and should not be used in programs intended
208 このコールは Linux 特有であり、移植を意図したプログラムでは
212 .\"O Glibc does not provide a wrapper for this system call; call it using
213 .\"O .BR syscall (2).
214 glibc はこのシステムコールに対するラッパー関数を提供していない。