OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man2 / modify_ldt.2
1 .\" Copyright (c) 1995 Michael Chastain (mec@duracef.shout.net), 22 July 1995.
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\"*******************************************************************
25 .\"
26 .\" This file was generated with po4a. Translate the source file.
27 .\"
28 .\"*******************************************************************
29 .TH MODIFY_LDT 2 2012\-07\-13 Linux "Linux Programmer's Manual"
30 .SH 名前
31 modify_ldt \- ldt を設定または取得する
32 .SH 書式
33 .nf
34 \fB#include <sys/types.h>\fP
35 .sp
36 \fBint modify_ldt(int \fP\fIfunc\fP\fB, void *\fP\fIptr\fP\fB, unsigned long \fP\fIbytecount\fP\fB);\fP
37 .fi
38
39 \fINote\fP: There is no glibc wrapper for this system call; see NOTES.
40 .SH 説明
41 \fBmodify_ldt\fP()  はプロセスのローカル・ディスクリプタ・テーブル (local descriptor table; ldt)
42 を読み書きする。 ldt は i386 プロセッサで使用されるプロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報は
43 Intel 386 processor handbook を 参照すること。
44 .PP
45 \fIfunc\fP が 0 ならば、 \fBmodify_ldt\fP()  は ldt を \fIptr\fP が指しているメモリに読み込む。
46 読み込むバイト数は実際の ldt のサイズか \fIbytecount\fP より小さい方である。
47 .PP
48 .\"
49 .\" FIXME ? say something about func == 2 and func == 0x11?
50 .\" In Linux 2.4, func == 2 returned "the default ldt"
51 .\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
52 .\" Linux 2.4 and 2.6 implement an operation for func == 0x11
53 \fIfunc\fP が 1 ならば、 \fBmodify_ldt\fP()  は ldt エントリの一つを変更する。 \fIptr\fP は \fIuser_desc\fP
54 構造体を指し、 \fIbytecount\fP はこの構造体の大きさに等しくなければならない。
55
56 \fIuser_desc\fP 構造体は \fI<asm/ldt.h>\fP で以下のように定義されている:
57 .in +4n
58 .nf
59
60 struct user_desc {
61     unsigned int  entry_number;
62     unsigned long base_addr;
63     unsigned int  limit;
64     unsigned int  seg_32bit:1;
65     unsigned int  contents:2;
66     unsigned int  read_exec_only:1;
67     unsigned int  limit_in_pages:1;
68     unsigned int  seg_not_present:1;
69     unsigned int  useable:1;
70 };
71 .fi
72 .in
73 .PP
74 .\" .PP
75 .\" The ldt is specific for the calling process. Any attempts to change
76 .\" the ldt to include the address space of another process or the kernel
77 .\" will result in a segmentation violation when trying to access the memory
78 .\" outside of the process address space. The memory protection is enforced
79 .\" at the paging layer.
80 Linux 2.4 以前では、この構造体は \fImodify_ldt_ldt_s\fP という名前であった。
81 .SH 返り値
82 成功した場合は、 \fBmodify_ldt\fP()  は (読み込みの場合は) 実際に読み込んだバイト数、 または (書き込みの場合は) 0 を返す。
83 失敗した場合は \fBmodify_ldt\fP()  は \-1 を返し、 \fIerrno\fP をエラーを示す値に設定する。
84 .SH エラー
85 .TP 
86 \fBEFAULT\fP
87 \fIptr\fP がアドレス空間の外を指している。
88 .TP 
89 \fBEINVAL\fP
90 \fIptr\fP が 0 である、 または \fIfunc\fP が 1 で \fIbytecount\fP が \fImodify_ldt_ldt_s\fP
91 構造体のサイズと等しくないか、 \fIfunc\fP が 1 で新しい ldt エントリが無効な値である。
92 .TP 
93 \fBENOSYS\fP
94 \fIfunc\fP が 0 でも 1 でもない。
95 .SH 準拠
96 このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけない。
97 .SH 注意
98 glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
99 .SH 関連項目
100 \fBvm86\fP(2)
101 .SH この文書について
102 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
103 である。プロジェクトの説明とバグ報告に関する情報は
104 http://www.kernel.org/doc/man\-pages/ に書かれている。