差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:kernel:cgroup:cgroup_management_daemon [2013/12/11 10:10] – tenforward | linux:kernel:cgroup:cgroup_management_daemon [2013/12/11 11:11] (現在) – tenforward | ||
---|---|---|---|
行 172: | 行 172: | ||
as relative to r's cgroup. | as relative to r's cgroup. | ||
under its own current cgroup. | under its own current cgroup. | ||
+ | |||
+ | * r が cgroup /x の作成をリクエストした場合,/ | ||
+ | らの相対パスに変換される.r は自身のカレント cgroup 以下の | ||
+ | cgroup に変更を加えることはできない. | ||
+ | |||
* If r is not in the initial user_ns, then it may not change settings | * If r is not in the initial user_ns, then it may not change settings | ||
in its own cgroup, only descendants. | in its own cgroup, only descendants. | ||
we could require the use of extra cgroups when wanted, as lxc does | we could require the use of extra cgroups when wanted, as lxc does | ||
currently) | currently) | ||
+ | |||
+ | * r が初期 userns 内にいない場合,自身の cgroup 内の設定を変えられ | ||
+ | ず,子孫だけを変えられるかもしれない (厳密に必要ではない.現在 | ||
+ | lxc でやっているように,必要な時に特別な cgroup の使用が必要にな | ||
+ | ることもあり得る) | ||
+ | |||
* If r requests creation of cgroup '/ | * If r requests creation of cgroup '/ | ||
to its own cgroup | to its own cgroup | ||
+ | |||
+ | * r が cgroup /x の作成をリクエストした場合,自身の cgroup に対す | ||
+ | る書き込み権を持っていなければならない (厳密に必要ではない) | ||
+ | |||
* If r requests chown of cgroup /x to uid Y, Y is passed in a | * If r requests chown of cgroup /x to uid Y, Y is passed in a | ||
ucred over the unix socket, and therefore translated to init | ucred over the unix socket, and therefore translated to init | ||
userns. | userns. | ||
+ | |||
+ | * r が cgroup /x に対して uid Y への chown をリクエストした場合,Y | ||
+ | は Unix socket 経由で ucred に渡される.そのため,init userns に | ||
+ | 変換される. | ||
+ | |||
* if r requests setting a limit under /x, then | * if r requests setting a limit under /x, then | ||
. either r must be root in its own userns, and UID(/x) be mapped | . either r must be root in its own userns, and UID(/x) be mapped | ||
行 191: | 行 211: | ||
(see devices.allow/ | (see devices.allow/ | ||
which don't support setns for pid. | which don't support setns for pid. | ||
+ | |||
+ | * r が /x 以下の制限を設定するリクエストをした場合, | ||
+ | - r は自身の userns で root であり,UID(/ | ||
+ | ピングされていなければならないか,UID(r) == UID(/x) でなければ | ||
+ | ならないかのどちらかである. | ||
+ | - /x は / であってはならない (厳密に必要ではない.全てのユーザが | ||
+ | / が cgroup の特別なレイヤーであることを知っている) | ||
+ | - setns(UIDNS(r)) が動かない.これはカーネル内の capable() チェッ | ||
+ | クを満たさないためである.それゆえ,特権チェックを我々自身が行 | ||
+ | う必要がある.そして,ホストの root ユーザとして書き込みを行う | ||
+ | (see devices.allow/ | ||
+ | できない古いカーネルをサポートする必要がある. | ||
+ | |||
* If r requests action on victim V, it passes V's pid in a ucred, | * If r requests action on victim V, it passes V's pid in a ucred, | ||
so that gets translated. | so that gets translated. |