- ã¯ããã«
- åå空é
- åå空éã®ç¨®é¡
- åå空éã®ç®¡ç
- åå空éã¸ã®ã¢ã¯ã»ã¹
ã¯ããã«
ååã®Linuxカーネル4.1のSLUBアローケータ(ドラフト) - φ(・・*)ゞ ウーン カーネルとか弄ったりのメモã¨åãããã©ããçå ¬éã§ãã
ã«ã¼ãã«ã®ãã¼ã¸ã§ã³ã¯4.1ç³»ã§ãã
ææ¸èªä½ãå®æçã§ã¯ãªãããmarkdownããæä½æ¥ã§ã¯ã¦ãªblogã«ã³ãããã¦ä¿®æ£ãã¦ãã®ã§ç« ç«ã¦ã¨ãå¤ã«ãªã£ã¦ãã¨ããã¨ãããããããã¾ãããæ°ã«ããªãã§ãã ããã ä¸é¨ã¯ææ¸ä¿®æ£ãã¦ã¾ãã
åå空é
åå空éã¨ã¯ãLinuxã«ã¼ãã«å ã®ã°ãã¼ãã«ãªãªã½ã¼ã¹ã管çããæ©æ§ã§ããåå空éã«ãã£ã¦ç®¡çããããªã½ã¼ã¹ã¯ã¡ã¢ãªãCPUãªã©ã®ç©ççãªãªã½ã¼ã¹ã§ã¯ãªããããã»ã¹IDãã¦ã¼ã¶IDããã¡ã¤ã«ã·ã¹ãã ã®ãã¦ã³ããã¤ã³ããªã©ã®ãã¼ã¿ã§ããCPUãã¡ã¢ãªãªã©ããã¼ãã¦ã§ã¢ããã®å¶éã¯ãXXXç« ãcgroupsãã«ã¦è§£èª¬ãã¾ãã
Linuxã«ãããã³ã³ããåä»®æ³åæè¡ã§ã¯åå空éãå©ç¨ãããã¹ãã»ã²ã¹ãéãã²ã¹ãéã§ã®ç°å¢ã®åé¢ãè¡ã£ã¦ãã¾ããããã«ããã³ã³ããã®ç¬ç«æ§ã確ä¿ãã¦ãã¾ããåå空éã®æ©è½ã¯ã³ã³ããåä»®æ³åã§ä½¿ããããã¨ã主ã§ãã®ã§ã以ä¸ã®èª¬æã§ãã³ã³ããåä»®æ³åãè¡ãåæã¨ãã¦ã親ããã»ã¹ããåå空éãåé¢ããåããã»ã¹ãã³ã³ããã¨å¼ã³ã¾ãã
åå空éã®å©ç¹
åå空éã使ç¨ãã¦ç°å¢ãåé¢ãããã¨ã§ãããåå空éã«æå±ããããã»ã¹ã®å¦çå 容ãåå空éãéãå¥ã®ããã»ã¹ã«å¯¾ãã¦å½±é¿ãåã¼ããªãããã«ãããã¨ãã§ãã¾ããããã«ããããã»ã¹éã®ç¬ç«æ§ãé«ãããããã»ãã¥ãªãã£ã®åä¸ã«å½¹ç«ã¦ããã¨ãã§ãã¾ãã
ä¾ãã°ããå³_PIDåå空éã®åé¢ä¾ãã®ããã«PIDåå空éAã¨Bãããã¨ãã«ééã£ã¦PIDåå空éBã«ã¦ kill -kill 4
ãå®è¡ããã¨ãã¦ããPIDåå空éBã«ã¯è©²å½ããããã»ã¹ã¯åå¨ããªãã®ã§ã³ãã³ãããã¨ã©ã¼ãå¤ããã ãã§PIDåå空éAãBã¨ãã«ããã»ã¹ã«å¯¾ãã¦ãªãã®å½±é¿ãçºçãã¾ããããã¾ããPIDåå空éBã«ã¦ kill -kill 2
ãå®è¡ããå ´åã¯ãPIDåå空éBã®PID2ã®ããã»ã¹ãçµäºããã ãã§ãPIDåå空éAã®PID2ã«ã¯å½±é¿ã¯ããã¾ãããåå空éãåãããã¨ã§ãã®ããã«ããã»ã¹éã®ç¬ç«æ§ãé«ãããã¨ãã§ãã¾ãã
å³_PIDåå空éã®åé¢ä¾
ã¾ããUseråå空éã®æ©è½ãå©ç¨ãã¦ãUseråå空éAã§ã®uid 0ããã¹ãä¸ã®uid 1000ã¨ãããã³ã°ãããã¨ã§ãUseråå空éAã®ä¸ã§ã¯rootã¨ãã¦å¦çãè¡ãã¤ã¤ãããã¹ãä¸ã§ã¯ä¸è¬ã¦ã¼ã¶ã¨ãã¦å¦çãè¡ããããã·ã¹ãã ã«å¯¾ãã¦ã¯ãªãã£ã«ã«ãªå¤æ´ãåå空éå ã§ã¯è¡ããªãããã«ãããã¨ãã§ãã¾ãããã®æ©è½ã¯ããã»ã¹ãå®è¡ããä¸ã§root権éãå¿ è¦ãªå ´åã§ããã¹ãã®ç°å¢ã«ã¯å½±é¿ãåã¼ããªããããªå¦çãå®è¡ããå ´åãä¾ãã°ãrpmãªã©ã®ããã±ã¼ã¸ä½æããã¹ãããåé¢ããMountåå空éå ã§ã®ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«ãªã©ã«æç¨ã§ãããã®ä»ã«ãä¸ãä¸ãåå空éå ã®ã½ããã¦ã§ã¢ã®èå¼±æ§ã«ããä»»æã®ã·ã§ã«ãå®è¡ãããã¨ãã¦ãããã¹ãããã¯ä¸è¬ã¦ã¼ã¶ã®æ¨©éã§ããã³ãã³ããå®è¡ã§ããªãã®ã§ãã·ã¹ãã å ¨ä½ã®å¶å¾¡ã¯å¥ªããã«ãããªãã¾ãã
åå空éã®ç¨®é¡
Linuxã§ã®åå空éã¯å·çæç¹ã§6ã¤ã®ãªã½ã¼ã¹ã管çãã¦ãã¾ãï¼è¡¨_åå空éä¸è¦§ï¼ãåå空éã®å®è£ ã¯ãMountåå空éãæåã«å®è£ ããããã®å¾ãç¶ç¶çã«éçºãé²ã¿ãLinux 3.8ã§Linux 4.0ã§ã使ããã¦ããæ©è½ãæãã¾ããã
åå空é | 使ç¨å¯è½ã«ãªã£ããã¼ã¸ã§ã³ |
---|---|
Mountåå空é | Linux 2.4.19 |
IPCåå空é | Linux 2.6.19 |
UTSåå空é | Linux 2.6.19 |
Netåå空é | Linux 2.6.29 |
PIDåå空é | Linux 2.6.24 |
Useråå空é | Linux 3.8 |
表_åå空éä¸è¦§
Mountåå空é
Mountåå空éã¯ãã¡ã¤ã«ã·ã¹ãã ã®ãã¦ã³ããã¤ã³ãã管çãã¾ããMountåå空éãåé¢ãããã¨ã§åãã¹ãã¬ã¼ã¸ä¸ã®ãã¡ã¤ã«ã·ã¹ãã ã§ãã£ã¦ãããã»ã¹éã§å¥ã®ãã¡ã¤ã«ã·ã¹ãã é層ã¨ãã¦æ±ããã¨ãã§ãã¾ããããã«ãããããã»ã¹Aããã¡ã¤ã«ã·ã¹ãã ã«å¯¾ãã¦è¡ã£ãå¤æ´ãããã»ã¹Bã«ã¯å½±é¿ããªãã¨ãã使ç¨æ¹æ³ãå¯è½ã«ãªãã¾ããchroot(2)ã§ã¯ãããã£ã¬ã¯ããªãã«ã¼ããã¡ã¤ã«ã·ã¹ãã ã¨ãã¦è¨å®ãã¾ãããMountåå空éã«ãããã¦ã³ããã¤ã³ãã®ç®¡çã¯chroot(2)ã¨ã¯éããã·ã¹ãã ã®ã«ã¼ããã¡ã¤ã«ã·ã¹ãã ãã®ãã®ã管ç対象ã¨ãªãã¾ãã
IPCåå空é
IPCåå空éã¯System V IPC ãªãã¸ã§ã¯ããPOSIX ã¡ãã»ã¼ã¸ãã¥ã¼ã管çãã¾ãããããã®IPCãªã½ã¼ã¹ã¯åä¸ã®åå空éã«ãããªã½ã¼ã¹ã«å¯¾ãã¦éä¿¡ãè¡ããã¨ãã§ãã¾ãããå¥ã®åå空éã«ãããªã½ã¼ã¹ã¨ã¯éä¿¡ã§ãã¾ããã
UTSåå空é
UTSåå空éã¯ãã¹ãåã¨NIS ãã¡ã¤ã³åã管çãã¾ããã«ã¼ãã«ãã¼ã¸ã§ã³ãOSåãªã©ã¯å¤æ´ã§ãã¾ããã
Netåå空é
Netåå空éã¯ãããã¯ã¼ã¯ã«é¢ãããªã½ã¼ã¹ã管çãã¾ãããã®åå空éã§ç®¡çããããªã½ã¼ã¹ã¯ãããã¯ã¼ã¯ããã¤ã¹ãIPv4ã»IPv6ã®ãããã³ã«ã¹ã¿ãã¯ãªã©ã§ããNICã¯1ã¤ã®åå空éã«ã®ã¿æå±ããããã¨ãã§ãã¾ãããã®ãããä¸ã¤ã®NICãè¤æ°ã®åå空éãã使ç¨ããå ´åã¯ä»®æ³ãããã¯ã¼ã¯ããã¤ã¹(veth)ã«ã¦å¥ã®åå空éã¸ã®ãããã¯ã¼ã¯ããªãã¸ãä½æãããã®ããªãã¸ãçµç±ããå¿ è¦ãããã¾ãã
PIDåå空é
PIDåå空éã¯PIDã®ç®¡çãè¡ãã¾ãããã®æ©è½ã使ããã¨ã§ã³ã³ããå ã®ããã»ã¹çªå·ã¯ãã¹ãå´ã®ããã»ã¹çªå·ã¨ç¬ç«ãããã¨ãã§ãã¾ããPIDåå空éãåé¢ãã¦ããã»ã¹ãä½æããå ´åã§ããåé¢å ã¨ãªã£ãPIDåå空éããã¯ãã®PIDåå空éã®çªå·ä½ç³»ã§ããã»ã¹ãèå¥ã§ãã¾ãããå³_PIDåå空éä¾ãã¯PIDåå空éAã大å ã¨ãã¦ãPIDåå空éBã¨PIDåå空éCãåå¨ããç¶æ ã§ãã ããã§ã¯ãPIDåå空éBã®pid 10ã¯PIDåå空éAã§ã¯pid 1000ã¨ãªã£ã¦ãã¾ããããã«PIDåå空éBã®pid 10ã¯PIDåå空éDã®pid 1ã§ãããã¾ããPIDåå空éCã®pid 10ã¯PIDåå空éAã§ã¯pid 2010ã§ããä¾ã®ããã«PIDåå空éãéãã°åãpidçªå·ãåå¨ãã¾ãããã ããåé¢å ã®PIDåå空éä¸ã§ã¯ã¦ãã¼ã¯ãªPIDãå²ãå½ã¦ããããããåä¸åå空éå ã§ã®PIDçªå·ã®éè¤ã¯çºçãã¾ããã
å³_PIDåå空éä¾
ã«ã¼ãã«èµ·åæã«è¨å®ããæåã®PIDåå空é以å¤ã§reboot(2)ãå®è¡ãããå ´åãã«ã¼ãã«ã®åèµ·åã¯è¡ãããPIDåå空éå ã§ã®initããã»ã¹ã«å¯¾ãã¦ã·ã°ãã«ãéä¿¡ãã¾ããéä¿¡ããã·ã°ãã«ã¯reboot(2)ã®cmdå¼æ°ã®å¤ã«ãã£ã¦ã表_rebootã®cmdã¨ã·ã°ãã«ãã®ããã«å¤åãã¾ãã
cmd | éä¿¡ããã·ã°ãã« |
---|---|
LINUX_REBOOT_CMD_RESTART | SIGHUP |
LINUX_REBOOT_CMD_RESTART2 | SIGHUP |
LINUX_REBOOT_CMD_POWER_OFF | SIGINT |
LINUX_REBOOT_CMD_HALT | SIGINT |
表_rebootã®cmdã¨ã·ã°ãã«
Useråå空é
Useråå空éã¯ã»ãã¥ãªãã£ã«é¢ãããªã½ã¼ã¹ã管çãã¾ããããã§ç®¡çãããã®ã¨ãã¦ã¯UIDãGIDãªã©ãããã¾ããUseråå空éã®æ©è½ã§ãã¹ãå´ã®uidã»gidã¨ã³ã³ããã²ã¹ãå ã§ä½¿ç¨ããuidã»gidã®ãããã³ã°ãè¡ããã¨ããã¾ããã³ã³ããå ã®uid 0ããã¹ãã®uid 1000ã¨ãããã³ã°ãããã¨ã§ãã³ã³ããå ã§ã®æä½ããã¹ãä¸ã§ã¯uid 1000ã®æ¨©éã§è¡ãããã«ãããã¨ãã§ãã¾ããããã«ãããã³ã³ããã²ã¹ãå ã§ã¯root権éã§æä½ãè¡ããã¨ãã§ãã¾ããããã¹ãå´ããè¦ãå ´åã«ã¯root権éã§ã¯ãªããããã¹ãã®è¨å®ãå¤æ´ãããããªæä½ãè¡ãããã»ãã¥ãªãã£ã®åä¸ã«ã¤ãªãããã¨ãã§ãã¾ãã
åå空éã®ç®¡ç
Linuxã§ã¯ãåå空éã¯åå¥ã«åå¨ãã¦ãã¾ãããUseråå空é以å¤ã®åå空éã¯NSProxyã«ãã£ã¦ç®¡çããã¦ãã¾ãããããã®åå空éãæä½ããå ´åã¯NSProxyãçµç±ãã¦å¦çãè¡ãã¾ããUseråå空éã«é¢ãã¦ã¯ã»ãã¥ãªãã£æ©æ§ã®ä¸ã¤ã§ããcredentialsæ©è½ã管çãã¾ããUseråå空éã¯åæã®å®è£ ã§ã¯NSProxyã«ãã£ã¦ç®¡çããã¦ãã¾ããããLinux 2.6.39ããstruct credæ§é ä½ã«ã¦ç®¡çããããã«ãªãã¾ãããNSProxyã¨Credentialsæ©è½ã¯ããã»ã¹ã®task_structæ§é ä½ããåç §ã§ãã¾ããå³ãå³_task_structæ§é ä½ã¨åå空éã®é¢é£ãã«task_structæ§é ä½ã¨ååå空éã®é¢é£ã示ãã¾ããUseråå空é以å¤ã¯NSProxyã®ç®¡çä¸ã«ç½®ããã¾ãã
å³_task_structæ§é ä½ã¨åå空éã®é¢é£
å³ãå³_task_structæ§é ä½ã¨åå空éã®é¢é£ãã«ç¤ºããããã«ãUseråå空é以å¤ã®åå空éã¯Useråå空éãåç §ãã¾ããPIDãIPCãMNTãPIDãUTSåå空éã¯ããããç¬ç«ãã¦åå¨ã§ãã¾ãããUseråå空éã¯ã»ãã¥ãªãã£ã«é¢ããåå空éã®ãããä»ã®åå空éãããåç §ããå¿ è¦ãããããã§ããååå空éãUseråå空éãåç §ããã®ã¯ã主ã«setnsã·ã¹ãã ã³ã¼ã«ã«ããããã»ã¹ã®åå空éãå¥ã®åå空éã«æå±ãããã¨ãã§ãããã®å ´åãããã»ã¹ã«è¨å®ããã¦ããã±ã¼ãããªãã£ã¨æå±å¯¾è±¡ã®åå空éã«è¨å®ããã¦ããã±ã¼ãããªãã£ã«CAP_SYS_ADMINãè¨å®ããã¦ãããããã§ãã¯ãã¾ãã
ããã»ã¹ã¨åå空é
å³_ããã»ã¹ã¨åå空éã¯UTSåå空éãä¾ã«ããã»ã¹ã¨åå空éãã©ã®ããã«é¢é£ãã¦ãããã示ãã¦ãã¾ããä¾ã§ã¯ãã¹ãåãfooã§è¨å®ããã¦ããpid1001ã¨pid1002ããã¹ãåãbarã§è¨å®ããã¦ããpid1003ãããã¾ãã ãããã¯pid1000ã親ããã»ã¹ã¨ãã¦ãã¾ãããã®å³ã§ã¯pid1001ã¨pid1001ãåãåå空éã«æå±ããpid1003ãå¥ã®åå空éã«æå±ãã¦ãã¾ããç°¡åã«ããããã«ããã§ã¯pid1000ã®åå空éã«é¢ãã¦ã¯çç¥ãã¦ãã¾ãã
å³_ããã»ã¹ã¨åå空é
åå空éã®ã¨ã¯ã¹ãã¼ã
ååå空éã¯æ¬ä¼¼ãã¡ã¤ã«è¡¨ç¾ãããprocãã¡ã¤ã«ã·ã¹ãã ã«ã¨ã¯ã¹ãã¼ãããã¾ãããããã®ãã¡ã¤ã«ã¯/proc/
# ls -la /proc/1/ns total 0 dr-x--x--x 2 root root 0 May 27 22:16 ./ dr-xr-xr-x 8 root root 0 May 27 22:12 ../ lrwxrwxrwx 1 root root 0 May 27 22:17 ipc -> ipc:[4026531839] lrwxrwxrwx 1 root root 0 May 27 22:17 mnt -> mnt:[4026531840] lrwxrwxrwx 1 root root 0 May 27 22:17 net -> net:[4026531969] lrwxrwxrwx 1 root root 0 May 27 22:17 pid -> pid:[4026531836] lrwxrwxrwx 1 root root 0 May 27 22:17 user -> user:[4026531837] lrwxrwxrwx 1 root root 0 May 27 22:17 uts -> uts:[4026531838] # ls -la /proc/2/ns total 0 dr-x--x--x 2 root root 0 May 27 22:17 ./ dr-xr-xr-x 8 root root 0 May 27 22:12 ../ lrwxrwxrwx 1 root root 0 May 27 22:17 ipc -> ipc:[4026531839] lrwxrwxrwx 1 root root 0 May 27 22:17 mnt -> mnt:[4026531840] lrwxrwxrwx 1 root root 0 May 27 22:17 net -> net:[4026531969] lrwxrwxrwx 1 root root 0 May 27 22:17 pid -> pid:[4026531836] lrwxrwxrwx 1 root root 0 May 27 22:17 user -> user:[4026531837] lrwxrwxrwx 1 root root 0 May 27 22:17 uts -> uts:[4026531838]
å³_procãã¡ã¤ã«ã·ã¹ãã
ã¦ã¼ã¶ç©ºéã«ã¨ã¯ã¹ãã¼ããããåå空éã®ãã¡ã¤ã«ãæä½ããã«ã¯setns(2)ã使ç¨ãã¾ãããããã®ãã¡ã¤ã«ã«å¯¾ãã¦èªã¿æ¸ããè¡ããã¨ã¯ããã¾ãããã«ã¼ãã«å´ã§ã¯ãããã®ãã¡ã¤ã«ã«å¯¾ããæä½ã®ç¨®é¡ã¯proc_ns_operationsæ§é ä½ã«ã¦å®ç¾©ãã¾ãï¼è¡¨_proc_ns_operationsæ§é ä½ï¼ã
å¤æ°å | å 容 |
---|---|
name | ãã¡ã¤ã«å |
type | åå空éã®CLONEãã©ã° |
get | åå空éã®åç §ã«ã¦ã³ããå¢ããé¢æ°ã¸ã®ãã¤ã³ã¿ |
put | åå空éã®åç §ã«ã¦ã³ããæ¸ããé¢æ°ã¸ã®ãã¤ã³ã¿ |
install | æ°ããåå空éãè¨å®ããé¢æ°ã¸ã®ãã¤ã³ã¿ |
表_proc_ns_operationsæ§é ä½
ã表_proc_ns_operationsæ§é ä½ãã§ç¤ºããããã«ãå®ç¾©ããã¦ããæä½ï¼é¢æ°ï¼ã¯3åããã¾ããããã®ãã¡ãputã¨installãåå空éã®æä½ã«é¢ããé¢æ°ã§ããputé¢æ°ã¯ããã»ã¹ã®çµäºãªã©ã«ããããã®åå空éã®åç §ã«ã¦ã³ã¿ãæ¸ããéã«ä½¿ç¨ãã¾ãããã®å¦çã¯åå空éæ¯ã«è¡ããããåç §æ°ãæ¸ããããã¨ã®å¦çãä¾ãã°ããªã½ã¼ã¹ã®è§£æ¾ãè¡ããåç §ã0ã«ãªã£ãæç¹ã§ãªã½ã¼ã¹ã®è§£æ¾ãè¡ããªã©ã¯åå空éã«ãã£ã¦ç°ãªãã¾ããgeté¢æ°ã¯åå空éã¸ã®åç §ãå¢ããå ´åã«å®è¡ããã¾ããgeté¢æ°ã¯puté¢æ°ã¨éããã©ã®åå空éã§ãåãããã«åç §ã«ã¦ã³ã¿ãå¢ããã ãã§åå空éæ¯åºæã®å¦çã¯ããã¾ããã
nsfs
nsfsã¯åå空éã®ãã¡ã¤ã«ãprocãã¡ã¤ã«ã·ã¹ãã ã«ã¨ã¯ãã¼ãããããã®æ¬ä¼¼ãã¡ã¤ã«ã·ã¹ãã ã§ããå
æ¥ãåå空éã®ã¨ã¯ã¹ãã¼ãã¯åç´ã«procãã¡ã¤ã«ã·ã¹ãã ãå©ç¨ãã¦ã¨ã¯ãã¼ããã¦ãã¾ããããã«ã¼ãã«3.19ããnsfsã¨ãããã¡ã¤ã«ã·ã¹ãã ã¨ãã¦ã¨ã¯ã¹ãã¼ãããããã«ãªãã¾ããããã®å¤æ´ã¯ã«ã¼ãã«å
é¨ã§ã®å¤æ´ãªã®ã§ABIã«å¤åã¯ããã¾ããããã¡ã¤ã«ã¯3.19以åã¨åæ§ã«/proc以ä¸ã«ã¨ã¯ãã¼ããã¾ãã
nsfsã¯ãã¡ã¤ã«ã·ã¹ãã ã§ããext4ãbtrfsãªã©ã®é常ã®ãã¡ã¤ã«ã·ã¹ãã ã¨éããã¦ã¼ã¶ç©ºéããã®ãã¦ã³ãå¦çã¯è¡ããã¾ããããã¡ã¤ã«ã·ã¹ãã ã®ãã¦ã³ãã¯ã«ã¼ãã«ã®èµ·åæã«åæåã®ã¿ã¤ãã³ã°ã§start_kernelé¢æ°ããnsfsã®ãã¦ã³ãå¦çãå®æ½ãã¾ããã¾ããã«ã¼ãã«ã«å¯¾ãã¦ãã¡ã¤ã«ã·ã¹ãã ã®ç»é²ãè¡ããªãããã/proc/filesystemsãã¡ã¤ã«ã«ãnsfsã¯ç¾ãã¾ããã
nsfsã®ä¸»ãªæ©è½ã¯/proc/
åå空éå ±éãã¼ã¿
ãã¹ã¦ã®åå空éã§æã¤ãã¼ã¿æ§é ã«ns_commonæ§é ä½ãããã¾ãããã®æ§é ä½ã¯è¡¨ã表_ns_commonæ§é ä½ãã«ç¤ºããå¤æ°ãæã¡ã¾ããstashedã¡ã³ãå¤æ°ã¨inumã¡ã³ãå¤æ°ã¯procãã¡ã¤ã«ã·ã¹ãã ã«ã¨ã¯ã¹ãã¼ããããã¡ã¤ã«ã®ãã¼ã¿ã§ãã
å¤æ°å | å 容 |
---|---|
stashed | dentryæ§é ä½ã®ã¢ãã¬ã¹ |
ops | /procã«ã¨ã¯ã¹ãã¼ããããã¡ã¤ã«ã®æä½ããé¢æ°ç¾¤ |
inum | inodeçªå· |
表_ns_commonæ§é ä½
ãå³_uts_namespaceããproc_ns_operationsã®é¢é£ãã«UTSåå空éãä¾ã«ãns_commonæ§é ä½ãproc_ns_operationsæ§é ä½ã®é¢é£ã示ãã¾ãã
å³_uts_namespaceããproc_ns_operationsã®é¢é£
ns_commonæ§é ä½ã¯inodeæ§é ä½ã®i_privateå¤æ°ã«è¨å®ããã¦ãã¾ããsetns(2)ã«ããåå空éã®ç§»åæã¯setns(2)ã®å¼æ°ã§æ¸¡ããããã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ããinodeæ§é ä½ãåå¾ãããã®æ§é ä½ããi_privateå¤æ°ã«ã¢ã¯ã»ã¹ãã¾ãã
NSProxyæ§é ä½
NSproxyã¯ãUseråå空é以å¤ã®åå空éã管çããæ©è½ã§ããUseråå空éã¯credæ§é ä½ã管çãã¦ãã¾ããPIDåå空éãªã©ã®åå空éã®åé¢ãè¡ããªãå ´åã¯ãtask_structæ§é ä½ã®nsproxyå¤æ°ã親ããã»ã¹ã¨å ±æããåé¢ãè¡ãå ´åã«æ°è¦ä½æãã¾ããåã ã®åå空éã¯NSProxyæ§é ä½ã®ã¡ã³ãå¤æ°ã¨ãã¦è¡¨ããã¾ãã
å¤æ°å | å 容 |
---|---|
count | ãã®nsproxyã®åç §ã«ã¦ã³ã¿ |
uts_ns | UTSåå空éã®æ§é ä½ |
ipc_ns | IPCåå空éã®æ§é ä½ |
mnt_ns | Mountåå空éã®æ§é ä½ |
pid_ns_for_children | PIDåå空éã®æ§é ä½ |
net_ns | Netåå空éã®æ§é ä½ |
表_nsproxyæ§é ä½ã®ã¡ã³ã
NSProxyã¨åå空é
åç §ã«ã¦ã³ã¿
NSProxyã¨ååå空éã¯ãã¼ã¿æ§é ã¨ãã¦åç §ã«ã¦ã³ã¿ãæã£ã¦ããããã®åç §ã«ã¦ã³ã¿ã使ç¨ããåç §æ°ã0ã«ãªã£ãããªã½ã¼ã¹ã®è§£æ¾ãè¡ããªã©ã®å¦çãè¡ãã¾ããNSProxyã®åç §ã«ã¦ã³ã¿ã¯ããã»ã¹ã®çææã«åå空éã®åé¢ãè¡ããªãã£ãå ´åã«å¢ãããã¾ããååå空éã®åç §æ°ãå¢ãããã¿ã¼ã³ã¯2ã¤ããã1ã¤ã¯ããã»ã¹çææã«åå空éãåé¢ããå ´åã«ãåé¢ããªãåå空éã«é¢ãã¦åç §æ°ã1å¢ããã¾ãã2ã¤ãã®ãã¿ã¼ã³ã¯setnsã·ã¹ãã ã³ã¼ã«ãå®è¡ããæã§ãæå±ããåå空éã®åç §æ°ãå¢ããã¾ãã
UTSãIPCãMNTãNETãPIDåå空éã¯èªèº«ãæå±ããUseråå空éãåç §ãã¾ãããããã®åå空éã¯ãæ°è¦ã«åå空éãä½æããã¨ãã«åç §ãã¦ããUseråå空éã®åç §ã«ã¦ã³ã¿ã1ã¤å¢ããã¾ããåå空éã¯åç §ã«ã¦ã³ã¿ã«ããåå空éã使ç¨ããã¦ããããã§ãã¯ãã¦ãããããåç §æ°ã0ã«ãªã£ãã使ç¨ãã¦ãããªã½ã¼ã¹ã解æ¾ãã¾ãã
NSProxyã¨åå空éã®é¢é£
ããã»ã¹çæãè¡ãé¢æ°ï¼forkãvforkãcloneï¼ãå®è¡ããå ´åãcopy_processé¢æ°ããcopy_namespacesé¢æ°ãå¼ã°ãã¾ããcopy_namespacesé¢æ°ã¯flasgã確èªããUseråå空éãé¤ãåå空éã®åé¢ãæå®ããã¦ããªãå ´åï¼CLONE_NEWUTSãªã©ãåå空éã®ãã©ã°ãè¨å®ããã¦ããªãï¼ãåããã»ã¹ã¯è¦ªããã»ã¹ã®nsproxyæ§é ä½ãåç §ãã¾ãããã®å ´åãcountå¤æ°ãã¤ã³ã¯ãªã¡ã³ããåç §æ°ãå¢ããã¾ãã åå空éãåé¢ããå ´åãã¾ãNSProxyæ§é ä½ã®æ°è¦ä½æãè¡ãcountå¤æ°ã1ã«è¨å®ãã¾ãããã®å¾ãååå空éã®åé¢ããããã¯åå空éã®åç §æ°ãå¢ããã¾ããåå空éã¨NSProxyã®é¢ä¿ã¯ãããåå空éããè¦ãå ´åã1:nã®é¢ä¿ã«ãªãã¾ããNSProxyã¨ååå空éã®é¢é£ã®ä¾ããå³_NSProxyã¨åå空éãã«ç¤ºãã¾ãã
å³_NSProxyã¨åå空é
ãå³_NSProxyã¨åå空éãã§ã¯PID 1000ã¨PID 2000ã¯ã¨ãã«PID 1ããæ´¾çããããUTSåå空éã®åé¢ãè¡ã£ãç¶æ ã表ãã¦ãã¾ããPID 1ã¨PID 1000ã¯NSProxyãå ±æãã¦ãããããåç §ã«ã¦ã³ãã¯2ã¨ãªãã¾ãããã®NSproxyã管çãã¦ããUTSåå空éã¯PID 1ã¨PID 1000ãåç §ãã¦ãããããcountã¯ï¼ã«ãªãã¾ããPIDåå空éã¯PID 1ã¨PID 1000ã®ä»ãPID 2000ãããåç §ããã¦ããããcountã¯3ã¨ãªãã¾ãããã®å³ã®ããã«ãããã»ã¹ãããåå空éãåé¢ããæãåé¢ãè¡ããªãã£ãåå空éã«é¢ãã¦ã¯æ¢åã®åå空éãåç §ãç¶ãã¾ãã
åå空éã¸ã®ã¢ã¯ã»ã¹
åå空éã¸ã®ã¢ã¯ã»ã¹ããã«ã¯2種é¡ã®ãã¿ã¼ã³ãããã¾ã(å³ï¼¿åå空éã¸ã®ã¢ã¯ã»ã¹)ã1ã¤ã¯ã«ã¼ãã«ç©ºéããã¢ã¯ã»ã¹ããå ´åã§ããã®å ´åã¯task_structæ§é ä½ããã¢ã¯ã»ã¹ã§ãã¾ãããã1ã¤ã¯ã¦ã¼ã¶ç©ºéããã¢ã¯ã»ã¹ããå ´åã§ãããã¯setns(2)ã使ç¨ããå ´åã«ãªãã¾ãã
å³_åå空éã¸ã®ã¢ã¯ã»ã¹
task_structããåç §ããå ´åãUseråå空éã¸ã¯credæ§é ä½ã®real_credã¡ã³ãå¤æ°ããã¢ã¯ã»ã¹ãå¯è½ã§ãããã®ä»ã®åå空éã¸ã¯nsproxyã¡ã³ãå¤æ°ããã¢ã¯ã»ã¹ãè¡ãã¾ãã
struct task_struct *p = current; p->real_cred-_>user_ns = new_user_ns;
å³_credæ§é ä½ããã¢ã¯ã»ã¹
struct task_struct *p = current; p->nsproxy->uts_ns = new_uts_ns;
å³_nsproxyããã®åå空éã¸ã¢ã¯ã»ã¹
/procã«ã¨ã¯ã¹ãã¼ãããããã¡ã¤ã«ããã¢ã¯ã»ã¹ããå ´åãtask_structæ§é ä½ããåç §ãè¡ãã¾ããããã®ãããæä½å¯¾è±¡åå空éã®ãã¡ã¤ã«ã®inodeãåå¾ããããããproc_ns_operationsæ§é ä½ãçµç±ãã¦å¯¾è±¡ã®åå空éã«ã¢ã¯ã»ã¹ãè¡ãã¾ããUTSåå空éã¸ã¢ã¯ã»ã¹ããå ´åã®ããã¼ããå³_UTSåå空éã¸ã®ã¢ã¯ã»ã¹ãã«ç¤ºãã¾ãã
sys_open() ------------------------------------------+ -> do_sys_open() | -> do_filp_open() |- vfs層 -> path_openat() | -> follow_link() ----------------------------+ -> proc_ns_follow_link() ------------------- proc filesystem層 -> ns_get_path() ------------------------- nsfs層 -> utsns_get() ------------------------- uts namespace層
å³_UTSåå空éã¸ã®ã¢ã¯ã»ã¹
/procã«ã¨ã¯ã¹ãã¼ãããããã¡ã¤ã«ããåå空éã¸ã¢ã¯ã»ã¹ããå ´åããå³_UTSåå空éã¸ã®ã¢ã¯ã»ã¹ãã®ããã«vfs層ããprocfs層ãnsfs層ãçµç±ãã対象ã®åå空éã¸ã¨ã¢ã¯ã»ã¹ãã¾ããproc_ns_follow_linké¢æ°ã¾ã§ã®å¦çã§ããã¡ã¤ã«ã®dentryæ§é ä½ãåå¾ããproc_ns_follow_linké¢æ°ã§dentryæ§é ä½ããinodeæ§é ä½ãåå¾ãããã¦ãinodeæ§é ä½ããPROC_Ié¢æ°ã使ç¨ãã¦proc_ns_operationsæ§é ä½ãåå¾ãã¾ãã
ããã©ã«ãã®åå空é
ã«ã¼ãã«ãä½æããããã»ã¹ãinit_taskãã使ç¨ããåå空éãããã©ã«ãã®åå空éã§ããnsproxyæ§é ä½ã¯init_nsproxyã¨ããååã®å¤æ°ã§ãã«ã¼ãã«ã®ã³ã³ãã¤ã«æã«ã表_init_nsproxyãã«ç¤ºããå 容ãè¨å®ããã¾ãã
å¤æ°å | å 容 |
---|---|
count | 1 |
uts_ns | init_uts_ns |
ipc_ns | init_ipc_ns |
mnt_ns | NULL |
pid_ns_for_children | init_pid_ns |
net_ns | init_net |
表_init_nsproxy
Mountåå空éã¯å®éã«ã«ã¼ãã«ãèµ·åããã¾ã§ã¯ãã¼ã¿ã®è¨å®ãè¡ããªãã®ã§NULLãè¨å®ããã¾ããããã®ä»ã®åå空éã¯ããã©ã«ãã®è¨å®ã使ç¨ãããåå空éã®åé¢ãããã¾ã§ã¯åããã»ã¹ã¸ã¨å¼ãç¶ããã¦ããã¾ãã init_nsproxyã¯ããã©ã«ãã®åå空éã¨ãªã£ã¦ãã¾ããç¹ã«PIDåå空éã®å ´åãå ¨ã¦ã®PIDåå空éã®ã«ã¼ãããã®init_nsproxyã®PIDåå空éã¨ãªãã¾ãã Useråå空éã¯init_user_nsã¨ããååã®å¤æ°ã§å®ç¾©ããã¦ãã¾ãããã®å¤æ°ã¯ããã©ã«ãã®credæ§é ä½ã®user_nså¤æ°ã«è¨å®ããã¾ãããã®credæ§é ä½ãinit_taskã§ä½¿ç¨ãã¾ãã Mountåå空é以å¤ã®ååå空éã®ããã©ã«ãå¤ã¯cãã¡ã¤ã«ã«ã¦å®ç¾©ããã¦ãã¾ãã
åå空é | ãã¡ã¤ã« |
---|---|
UTS | init/version.c |
IPC | ipc/msgutil.c |
PID | kernel/pid.c |
Net | net/core/net_namespace.c |
User | kernel/user.c |
åå空éã®å ±æã»åé¢ã»ç§»å
é常ããã»ã¹ã¯ãä½ææã«è¦ªããã»ã¹ã®åå空éãå¼ãç¶ãã¾ããããã»ã¹ã親ããã»ã¹ããåå空éãåé¢ãããã«ã¯ãã表_åå空éãæä½ããã·ã¹ãã ã³ã¼ã«ãã«ç¤ºããã·ã¹ãã ã³ã¼ã«ã使ç¨ãã¾ããcloneé¢æ°ã·ã¹ãã ã³ã¼ã«çºè¡æã«CLONE_NEWPIDãªã©ã®åå空éç¨ãã©ã°ãç¨ãã¦ãããã»ã¹çææã«åé¢ãããããããã¯ããã»ã¹ä½æå®äºå¾ã«unshareé¢æ°ã·ã¹ãã ã³ã¼ã«ãç¨ãã¦è¦ªããã»ã¹ã®åå空éããåé¢ããããã¾ãã¯setnsé¢æ°ã·ã¹ãã ã³ã¼ã«ã«ããæ¢åã®åå空éã«æå±ããããã¨ãã§ãã¾ããcloneã·ã¹ãã ã³ã¼ã«ã¨unshareã·ã¹ãã ã³ã¼ã«ã§ã¯ã表_åå空éã®CLONEãã©ã°ãã«ç¤ºãããã©ã°ãç¨ãã¦åé¢ããããåå空éãæå®ãã¾ããsetnsã·ã¹ãã ã³ã¼ã«ã§ã¯ãCLONEãã©ã°ã®ä»ãæå±ãããåå空éã®ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ãå¼æ°ã¨ãã¦åãåãã¾ããããã§æ¸¡ããã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã¯/proc/
ã·ã¹ãã ã³ã¼ã« | æ©è½ |
---|---|
clone | ããã»ã¹ã®çææã«åå空éãåé¢ãã |
unshare | ããã»ã¹ã®åå空éãåé¢ãã |
setns | ããã»ã¹ã®åå空éãä»ã®ããã»ã¹ã®åå空éã«æå±ããã |
表_åå空éãæä½ããã·ã¹ãã ã³ã¼ã«
ãã©ã°å | å 容 |
---|---|
CLONE_NEWIPC | IPCåå空éã®åé¢ |
CLONE_NEWNET | NETåå空éã®åé¢ |
CLONE_NEWNS | MOUNTåå空éã®åé¢ |
CLONE_NEWPID | PIDåå空éã®åé¢ |
CLONE_NEWUSER | USERåå空éã®åé¢ |
CLONE_NEWUTS | UTSåå空éã®åé¢ |
表_åå空éã®CLONEãã©ã°
åå空éã®å ±æã¨è¤è£½
fork(2)
fork(2)ã«ããåå空éã®å ±æã®ä¾ã説æãã¾ããããã§ã¯ï¼ã¤ã®ããã»ã¹PID123ï¼ã¨PID 1192ãããããããã®è¦ªããã»ã¹ã¯PID784ã¨åãã§ãããåå空éã¯å¥ã¨ãªã£ã¦ãã¾ãããå³_forkå¾ã®åå空éãã§ã¯ãpid1326ã¯è¦ªããã»ã¹ã¨åå空éãå ±æãã¦ãããããåãåå空éã«å¯¾ãã¦ç·ãç¹ãã£ã¦ãã¾ãã
å³_forkå¾ã®åå空é
clone(2)
clone(2)ã·ã¹ãã ã³ã¼ã«ã¯ããã»ã¹ãä½æããããã®æ©è½ã§ããããã»ã¹ã®çæã¯fork(2)ã¨åæ§ã®æ¹æ³ã§è¡ãã¾ãããããç´°ããå¶å¾¡ãè¡ãã¾ããããã»ã¹çææã«flagså¼æ°ã« 表_åå空éã®CLONEãã©ã°
ã§ç¤ºãã CLONE ã§å§ã¾ããã©ã°ãè¨å®ãããã¨ã§åããã»ã¹ã®è¨å®ãå¯è½ã§ããCLONEãã©ã°ã®ãã¡ãåå空éã«é¢ããããã©ã°ã¯è¡¨CLONEãã©ã°ã§ç¤ºããã®ãããããã©ã°ã§æå®ãããåå空éã親ããã»ã¹ããåé¢ãã¾ãã
clone(2)ã§ã¯flagsã§æå®ããåå空éã®ã¿æ°è¦ã«ä½æãããã以å¤ã®åå空éã¯è¦ªããã»ã¹ã¨å ±æãã¾ãããå³_cloneå¾ã®åå空éãã§ã¯cone(2)ã«ã¦Netåå空éã®ã¿ãåé¢ããæã®ç¶æ ã§ããNetåå空éã¯è¦ªããã»ã¹ã¨å¥ã®åå空éã使ç¨ãã¾ããããã以å¤ã¯å ±æãã¾ãã
å³_cloneå¾ã®åå空é
fork(2)ã»clone(2)æã®å¦ç
fork(2)ãclone(2)ã¯ã«ã¼ãã«å é¨ã§ã¯do_forké¢æ°ã«ã¦å ±éåããã¦ãã¾ãããã®ãããfork(2)ã»clone(2)ã«ãããåå空é ã®å¦çã¯åããã¹ãéãã¾ããããã»ã¹çææã®ã³ã¼ã«ããã¼ãå³_ããã»ã¹çææã®ã³ã¼ã«ããã¼ã«ç¤ºãã¾ãã ããã»ã¹çææã®åå空éã«é¢ããå¦çã¯do_forké¢æ°ããå¼ã°ããcopy_processé¢æ°ã«ã¦ã¦ã¼ã¶åå空éã«å¯¾ããã®å¦çã¨ãNSProxyã«å¯¾ããå¦çãè¡ãã¾ãã
do_fork() -> copy_process() (1) -> copy_creds() (2) -> prepare_creds() (3) -> create_user_ns() (4) -> set_cred_user_ns() (5) -> copy_namespaces() (6) -> create_new_namespaces() (7) -> create_nsproxy() (8) -> copy_mnt_ns() (9) -> copy_uts_ns() (10) -> copy_ipcs() (11) -> copy_pid_ns() (12) -> copy_net_ns() (13)
å³_ããã»ã¹çææã®ã³ã¼ã«ããã¼
(1)ã®copy_processé¢æ°ã®æåã®å¦çã§è¦ªããã»ã¹ã®task_structæ§é ä½ãããããä½æããããã»ã¹ã®task_structæ§é ä½ã«ã³ãã¼ãã¾ãããã£ã¦ããã®æç¹ã§ã¯è¦ªããã»ã¹ã»åããã»ã¹ã§åå空éãå ±æããç¶æ ã«ãªã£ã¦ãã¾ãã(2)ãã(5)ã§Useråå空éã«å¯¾ããå¦çãè¡ãã¾ããCLONE_NEWUSERãã©ã°ãè¨å®ããã¦ããå ´åã¯Useråå空éãæ°è¦ã«ä½æãã¾ãã(6)以éã¯NSProxyã¨ãã®ç®¡çä¸ã«ããåå空éã®åç §æ°ã®å¢å ã¾ãã¯æ°è¦ä½æå¦çã¨ãªãã¾ããã¾ã(6)ã®copy_namespacesé¢æ°ã§ãã©ã°ã確èªãã¾ãããåå空éã«é¢ããCLONEãã©ã°ãè¨å®ããã¦ãããªãå ´åã¯NSProxyã®åç §ã«ã¦ã³ããå¢å ãã¦é¢æ°ãçµäºãã¾ããfork(2)ã®å ´åã¯åå空éã¯è¦ªããã»ã¹ã¨å ±æããããããã§åå空éã«é¢ããå¦çã¯çµäºã¨ãªãã¾ããclone(2)ã§åå空éã«é¢ãããã©ã°ã1ã¤ã§ãè¨å®ããã¦ããå ´åã¯(7)以éã®å¦çã«é²ã¿ã¾ããã¾ããåå空éï¼NSProxyï¼ã親ããã»ã¹ã¨å ±æããªãããã(8)ã®create_nsproxyé¢æ°ã§NSProxyæ§é ä½ã®ã¤ã³ã¹ã¿ã³ã¹ãåæåãã¾ãã ãã®å¾ãååå空éã®ã³ãã¼ãè¡ãé¢æ°*1ãé 次å¼ã³åºãã¦ããã¾ãããããã®é¢æ°ã®è©³ç´°èª¬æã¯æ¬èª¬ã§ã¯è¡ãã¾ãããååå空éã§å ±éããã®ã¯CLONEãã©ã°ãè¨å®ããã¦ããªããã°ãèªèº«ã®åç §ã«ã¦ã³ããã¤ã³ã¯ãªã¡ã³ãããCLONEãã©ã°ãè¨å®ããã¦ããå ´åã¯æ°è¦ã«åå空éãè¨å®ããã¨ããå¦çã¨ãªãã¾ããåå空éã®æå¾ã®å¦çã¯ä½æä¸ã®ããã»ã¹ã®nsproxyæ§é ä½ã®å¤æ°ãæ°ãã«ä½æããnsproxyã«ç½®ãæããè¡ãã¾ããããã«ã¦ä½æãã¦ããããã»ã¹/ã¹ã¬ããã®åå空éãæ°ããåå空éã«åãæ¿ããã¾ãã
unshare(2)
unshare(2)ã¯åå空éãç¾å¨ã®åå空éããåé¢ããæ°è¦ã«åå空éãä½æãã¾ããåé¢å¯¾è±¡ã®åå空éã®æå®ã¯clone(2)ã¨åããCLONEãã©ã°ã使ç¨ãã¾ãããå³unshareå¾ã®åå空éãã§ã¯unshare(2)ã«ãããPID1326ã®Netåå空éã親ããã»ã¹ããåé¢ãã¦ãæ°è¦ã«åå空éãä½æããç¶æ ã§ãã
åå空éã®åé¢å¦ç
åå空éã®åé¢ã¯unshare(2)ã§è¡ãã¾ããããã®ã·ã¹ãã ã³ã¼ã«ã¯åå空é以å¤ãæä½ãã¾ããæ¬èª¬ã§ã¯åå空éã«é¢ããé¨åã®ã¿èª¬æãã¾ããåå空éåé¢æã®ã³ã¼ã«ããã¼ã å³_åå空éåé¢ã®ã³ã«ã¼ããã¼ã«ç¤ºãã¾ããåå空éãåé¢ããå ´åã®ä¸»ãªå¦çã¯clone(2)ã¨åãã§ãã大ããéãã®ã¯å¼ã³åºãå ã¨ãåå空éï¼task_structæ§é ä½ã®nsproxyå¤æ°ï¼ãåãæ¿ããå¦çãå¿ è¦ã«ãªãç¹ã§ãã
sys_unshare() (1) -> check_unshare_flags() (2) -> unshare_userns() (3) -> prepare_creds() (4) -> create_user_ns() (5) -> unshare_nsproxy_namespaces() (6) -> create_new_namespaces() (7) -> exit_shm() (8) -> shm_init_task() (9) -> switch_task_namespaces() (10) -> free_nsproxy() (11)
å³_åå空éåé¢ã®ã³ã«ã¼ããã¼
(1)ã®sys_unshareé¢æ°ã¯é¢æ°ãæºåå¼ã³åºãã¦ããã¾ãã(2)ã®check_unshare_flagsé¢æ°ã¯flagså¼æ°ã妥å½ãããã§ãã¯ãã¾ãã(3)ã®unshare_usernsé¢æ°ã§ã¯CLONE_NEWUSERãã©ã°ãè¨å®ããã¦ãããã確èªããå¾ã¯ãprepare_credsé¢æ°ã¨create_user_nsé¢æ°ã®å¼ã³åºããè¡ãã¾ãããã®å¦çã®æµãã¯fork(2)/clone(2)æã®copy_credsé¢æ°ã¨åæ§ã§ããcreate_user_nsé¢æ°ãæåããå ´åã¯ãé¢æ°ã®å¼æ°ã§æ¸¡ãããnew_credå¤æ°ã«ä½æããcredæ§é ä½ãè¨å®ãã¾ãã (6)ã®unshare_nsproxy_namespacesé¢æ°ããNSProxy管çä¸ã®åå空éã®å¦çã«ãªãã¾ããæåã«flagså¼æ°ã®ãã§ãã¯ã§åé¢ãå¿ è¦ã確èªãã¾ããåé¢ãè¡ãå ´åã¯åé¢æä½ãè¡ã権éããããã確èªãã権éããªãå ´åã¯ã¨ã©ã¼ãè¿ãã¾ãã権éã«åé¡ããªããã°(7)ã®create_new_namespacesé¢æ°ãå¼ã³åºããä½æããNSProxyæ§é ä½ã®å¤æ°ãå¼æ°ã§æ¸¡ãããnew_nspå¤æ°ã«è¨å®ãã¾ãããã®æç¹ã§ã¯NSProxyã®åãæ¿ãã¯è¡ããã¾ããã unshare_nsproxy_namespacesé¢æ°ãçµäºãããsys_unshareé¢æ°ã«æ»ãã¾ããIPCåå空éãåé¢ãã¦ããå ´åãæ¢åã®ã»ããã©ãªãã¸ã§ã¯ãã(8)ã®exit_shmé¢æ°ã§è§£æ¾ãã(9)ã®shm_init_taské¢æ°ã«ã¦å度åæåãã¾ãã NSProxy管çä¸ã®åå空éãåé¢ããå ´åã¯(10)ã®switch_task_namespacesé¢æ°ã§ããã»ã¹ã«è¨å®ããã¦ããNSProxyãä½æããNSProxyã«å·®ãæ¿ãã¾ãã switch_task_namespacesé¢æ°ã¯task_structã®ããã¯ãåå¾ããnsproxyãå·®ãæ¿ãã¾ãã次ã«å ã®nsproxyã®åç §æ°ãæ¸ãããããä»ã«ä½¿ç¨è ãããªããã°nsproyã¨ããã«ç´ã¥ãåå空éã®ãªã½ã¼ã¹ã(11)ã®free_nsproyé¢æ°ã«ã¦è§£æ¾ãã¾ãã
åå空éã®ç§»å
setns(2)
setns(2)ã¯åå空éãæ¢åã®åå空éããä»ã®åå空éã«ç§»åãã¾ãããå³_setnså¾ã®åå空éãã§ã¯setns(2)ã«ãããPID1326ã®Netåå空éãPID1234ã®åå空éã«å¤æ´ããç¶æ ã§ãã
åå空éã®ç§»åå¦ç
sys_setns() (1) -> proc_fs_get() (2) -> get_proc_fs() (3) -> create_new_namespaces() (4) -> install() (5) -> switch_task_namespaces() (6)
å³_åå空é移åã®ã³ã¼ã«ããã¼
åå空éã®ç§»åã¯(1)ã®setns(2)ã«ãã移åå ã®åå空éã®ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã移åããåå空éã®ç¨®é¡ãæå®ãã¦å®è¡ãã¾ããã¾ã(2)ã(3)ã«ã¦setns(2)ã®å¼æ°ã§æ¸¡ããããã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ããã移åå åå空éã®ns_commonæ§é ä½ãåå¾ãã¾ãã(4)ã®create_new_namespacesé¢æ°ã§æ°ããnsproxyæ§é ä½ãè¨å®ãã¾ãããã®æã«ãsetnsé¢æ°ã§ã¯create_new_namespaceé¢æ°ã®flagå¼æ°ã«0ã渡ãã¦å¼ã³åºãã¾ããããã«ãããnsproxyæ§é ä½ãä½æããseråå空éãé¤ãå ¨ã¦ã®åå空éã®åç §æ°ãã¤ã³ã¯ãªã¡ã³ããã¾ããUseråå空éã¯nsproxyæ§é ä½ã®ç®¡ç対象ã§ã¯ç¡ãããã移åããåå空éãUseråå空éã®å ´åã¯ã¾ã ä½ãè¨å®ããã¦ããªãç¶æ ã§ãã次ã®(5)ã®ns_commonæ§é ä½ã®opså¤æ°ã«è¨å®ãããinstallé¢æ°ãå®è¡ããåå空éã®ç§»åå¦çãè¡ãã¾ããåå空é移åæã«è¡ãå¦çã¯ååå空éã§éããããããã§ã¯å ±éãã¦è¡ãããé¨åã®ã¿èª¬æãã¾ããåå空éã®ç§»åã§ã¯ã移åå ã»ç§»åå ã®åå空éã«ããã¦ãåå空éã®ç§»åãè¡ãã±ã¼ãããªãã£ï¼CAP_SYS_ADMINï¼ããããã®ãã§ãã¯ãè¡ãã権éããªããã°ã¨ã©ã¼ãè¿ãã¾ããåå空éã移åããã¨ãã¯ãç¾å¨ã®åå空éããæããããã移åå ã®åå空éã®åç §æ°ãæ¸ããå¿ è¦ãããã¾ããããã¨ã¯éã«ã移åå åå空éã®åç §æ°ãå¢ããå¿ è¦ãããã¾ãããã®æ¨©éãã§ãã¯ã¨åç §ã«ã¦ã³ã¿ã®è¨å®ã¯å ¨ã¦ã®åå空éã«ããã¦ãåå空éã®ç§»åæã«è¡ãããå¦çã¨ãªãã¾ããinstallé¢æ°ã«ããåå空éã®ç§»åå¦çãå®äºãããã(6)ã®switch_task_namespacesé¢æ°ã§ããã»ã¹ã®nsproxyæ§é ä½ãå ¥ãæ¿ããåå空éã®ç§»åå¦çãå®äºãã¾ãã
Mountåå空é
Mountåå空éã§ã¯ã·ã¹ãã ã«ãã¦ã³ããããã¡ã¤ã«ã·ã¹ãã ãã³ã³ããéã§åé¢ãããã¨ãã§ãã¾ããã³ã³ããã®ä½ææã«Mountåå空éãåé¢ããå ´åããã¹ãå´ã§USBã¡ã¢ãªã¹ãã£ãã¯ã/mnté ä¸ã«ãã¦ã³ããã¦ãã³ã³ããå´ã®/mntã«ã¯å½±é¿ã¯ããã¾ããã
Mountåå空éã®å®è£
Mountåå空éã¯mnt_namespaceæ§é ä½ã«ã¦ç®¡çããã¦ãã¾ãã
å¤æ°å | 説æ |
---|---|
count | ãã®åå空éã®åç §ã«ã¦ã³ã¿ |
ns | ns_commonæ§é ä½ |
root | ãã®åå空éã«ãããã«ã¼ããã¡ã¤ã«ã·ã¹ãã |
list | mountæ§é ä½ã®mnt_listå¤æ°ã«ç¹ããMountåå空éã®ãªã¹ã |
user_ns | ãã®åå空éãæå±ããã¦ã¼ã¶åå空é |
seq | ãã¦ã³ããã«ã¼ãããªãããã«ããããã®ã·ã¼ã±ã³ã¹çªå· |
event | ãã¦ã³ã/ã¢ã³ãã¦ã³ãã®ã¤ãã³ãçºçåæ°ãè¨é² |
表_mnt_namespaceæ§é ä½
Mountåå空éã®åæå
Mountåå空éã¯ã³ã³ãã¤ã«æç¹ã§ã¯ãã¦ã³ããããã¡ã¤ã«ã·ã¹ãã ã®æ å ±ãç¡ããããã«ã¼ãã«ã®ãã¼ãæã«åæåãè¡ãã¾ããåæåã®æµãã¯å³_Mountåå空éã®åæåããã¼ã®æµãã§å®è¡ãã¾ããåå空éã®åæåã«é¢ä¿ããã®ã¯init_mount_treeé¢æ°ã¨create_mnt_nsé¢æ°ã®2é¢æ°ã§ãã
-> start_kernel() (1) -> vfs_caches_init() (2) -> mnt_init() (3) -> init_mount_tree() (4) -> create_mnt_ns() (5)
å³_Mountåå空éã®åæåããã¼
create_mnt_nsé¢æ°ã¯mnt_namespaceæ§é ä½ã®ã¡ã¢ãªç¢ºä¿ãMountåå空éã®ã«ã¼ããã¡ã¤ã«ã·ã¹ãã ãè¨å®ãè¡ãã¾ãã init_mount_treeé¢æ°ã¯create_mnt_nsé¢æ°ãå¼ã³ãMountåå空éã®ã¤ã³ã¹ã¿ã³ã¹ãçæãè¡ããinit_taskã®Mountåå空éã«ä½æããmnt_namespaceæ§é ä½ãè¨å®ãã¾ããããã¦ãåç §æ°ã1ã¤å¢ããã¦Mountåå空éã®åæåå¦çãå®äºãã¾ãã
Mountåå空éã®åé¢
Mountåå空éã®åé¢ã¯copy_mnt_nsé¢æ°ã«ããè¡ããã¾ãã
create_new_namespaces() (1) -> copy_mnt_ns() (2) -> alloc_mnt_ns() (3) -> copy_tree() (4 -> clone_mnt() (5)
å³_Mountåå空éã®åé¢ããã¼
copy_mnt_nsé¢æ°ã¯ã¾ãalloc_mnt_nsé¢æ°ã«ã¦æ°ããmnt_namespace æ§é ä½ã®ã¤ã³ã¹ã¿ã³ã¹ãçæãã¾ããalloc_mnt_nsé¢æ°ã¯/proc/
ãã©ã° | 説æ |
---|---|
CL_COPY_UNBINDABLE | ã³ãã¼ãããã¦ã³ããã¤ã³ãã«MNT_UNBINDLEãè¨å®ããã¦ããå ´åã«ãã³ãã¼ãè¡ããªã |
CL_EXPIRE | ãã¦ã³ããã¤ã³ãã®æéåãã管çãããªã¹ãã«ç»é²ãã |
CL_SHARED_TO_SLAVE | ãã¦ã³ããã¤ã³ããè¤è£½ããæã«å¶éããããï¼å ±æãµãããªã¼æ©è½ï¼ |
CL_UNPRIVILEGED | MS_NOSUIDãMS_RDONLYãªã©ã®ãã©ã°ã®è¨å®å¤æ´ã許å¯ããªã |
表_CLãã©ã°
ãã¦ã³ãããã¤ã³ãã®ã³ãã¼ã¯2段éã§è¡ããã¾ããæåã®ã¹ãããã§ã¯clone_mnté¢æ°ã¨copy_treeé¢æ°ã«ã¦è¡ãã¾ããcopy_treeé¢æ°ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã表_copy_treeã®å¼æ°ã«ç¤ºãã¾ãã
å¼æ°å | 説æ |
---|---|
old | ç¾å¨ã®Mountåå空éã«è¨å®ããã¦ããã«ã¼ããã¡ã¤ã«ã·ã¹ãã |
root | oldã®ãã£ã¬ã¯ããªã¨ã³ã㪠|
flags | å ã®æé ã§è¨å®ããcopy_flags |
表_copy_treeã®å¼æ°
copy_treeé¢æ°ã¯æåã«clone_mnté¢æ°ãå¼ã³ãmountæ§é ä½ã®ã¤ã³ã¹ã¿ã³ã¹ãä½æã¨å¼æ°ã®flagsã®å¤ã«å¿ãã¦mountæ§é ä½ãè¨å®ãã¾ããããã§ã¯ã«ã¼ããã¡ã¤ã«ã·ã¹ãã ãè¨å®ãã¾ãããã®å¾ããã¦ã³ããã¤ã³ããèµ°æ»ãã¦ãã³ãã¼ãã¹ããã¦ã³ããã¤ã³ããããã°clone_mnté¢æ°ãå¼ã³mountæ§é ä½ãä½æããæåã«ä½æããmountæ§é ä½ã®ã¤ã³ã¹ã¿ã³ã¹ã®ãªã¹ãï¼mnt_listå¤æ°ï¼ã«ã¤ãªãã¾ãããããå ¨ã¦ã®ãã¦ã³ããã¤ã³ãã«å¯¾ãã¦è¡ã£ã¦ããã¾ãããã¦ã³ããã¤ã³ããã³ãã¼ããªãæ¡ä»¶ã¯cooy_mnt_nsé¢æ°ã§è¨å®ããflagsã«CL_COPY_UNBINDABLEãè¨å®ãããã¦ããå ´åã¨ããã¦ã³ããã¤ã³ãã«MNT_UNBINDABLEãè¨å®ããã¦ããå ´åã§ããcopy_treeé¢æ°ã«ã¦ãã¡ã¤ã«ã·ã¹ãã ããªã¼ã®ã³ãã¼ãå®äºãããcopy_mnt_nsé¢æ°ã«æ»ãã2段éç®ã®å¦çã«å ¥ãã¾ãããã®å¦çã§ã¯copy_treeé¢æ°ã§ä½æããmountæ§é ä½ã«å¯¾ãã¦æå±ããåå空éã®è¨å®ãè¡ãã¾ããã¾ãããã¦ã³ããã¤ã³ãã®åç §æ°ã®ã¤ã³ã¯ãªã¡ã³ããè¡ãã¾ãã
IPCåå空é
IPCåå空éã¯Inter Process Communication(ããã»ã¹ééä¿¡)ã®ãã¡ãSystem V IPC ãªãã¸ã§ã¯ãã¨ãPOSIX ã¡ãã»ã¼ã¸ãã¥ã¼ãåé¢ãã¾ãããããã®ä»çµã¿ã使ã£ã¦ããã»ã¹ééä¿¡ãè¡ãå ´åãããã»ã¹ã¯åä¸ã®IPCåå空éã«æå±ãã¦ããå¿ è¦ãããã¾ããIPCåååºéã管çããæ©è½ã¯ã»ããã©ãSystem V ã¡ãã»ã¼ã¸ãã¥ã¼ãå ±æã¡ã¢ãªãPOSIXã¡ãã»ã¼ã¸ãã¥ã¼ã§ãã
IPCåå空éã®å®è£
IPCåå空éã¯ipc_namespaceæ§é ä½ã«ã¦ç®¡çããã¦ãã¾ãã
å¤æ°å | 説æ |
---|---|
count | ãã®åå空éã®åç §ã«ã¦ã³ã¿ |
ids | ã»ããã©ã管çããé å |
sem_ctls | SEMMSL,SEMMNS,EMOPM,SEMMNIã表ãé å |
used_sems | ä½ææ¸ã¿ã»ããã©æ° |
msg_ctlmax | SystemVã¡ãã»ã¼ã¸ã®æ大ãµã¤ãº |
msg_ctlmnb | SystemVã¡ãã»ã¼ã¸ãã¥ã¼ãä¿æã§ããã¡ãã»ã¼ã¸ã®æå¤§å¤ |
msg_bytes | SystemVã¡ãã»ã¼ã¸ãã¥ã¼ã®ãµã¤ãº |
msg_hdrs | SystemVã¡ãã»ã¼ã¸ãã¥ã¼æ° |
shm_tot | 確ä¿ãããå ±æã¡ã¢ãªæ° |
shm_ctlmni | å ±æã¡ã¢ãªã»ã°ã¡ã³ãã®æå°ãµã¤ãº |
shm_rmid_forced | 1ãè¨å®ããå ´åã使ç¨è ããªããªãã°å ¨ã¦ã®SystemVå ±æã¡ã¢ãªã»ã°ã¡ã³ãã«ç ´æ£æ¸ã¿ãã¼ã¯ãè¨å®ãã |
ipcns_nb | notifier chain |
mq_mnt | mqueuefsã®ãã¦ã³ããã¼ã¿ |
mq_queues_count | POSIXã¡ãã»ã¼ã¸ãã¥ã¼æ° |
mq_queues_max | POSIXã¡ãã»ã¼ã¸ãã¥ã¼ã®æå¤§å¤ |
mq_msg_max | 1ã¤ã®ãã¥ã¼ã«å ¥ãããã¨ãã§ããã¡ãã»ã¼ã¸ã®æå¤§æ° |
mq_msgsize_max | ã¡ãã»ã¼ã¸ã®æ大ãµã¤ãº |
mq_msg_default | mq_opené¢æ°å¼ã³åºãæã«attrãNULLã«æå®ããå ´åã®mq_maxmsgã®ããã©ã«ãå¤ |
mq_msgsize_default | mq_opené¢æ°å¼ã³åºãæã«attrãNULLã«æå®ããå ´åã®mq_msgsizeã®ããã©ã«ãå¤ |
user_ns | IPCåå空éãæå±ããã¦ã¼ã¶åå空é |
ns | ns_commonæ§é ä½ |
表_ipc_namespaceæ§é ä½
ipc_idsæ§é ä½ï¼è¡¨_ipc_idsæ§é ä½ï¼ã¯ã»ããã©ã管çããã«ä½¿ç¨ãã¾ãã
å¤æ°å | 説æ |
---|---|
in_use | å²ãå½ã¦ãIPCèå¥åæ° |
seq | IPCãªãã¸ã§ã¯ãçæã®ã·ã¼ã±ã³ã¹çªå· |
rwsem | IPCåå空éãæä½ããã¨ãã«ä½¿ç¨ããã»ããã© |
ipcs_idr | IPCãªãã¸ã§ã¯ãã®IDã管ç |
next_id | IPDãªãã¸ã§ã¯ãä½ææã«è¨å®ããID |
表_ipc_idsæ§é ä½
IPCåå空éã®åæå
PID1ã«è¨å®ãããIPCåå空éã¯init_ipc_nsã§ãã³ã³ãã¤ã«æã«å³_init_ipc_nsã®ããã«è¨å®ãè¡ããã¾ãã
struct ipc_namespace init_ipc_ns = { .count = ATOMIC_INIT(1), .user_ns = &init_user_ns, .ns.inum = PROC_IPC_INIT_INO, #ifdef CONFIG_IPC_NS .ns.ops = &ipcns_operations, #endif };
å³_init_ipc_ns
ãã ãããã®æ®µéã§ã¯IPCåå空éã«é¢ããé¨åã®åæåã ãã§ãã¡ãã»ã¼ã¸ãã¥ã¼ãªã©ã®åæåã¯è¡ããã¾ããããããã®åæåã¯Linuxã«ã¼ãã«ã®èµ·åæã«ãã詳細ãªè¨å®ãè¡ããã¾ããIPCã®ãªã½ã¼ã¹ã®åæåã¯ipc_inité¢æ°ã«ã¦è¡ãã¾ãã
ipc_init() (1) -> sem_init() (2) -> msg_init() (3) -> shm_init() (4)
ã»ããã©ã¯sem_inité¢æ°ã«ã¦åæåãè¡ãã¾ããã¾ãipc_namespaceæ§é ä½ã®sc_semctlså¤æ°ãã»ããã©ã®ä½¿ç¨æ°ãã»ããã©ã使ç¨ããipc_idsæ§é ä½ã®åæåãè¡ãã¾ãããã®æ¬¡ã«/proc/sysvipc/semãã¡ã¤ã«ãä½æãã¾ããã¡ãã»ã¼ã¸ãã¥ã¼ã¯msg_inité¢æ°ã«ã¦åæåãã¾ãããã®é¢æ°ãã»ããã©ã¨åæ§ã«å¤æ°ã®åæåã¨/procãã¡ã¤ã«ã·ã¹ãã ã«ãã¡ã¤ã«ï¼/proc/sysvipc/msgï¼ãä½æãè¡ãã¾ããå ±æã¡ã¢ãªã®åæåã¯shm_inité¢æ°ã«ã¦è¡ãã¾ãããã¡ãã»ã¼ã¸ãã¥ã¼ãã»ããã©ã¨éããshm_inité¢æ°ã§ã¯/proc/sysvipc/shmãã¡ã¤ã«ã®ä½æã®ã¿ãè¡ãã¾ããå¤æ°ã®åæåã¯å¥éipc_ns_inité¢æ°ã«ã¦è¡ãã¾ãã
UTSåå空é
UTSåå空éã§ã¯unameã·ã¹ãã ã³ã¼ã«ãè¿ããã¼ã¿ã®ãã¡ãnodenameãåå空éæ¯ã«è¨å®ãããã¨ãã§ãã¾ããã«ã¼ãã«ã®ãã¼ã¸ã§ã³ãCPUã¢ã¼ããã¯ãã£ãªã©ãã«ã¼ãã«ãå¿ è¦ã¨ããé ç®ã¯æ±ãã¾ãããåå空éã®åé¢ãè¡ãã¨ãã¯æ¢åã®åå空éã®ãã¼ã¿ãå¼ãç¶ãã¾ãã
UTSåå空éã®å®è£
UTSåå空éã®ãã¼ã¿æ§é ã¯æ¯è¼çã·ã³ãã«ã§åå空éã«å¿ è¦ãªæä½éã®æ§é ã¨ãªã£ã¦ãã¾ãã
å¤æ°å | 説æ |
---|---|
kref | åç §ã«ã¦ã³ã¿ |
name | ãã¹ãåããã¼ã¸ã§ã³ãªã©ã管ç |
user_ns | æå±ããã¦ã¼ã¶åå空é |
ns | ns_commonæ§é ä½ |
表_uts_namespaceæ§é ä½
UTSåå空éã®ä½æ
clone(2)ãunshre(2)ãªã©ã§ã¯UTSåå空éãæ°è¦ä½æãã¾ãããUTSåå空éã¯åå空éåºæã®å¦çã¯ããã¾ããããã®ãããcopy_utsnameé¢æ°ã§ã¯/proc/
UTSåå空éã®ç§»å
UTSåå空éã®ã¤ã³ã¹ãã¼ã«é¢æ°ã¯ç¾å¨ã®åå空éã¨ç§»åå ã®åå空éã§CAP_SYS_ADMIN権éãæã£ã¦ããããã§ãã¯ãã¾ãã次ã«ç§»åå ã®åå空éã®åç §ã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ããã移ååã®åå空éã®åç §ã«ã¦ã³ã¿ããã¯ãªã¡ã³ããã¾ããããã¦ãnsproxyã®UTSåå空éãå·®ãæ¿ãã¦çµäºãã¾ããNSProxyã管çããåå空éã¯æ¦ãåæ§ã®å¦çãè¡ãã¾ãã
Netåå空é
Netåå空éã§ã¯ãããã¯ã¼ã¯é¢ããè¨å®ãä¾ãã°ãIPv4/IPv6ãããã³ã«ã¹ã¿ãã¯ãã«ã¼ãã£ã³ã°ã®ä»ã«socketã使ç¨ãããã¼ãçªå·ãä»®æ³ãããã¯ã¼ã¯ããã¤ã¹æ©è½(veth)ãªã©ãããã¾ããåå空éãåé¢ããã¨ãã¯æ¢åã®è¨å®ãå¼ãç¶ãããæ°è¦ã«ãã¼ã¿ãä½æããã¾ãããã®ãããåå空éã®åé¢ãå®äºããæç¹ã§ã¯loãå«ãã¦ãããã¯ã¼ã¯ããã¤ã¹ã¯ä¸ååå¨ãã¾ããã®ã§ãå¿ è¦ãªããã¤ã¹ãipã³ãã³ããªã©ã§è¨å®ããå¿ è¦ãããã¾ãã
Netåå空éã®å®è£
netæ§é ä½ãNetåå空éã表ç¾ãã¾ãããã®æ§é ä½ã«åå空éã管çããããã®ãã¼ã¿ããããã³ã«ãªã©ã®ãããã¯ã¼ã¯æ©è½ã®ãã¼ã¿ãå«ã¾ãã¾ãã
å¤æ°å | 説æ |
---|---|
count | ãã®Netåå空éã®åç §æ° |
list | ä½æããNetåå空éãä¿æãããªã¹ã |
user_ns | Netåå空éã«è¨å®ããã¦ã¼ã¶åå空é |
netns_ids | Netåå空éã®ID |
ns | ns_commonæ§é ä½ |
proc_net | /proc/netãã£ã¬ã¯ããªã®ãã¼ã¿ |
proc_net_stat | /proc/net/statãã£ã¬ã¯ããªã®ãã¼ã¿ |
gen | æ±ç¨ã®ãã¼ã¿ãä¿åããããã®æ§é ä½ |
表_netæ§é ä½
ã¾ããæ©è½ãã¨ã«ä»»æã®ãã¼ã¿ãè¨å®ããããã®æ±ç¨ãã¼ã¿æ§é ä½ã¨ãã¦net_genericæ§é ä½ãããã¾ããnet_genricæ§é ä½ã®å 容ã表_net_genericæ§é ä½ã«ç¤ºãã¾ãããã®æ§é ä½ãé åã¨ãã¦æ±ãã¾ãããå®éã«é åã¨ãªãã®ã¯å¤æ°ptrã§ããptrã¯ãµã¤ãºã1ã®é åã¨ãã¦å®£è¨ããã¦ãã¾ãããã¡ã¢ãªã確ä¿ããã¨ãã«net_genericæ§é ä½ã®ãµã¤ãºï¼(sizeof(void *) * ãã¼ã¿æ°)ã®ããã«ã¡ã¢ãªã確ä¿ãã6çªç®ã®ãã¼ã¿ã«ã¢ã¯ã»ã¹ããéã¯ptr[5]ã®ããã«ã¢ã¯ã»ã¹ãã¾ããnet_genericæ§é ä½ã¯ãã®ååã示ãéãæ±ç¨ã®æ§é ä½ã§ããnetæ§é ä½ã使ç¨ããã¢ã¸ã¥ã¼ã«ããã©ã¤ãã¼ããªãã¼ã¿ãè¨å®ãã¦ä½¿ç¨ãããã¨ãã§ãã¾ããåå空éã®ä½ææã«è¦ç´ 13ã®é åã¨ãã¦ã¡ã¢ãªç¢ºä¿ãã¾ããã足ããªããªã£ãå ´åã¯æ°ãã«ã¡ã¢ãªã確ä¿ããæ¢åã®ãã¼ã¿ãã³ãã¼ãããã¦net->genã®ãã¤ã³ã¿ãæ°è¦ã«ã¡ã¢ãªç¢ºä¿ããå¤æ°ã«ç½®ãæãã¾ãã
å¤æ°å | 説æ |
---|---|
len | é åã®é·ã |
rcu | rcuã«ããããã¯ã®åå¾ã«ä½¿ç¨ |
ptr | å®éã®ãã¼ã¿ãæ ¼ç´ããé å |
表net_genericæ§é ä½
Netåå空éã®ç®¡ç
Netåå空éãä½æããå ´åãä½æããåå空éã®ãã¼ã¿ã¯net_namespace_listã¨ãããªã¹ãã«ç»é²ãã¾ãããã®ãªã¹ãã¯æ¬¡ç¯ã§èª¬æããã³ã³ã¹ãã©ã¯ã¿ããã¹ãã©ã¯ã¿ãå®è¡ããéãªã©ãå ¨ã¦ã®Netåå空éã«å¯¾ãã¦å¦çãè¡ãå ´åã«ä½¿ç¨ãã¾ããnet_namespace_listã¸ã®ç»é²ã«ã¯netæ§é ä½ã®ã¡ã³ãå¤æ°listã使ç¨ãã¾ãã
ãããã¯ã¼ã¯æ©è½ã®ã³ã³ã¹ãã©ã¯ã¿ã»ãã¹ãã©ã¯ã¿
ãããã¯ã¼ã¯ããã¤ã¹ããããã³ã«ããããã¯ã¼ã¯æ©è½ã®ã¢ã¸ã¥ã¼ã«ã¯Netåå空éã®åæåã»çµäºæã«å¼ã°ããã³ã³ã¹ãã©ã¯ã¿ã»ãã¹ãã©ã¯ã¿ãè¨å®ãããã¨ãã§ãã¾ããè¨å®ã«ã¯pernet_operationsæ§é ä½ã使ç¨ãã¾ããpernet_operationsæ§é ä½ã®å 容ã表_pernet_operationsã«ç¤ºãã¾ãã
å¤æ°å | 説æ |
---|---|
list | linked list |
init | ã³ã³ã¹ãã©ã¯ã¿ |
exit | ãã¹ãã©ã¯ã¿ |
net_exit_list | ãã¹ãã©ã¯ã¿ |
id | id |
size | size |
表_pernet_operations
ãã®æ§é ä½ãã¡ãidãsizeãªã©ã¯è¨å®ããªãã¦ãåé¡ããã¾ãããä¾ãã°ãIPv4ã®TCPã§ã¯initã¨exitã®ã¿ã使ç¨ããã¾ãããã®æ§é ä½ã¯åã¢ã¸ã¥ã¼ã«ããregister_pernet_deviceé¢æ°ãããã¯register_pernet_subsysé¢æ°ã«ããç»é²ãè¡ãã¾ãããããã®å ´åãpernet_listã¨ãããªã³ã¯ãªã¹ãã«ç»é²ãã¾ããç»é²æã«ã¯ãªã³ã¯ãªã¹ãã¸ã®ç»é²ã¨ãinité¢æ°ãè¨å®ããã¦ããå ´åã¯ãä½æããã¦ããå ¨ã¦ã®Netåå空éã«å¯¾ãã¦inité¢æ°ãå®è¡ãã¾ãã
ã°ãã¼ãã«ãªNetåå空éã®è¨å®
ã°ãã¼ãã«ãªåå空é(init_nsproxy)ã«è¨å®ããNetåå空éã®ãã¼ã¿(init_net)ã¯ãã³ã³ãã¤ã«æã«ã¯åæ¹åãªã³ã¯ãªã¹ãã®åæåããè¡ããã¾ããããã®ãããå種ã®åæåã¯ã«ã¼ãã«ã®èµ·åæã«net_init_inité¢æ°ã«ã¦è¡ããã¾ãããã®åæåå¦çã§ã¯Netåå空éã®çµäºæã«ä½¿ç¨ãããã¼ã¿ã¯ãªã¼ã³ã¢ããç¨ã®ãªã¹ãã®åæåãnetæ§é ä½ã®ã¡ã¢ãªç¢ºä¿æã«ä½¿ç¨ããSLABãã£ãã·ã¥ã®ä½æãnet_genricæ§é ä½ã®åæåãªã©ãè¡ãã¾ããã¾ããNetåå空éã®åæåã¨çµäºæã«å¼ã°ããã³ã³ã¹ãã©ã¯ã¿ã»ãã¹ãã©ã¯ã¿ãç»é²ãã¾ããã³ã³ã¹ãã©ã¯ã¿ã§ã¯Netåå空éãæä½ããããã®proc_ns_operationsæ§é ä½ã®è¨å®ã¨ã/proc/ï¼pidï¼/ns/netã«å²ãå½ã¦ãinodeã®è¨å®ãè¡ãã¾ãããã¹ãã©ã¯ã¿ã§ã¯ã³ã³ã¹ãã©ã¯ã¿ã§è¨å®ããinodeã解æ¾ãã¾ãã
Netåå空éã®ä½æã¨åé¢
Netåå空éã®ä½æã¯copy_net_nsé¢æ°ã«ã¦è¡ãã¾ããä½æå¦çã§ã¯æåã«netæ§é ä½ã¨net->genå¤æ°ã®ã¡ã¢ãªç¢ºä¿ãè¡ãã¾ããnet->genã¯net_genricæ§é ä½ã§ããåç §ã«ã¦ã³ã¿ã®è¨å®ãã¦ã¼ã¶åå空éã®è¨å®ãè¡ã£ãããç¾å¨ä½æä¸ã®Netåå空éã«å¯¾ãã¦pernet_listã«è¨å®ããã¦ããã¢ã¸ã¥ã¼ã«ã®inité¢æ°ãå®è¡ãã¾ããæå¾ã«ä½æããNetåå空éãnet_namespace_listã«ç»é²ãã¾ãã Netåå空éãåé¢ããå ´åã¯ãæ°ãã«Netåå空éãä½æãããããå¦çã¨ãã¦ã¯ä½ææã¨åæ§ã«ãªãã¾ãã
Netåå空éã®ç§»å
Netåå空éã®ç§»åã§ã¯Netåå空éç¬ç¹ã®å¦çã¯ããã¾ãããç¾å¨ã®ã¹ã¬ããã®nsproxyã«è¨å®ããã¦ããNetåå空éã®åç §ãæ¸ããã移åå ã®Netåå空éã®netæ§é ä½ãnsproxyæ§é ä½ã®net_nsã«è¨å®ãã¾ãã
PIDåå空é
PIDã¯åå空éã¯PIDã管çãã¾ããããã»ã¹IDã®ç®¡çãåé¢ããç¬ç«ããããã¨ã§ã³ã³ãããå¥ã®ãµã¼ãã«ç§»è¡ãã¦ããã³ã³ããå ã§åä½ãã¦ããããã»ã¹ã®PIDã«ã¯å½±é¿ãç½®ãã¾ããããããPIDåå空éã使ç¨ããªãå ´åãã³ã³ããå ã®PID 23414ãå¥ã®ãµã¼ãã«ç§»è¡ããæã«åãPIDã使ç¨ããã¦ãããå¥ã®PIDãæ¯ãç´ãå¿ è¦ãããã¾ããããããLinuxã«ã¯PIDãå¤æ´ããæ©è½ã¯ããã¾ããã®ã§ãããã»ã¹ãçµäºããå度起åãããªãã¦ã¯ãªãã¾ãããPIDåå空éãåé¢ããããã¨ã§ãã®ãããªåé¡ã解決ãããã¨ãã§ãã¾ããããããããã»ã¹ã®æ å ±ã¯/procã«ã¨ã¯ã¹ãã¼ãããããããPIDåå空éãåé¢ããå ´åã/procãé©åã«åé¢ãè¡ããªãã¨æ£ããåä½ã§ãã¾ãããPIDåå空éã®åé¢ã¯ãåé¢åã®PIDåå空éã親ã¨ãã¦é層æ§é ãä½æãã¾ãããã®é層æ§é ã¯init_taskã®PIDåå空éãèµ·ç¹ã¨ãã¦32段éã¾ã§ã¨å¶éããã¦ãã¾ãã
PIDåå空éã®å®è£
PIDåå空éã¯pid_namespaceæ§é ä½ã«ã¦ç®¡çããã¦ãã¾ãã
å¤æ°å | 説æ |
---|---|
kref | ãªãã¡ã¬ã³ã¹ã«ã¦ã³ã¿ |
pidmap | PIDã管çãããããããã |
rcu | pidæ§é ä½ã®ãã㯠|
last_pid | æå¾ã«ä½¿ç¨ããPID |
nr_hashed | PIDæ§é ä½ã管çããããã·ã¥ãã¼ãã«ã®ãã¼ã¿æ° |
child_reaper | ã¾ã³ãããã»ã¹ãååããããã®ããã»ã¹ãinit_taskãè¨å®ãã |
pid_cachep | pidæ§é ä½ã®ã¹ã©ããã£ãã·ã¥ |
level | PIDåå空éã®é層 |
parent | 親ã®PIDåå空é |
proc_mnt | procãã¡ã¤ã«ã·ã¹ãã |
proc_self | procãã¡ã¤ã«ã·ã¹ãã ã®selfãã¡ã¤ã« |
bacct | BSDããã»ã¹ã¢ã«ã¦ã³ãã£ã³ã°æ å ± |
user_ns | ãã®åå空éãæå±ããUseråå空é |
pid_gid | procãã¡ã¤ã«ã·ã¹ãã ã«ã¢ã¯ã»ã¹ããéã«å©ç¨ãããgid |
hide_pid | procãã¡ã¤ã«ã·ã¹ãã ã®ãã¦ã³ããªãã·ã§ã³ã®hidepid |
reboot | PIDåå空éããªãã¼ãããã¨ãã®exitã³ã¼ã |
ns | ns_commonæ§é ä½ |
表_pid_namespaceæ§é ä½
PID1ã«è¨å®ãããPIDåå空éã¯å³_init_pid_nsã®ããã«ãªãã¾ããinit_pid_nsã¯PID1ã«è¨å®ãããã®ã§ã以éã®ããã»ã¹ã¯ãã®PIDåå空éãå ±æããããã¯ãã®PIDåå空éã親ã¨ããé層æ§é ä¸ã«ããPIDåå空éã«æå±ãã¾ãã
struct pid_namespace init_pid_ns = { .kref = { .refcount = ATOMIC_INIT(2), }, .pidmap = { [ 0 ... PIDMAP_ENTRIES-1] = { ATOMIC_INIT(BITS_PER_PAGE), NULL } }, .last_pid = 0, .nr_hashed = PIDNS_HASH_ADDING, .level = 0, .child_reaper = &init_task, .user_ns = &init_user_ns, .ns.inum = PROC_PID_INIT_INO, #ifdef CONFIG_PID_NS .ns.ops = &pidns_operations, #endif };
å³_init_pid_ns
PIDåå空éã®ä½æ
cloneã·ã¹ãã ã³ã¼ã«ãunshareã·ã¹ãã ã³ã¼ã«ã§CLONE_NEWPIDãæå®ãããå ´åã¯æ°ãã«PIDåå空éãä½æãã¾ããPIDåå空éã¯create_pid_namespaceé¢æ°ã«ã¦ä½æãã¾ãã PIDåå空éã®ä½æã§ã¯æåã«é層æ°ã®ãã§ãã¯ãè¡ãã¾ããé層æ°ãMAX_PID_NS_LEVELãè¶
ããå ´åã¯ã¨ã©ã¼ã¨ãªãã¾ããLinuxã«ã¼ãã«v4.1ã§ã¯MAX_PID_NS_LEVELã¯32ã¨ãªãã¾ããåå空éã®åæåå¦çã§ã¯PIDããããããé åã®ã¡ã¢ãªç¢ºä¿ãPIDæ§é ä½ã®ã¡ã¢ãªã確ä¿ããããã®SLABãã£ãã·ã¥ä½æãªã©ã¡ã¢ãªç®¡çã«é¢ããåæåãã/proc/
PIDåå空éã®ç§»å
setnsã·ã¹ãã ã³ã¼ã«å®è¡æã«ã¯æ¢åã®PIDåå空éããå¥ã®åå空éã«æå±ãå¤æ´ãããã¨ãã§ãã¾ãããã ããå¶éã¨ãã¦ç§»åå¯è½ãªPIDåå空éã¯ç¾å¨ã¨åãåå空éããããã¯ç¾å¨ã®PIDåå空éã®é ä¸ã«ããåå空éã«ãªãã¾ããèªPIDåå空éã®ä¸ä½ã«ããåå空éã«ã¯ç§»åã§ãã¾ãããããã«ãããåå空éã®ç§»åã«ããç¾å¨æå±ãã¦ããåå空éããæãã¦ãã¾ããã¨ãé²ãã§ãã¾ãããã®ãã§ãã¯æ¹æ³ã¨ãã¦ã¯ãpid_namespaceæ§é ä½ã®levelå¤æ°ãè¦ã¦ãèªèº«ã®åå空éãããä¸ä½ã«ç§»åã§ã§ããªããã¨ãå³PIDåå空éã®ç§»åã«ããã¦ãNamespace Dã«æå±ããããã»ã¹ã¯Namespace Bã«ç§»åã§ãã¾ãããã¾ãã移åå ã®åå空éã®parentå¤æ°ã辿ã£ã¦ãç¾å¨ã®åå空éã«ãã©ãçãããã¨ã¨ç¢ºèªãã¾ããå³PIDåå空éã®ç§»åã§ã¯Namespace Dã«æå±ããããã»ã¹ã¯Namespace Cã¸ã®ç§»åã¯ã§ãã¾ãããå¾è ã®ãã§ãã¯ã¯èªèº«ã®åå空éã¨ç¡é¢ä¿ãªåå空éã«ç§»åã§ããªãããã«ããããã«è¡ãã¾ããèªåå空éé ä¸ã«ããåå空éã¯ãç¾å¨ã®åå空éã®ç®¡çä¸ã«ãããã移åãå¯è½ã¨ãªã£ã¦ãã¾ããç¾å¨æå±ãã¦ããåå空éã®åç §æ°ã移åå åå空éã®åç §æ°ã®æ´æ°ã¯ä»ã®åå空éã¨åæ§ã«è¡ãã¾ãã
Namespace A |-----------|-----------| | | Namespace B Namespace C | Namespace D
å³_PIDåå空éã®ç§»å
PIDåå空éã®åé¤ã¨ããã»ã¹ã®çµäº
ããPIDåå空éã«ã¦PID 1ã®ããã»ã¹ãçµäºããå ´åã¯ãããã»ã¹ã®çµäºå¦çã®ä¸ã§å¯¾è±¡ã®åå空éã«æå±ããããã»ã¹ãå ¨ã¦çµäºããã¾ãããã®çµäºå¦çã§ã¯ã¾ãããã以ä¸ã®ããã»ã¹ãçæãããªãããã«PIDã®æ°è¦çºè¡ãã¹ããããã¾ããããã¦ãSIGCHALDã«ããã·ã°ãã«ãç¡è¦ããããã«è¨å®ããPIDåå空éã管çãã¦ããPIDã®ãããããããé ã«èª¿ã¹ãªããæå¹ãªPIDã«å¯¾ãã¦SIGKILLãéä¿¡ãã¦ããã¾ãããã®ããã«ãã¦å ¨ã¦ã®ããã»ã¹ãçµäºããã¾ãããSIGCHLDãç¡è¦ãã¦ããéã«ã¾ã³ãç¶æ ï¼EXIT_ZOMBIEï¼ã«ãªã£ãããã»ã¹ãããããããã¾ããããã®ããããããã®ããã»ã¹ãååããããã«wait4(2)ãã«ã¼ãã«ããå¼ã³åºããEXIT_ZOMBIEç¶æ ã®ããã»ã¹ãååãã¾ãããã ããEXIT_DEADç¶æ ã®ããã»ã¹ã«ã¤ãã¦ã¯wait4(2)ã«ã¦ååã§ãã¾ãããããããã°ãã¼ãã«ãªPIDåå空é(init_pid_nsã®åå空é)ã®initããã»ã¹ã§ååå¯è½ãªããç¹å¥ãªå¦çã¯è¡ãã¾ããã次ã«ã«ã¬ã³ãããã»ã¹ã®ç¶æ ãã·ã°ãã«å²ãè¾¼ã¿ç¦æ¢ï¼TASK_UNINTERRUPTIBLEï¼ã«ãã¾ããããã¦nr_hashedã®æ°ã1ãããã¯2ã«ãªãã¾ã§scheduleé¢æ°ãå¼ã³åºãã¾ããããã«ãããPIDåå空éå ã®ããã»ã¹ã«å¯¾ãã親ããã»ã¹ã®å¤æ´ãè¡ãã¾ããnr_hashedã®å¤ã¨ãã¦1ã¾ãã¯2ã©ã¡ãã使ããã¯ã«ã¬ã³ãããã»ã¹ãã¹ã¬ããã°ã«ã¼ããªã¼ãã¼ãã©ããã«ããã¾ããããã»ã¹ãã¹ã¬ããã°ã«ã¼ããªã¼ãã¼ã®å ´åã¯1ãéãå ´åã¯2ã¨ãªãã¾ããPIDã®è§£æ¾å¦çï¼free_pidé¢æ°ï¼ã«ããnr_hashedã®æ°ãçµäºæ¡ä»¶ã«éãããã«ã¬ã³ãããã»ã¹ã®ç¶æ ãTASK_RUNNINGã«å¤æ´ãã¾ããæå¾ã«BSDããã»ã¹ã¢ã«ã¦ã³ãã£ã³ã°æ å ±ãæ¶å»ãã¾ãã
forké¢æ°/cloneé¢æ°å®è¡æã®åPIDåå空éã¸ã®pidçªå·çºè¡
ããã»ã¹ã®çææã«ã¯pidãçºè¡ãã¾ãããforké¢æ°ãå®è¡ããããã»ã¹ãæå±ããPIDåå空éå ¨ã¦ã§pidçªå·ãçºè¡ããå¿ è¦ãããã¾ãããã®ãããpidçªå·ã®çºè¡ãè¡ãalloc_pidé¢æ°ã§ã¯ãç¾å¨ã®PIDåå空éããé層ãä¸ãã£ã¦è¡ããåPIDåå空éã«ã¦pidçªå·ã®çºè¡ãè¡ãã¾ããã¾ããtask_structæ§é ä½ã«ã¯pidå¤æ°ããããããã»ã¹ã«å²ãå½ã¦ãããpidçªå·ãè¨å®ãã¾ãããããã§è¨å®ããpidçªå·ã¯ããã»ã¹ãæå±ããPIDåå空éã®pidçªå·ã¨ãªãã¾ããä¾ã¨ãã¦ãããã©ã«ãã®PIDåå空éããåé¢ããããã»ã¹å ã§forké¢æ°ãè¡ããpidçªå·ã«144ãæ¯ãããå ´åããã®ããã»ã¹ã®task_structæ§é ä½ã®pidå¤æ°ã«è¨å®ãããã®ã¯144ã¨ãªãã¾ãã
Useråå空é
Useråå空éã¯UIDãGIDããã¹ãã¨ã³ã³ããã§åé¢ãã¾ããããæ£ç¢ºã«ã¯ãã¹ãã®UIDã¨ã³ã³ããã®UIDããããã³ã°ããã¾ãããã®ãããã³ã°ã«ãããä¾ãã°ãã³ã³ããã§ã®UID 0ããã¹ãã®UID 1000ã«ãããã³ã°ãããã¨ã§ãã³ã³ããå ã§ã¯root権éã使ç¨ãããã¨ãã§ãã¾ããããã¹ãããè¦ãã¨ã³ã³ããå ã®rootã¦ã¼ã¶ã¯UID 1000ã§ãã®ã§ããã¹ãã«å¯¾ãã¦å¤§ããªå½±é¿ãåã¼ãæä½ãå¶éãããã¨ãã§ãã¾ãããã®ä¾ã®å ´åãã³ã³ããå ã®rootã¦ã¼ã¶ãä½æãããã¡ã¤ã«ã¯ãã¹ãã§ã¯UID 1000çªã®ã¦ã¼ã¶ãä½æããã¨èªèããã¾ãã Useråå空éã®åé¢æã«æ示çã«UIDã¨GIDã®ãããã³ã°ãè¡ããªãã£ãå ´åã¯UIDãGIDå ±ã«65534çªã«ãããã³ã°ããã¾ããIDãããã³ã°ã¯åé¢å ã®UIDã»GIDã¨åé¢å¾ã®UIDã»GIDã§ãããã³ã°ãè¡ãã¾ãããã£ã¦ãUseråå空éãPIDåå空éã¨åæ§ã«åé¢å ã¨åé¢å¾ã®åå空éã§è¦ªåé¢ä¿ã«ãªãã¾ãã
Useråå空éã®å®è£
å¤æ°å | 説æ |
---|---|
uid_map | uidã®ãããã³ã° |
uid_map | gidã®ãããã³ã° |
projid_map | ããã¸ã§ã¯ãèå¥åã®ãããã³ã° |
count | åå空éã®åç §æ° |
parent | 親ã®åå空é |
level | ã¦ã¼ã¶ã¼åå空éã®éå±¤æ° |
owner | ããã»ã¹ã®euid |
group | ããã»ã¹ã®egid |
ns | ns_commonæ§é ä½ |
flags | setgroups(2)ã®å®è¡å¯å¦ãè¨å® |
表_user_namespace
Useråå空éã®ä½æ
Useråå空éã®ä½ææã¯æåã«credæ§é ä½ãåæåãã¾ããæ°è¦ã«user_namespaceæ§é ä½ãä½æãã¾ããæ§é ä½ã®åæåã§ã¯procfsã«ã¨ã¯ã¹ãã¼ããããã¡ã¤ã«ã®inodeãªã©ã®è¨å®ãªã©ãæ°ããåå空éã®è¨å®ãè¡ãã¾ããUseråå空éã¯æ大ã§32段éã®é層ãä½ããã¨ãã§ãããããåå空éã®ä½æã«ãã32段é以ä¸ããå ´åã¯ã¨ã©ã¼ã¨ãã¾ããã¾ããchrootç°å¢ã§å®è¡ãããå ´åãã¨ã©ã¼ã¨ãªãã¾ãã次ã«ãç¾å¨ã®Useråå空éã¨ä½æä¸ã®åå空éã«ããã¦ãuidã¨gidã®ãããã³ã°ãè¡ããã¦ããããã§ãã¯ãè¡ãã¾ããã¦ã¼ã¶åå空éã®ã¡ã¢ãªã確ä¿ãã/proc/
Useråå空éã®ç§»å
Useråå空éã¯NSProxyã管çãã¦ããªãããå¦çãå¤å°å¤ããã¾ãã移åå ã¨ç¾å¨ã®åå空éãåããªå ´åã¯ã¨ã©ã¼ã¨ãªãã¾ãããã«ãã¹ã¬ããã®ããã°ã©ã ã«ããã¦ãããã¹ã¬ãããåå空éã®ç§»åãè¡ããã¨ããå ´åãã¨ã©ã¼ã¨ãªãã¾ããããã«ãã£ã¦ããããã»ã¹ãã¹ã¬ããã«æ¯ã«éãåå空éã«æå±ããã®ãé²ãã§ãã¾ããããã»ã¹ããã¡ã¤ã«ã·ã¹ãã æ å ±ãåããã»ã¹ã¨å ±æãã¦ããå ´åãã¨ã©ã¼ã¨ãªãã¾ãã移åå ã®åå空éã§CAP_SYS_ADMINã±ã¼ãããªãã£ãæã£ã¦ããå¿ è¦ããã¾ãããããã®ãã§ãã¯ã§åé¡ããªããã°åå空éã®ç§»åå¦çãè¡ããã¨ãã§ãã¾ããprepare_credsé¢æ°ã«ã¦æ°ããcredæ§é ä½ãä½æããã®å¾ãç¾å¨ã®åå空éã®åç §æ°ãæ¸ããã¾ãã次ã«ç§»åå ã®åå空éã®åç §æ°ãå¢ããã¾ããããã¦ãset_cred_user_nsé¢æ°ã§credæ§é ä½ã®user_nså¤æ°ã移åå ã®åå空éã«è¨å®ãã¾ããæå¾ã«ç¾å¨ã®task_structã«è¨å®ããã¦ããcredæ§é ä½ãæ°ããä½æããcredæ§é ä½ã«å¤æ´ããå¦çãå®äºãã¾ãã
ã«ã¼ã¿ã¼èªä½ã§ããããã±ããã®æµã
- ä½è : å°ä¿£ãå ä¹
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2011/07/09
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 4人 ã¯ãªãã¯: 130å
- ãã®ååãå«ãããã° (12件) ãè¦ã
*1:9)ãã(13