ãã®èšäºã«ã€ããŠ
Habréã§æ°åã圌ãã¯SMM-ãã€ããŒãã€ã¶ãŒã¢ãŒããããå€ãã®ç¹æš©ãæã€x86 / 64ããã»ããµã¢ãŒãã«ã€ããŠèšåããŸããã ããã»ããµã¢ãŒããã¯ãã£ARMv7ããã³ARMv8ã«ãåæ§ã®ããšãååšããŸãã ãããã®ã¢ãŒããã¯ãã£ã®ã³ã³ãã¥ãŒãã£ã³ã°ã³ã¢ã«ã¯ãARMã»ãã¥ãªãã£æ¡åŒµæ©èœãšåŒã°ãããªãã·ã§ã³ã®æ¡åŒµæ©èœããããŸããããã«ãããå®è¡å¯èœã³ãŒããã¡ã¢ãªãããã³åšèŸºæ©åšã2ã€ã®ãã¡ã€ã³ïŒä¿¡é Œã§ãããã®ãšä¿¡é Œã§ããªããã®ïŒã«åããããšãã§ããŸãã ãã®ãã¯ãããžãŒã®æ£åŒãªããŒã±ãã£ã³ã°åã¯ARM TrustZoneã§ãã ããããæè¡è ã¯ã»ãã¥ãªãã£æ¡åŒµã«ã€ããŠè©±ãå¯èœæ§ãé«ããªããŸãã
ããã¯ã¬ãã¥ãŒèšäºã«ãªããŸãã®ã§ãç§ã¯éå±ãªæè¡çãªèéã«ã¯è¡ããŸããã ãã ããæè¡çãªè©³çŽ°ã¯æ瀺ãããŸãã èšäºã®æåã®éšåã¯ããªãããããã¹ãŠå¿ èŠãªã®ããšãã質åã«å°å¿µãã2çªç®ã®éšåã¯ãäžè¬çã«ã©ã®ããã«æ©èœããã®ãã説æããŸãã äŒç€Ÿãèå³ãæã€ããã«ãªã£ãå Žåã次ã®èšäºã«ã¯æè¡çãªè©³çŽ°ãå«ãŸããŸãã 誰ãæ°ã«ããŸã-ç«ãžããããã
ARMã»ãã¥ãªãã£æ¡åŒµæ©èœãå¿ èŠãªçç±
ååã«ã¯ãã»ãã¥ãªãã£ããšããåèªãå«ãŸããŠããŸããããããã®æ¡åŒµæ©èœã¯ãéåžžã®æå³ã§ã»ãã¥ãªãã£é¢é£ã®æ©èœãå®è£ ããããã ãã«å¿ èŠãªããã§ã¯ãããŸããã ãã»ãã¥ãªãã£ããšèšããšããéåžžã¯æå·åãã¢ã¯ã»ã¹å¶éã TPM ãå®å šãªä¿ç®¡åº«ãªã©ãèããŸãã ã»ãã¥ãªãã£æ¡åŒµæ©èœã䜿çšãããšããããã®ãã¹ãŠã®æ©èœãå®è£ ã§ããŸãããããã»ããµã³ã¢ã®èµ·åãšåæ¢ãã·ã¹ãã ã®åèµ·åãªã©ã«ã䜿çšãããŸãã
ãŸã£ããã»ãã¥ãªãã£æ©èœã§ã¯ãªã
ç§ãã¡ã¯çãBIOSïŒãããŠä»ã¯EFIïŒã®ãããªãã®ãããããšãç¥ã£ãŠããŸãã ãããã®ã¿ã¹ã¯ã¯ãã·ã¹ãã ã®åæåãOSã®ããŒããã·ã¹ãã ã«é¢ããOSæ å ±ã®æäŸãOSã«ããã³ã³ãã¥ãŒã¿ãŒã®ç®¡çãæ¯æŽããããšã§ãã
æŽå²çã«ãARMããŒã¹ã®ãã©ãããã©ãŒã ã«ã¯ãBIOSã®é¡äŒŒç©ã¯ãããŸããïŒãŸãã¯ããã§ã¯ãããŸããã§ããïŒã éåžžãROMã³ãŒãã«ã¯ãå®å šãªããŒãããŒããŒãèŠã€ããŠããŒãããç°¡åãªããŒãããŒããŒããããŸããã å€ãã®å Žåããã®ãããªå®å šãªããŒãããŒããŒã¯u-bootã§ãã U-bootã¯ãæå°éã®åšèŸºæ©åšãèµ·åãïŒããšãã°ãDRAMã³ã³ãããŒã©ãŒãèµ·åïŒãLinuxã«ãŒãã«ãæ€åºããŠèµ·åããŸããã Linuxã«ãŒãã«ã¯ãu-bootãäžèŠã«ãªã£ããããã¡ã¢ãªããå®å šã«æ¶å»ã§ããŸããã ãããŠãã«ãŒãã«ãããŒãããåŸã¯ããã¹ãŠãå®å šã«ãã®ãŸãŸã«ãªããŸããã ãã®äžã«çŽæ¥ïŒãŸãã¯ãããã€ã¹ããªãŒãšåŒã°ããç¹å¥ãªæ§é ã§ïŒåäœããã·ã¹ãã ã«é¢ãããã¹ãŠã®æ å ±ãçž«ãä»ããããŸããã ã·ã¹ãã ãå¶åŸ¡ãããã¹ãŠã®æäœïŒããšãã°ãããã»ããµã®ãªãŒããŒã¯ããã¯ïŒã¯ãã«ãŒãã«èªäœãå®è¡ããå¿ èŠããããŸããã
ããã¯ãããŸããŸãªçç±ã§äžäŸ¿ã§ããã ããšãã°ãã¡ãŒã«ãŒã¯ããã£ãã·ã¥ããã¹ãªã©ãããããçš®é¡ã®ãããªã±ãŒããªãã¢ãžã¥ãŒã«ãã«ãŒãã«éçºè ã«å¶åŸ¡ãããããããŸããã ãŸãã¯ãããšãã°ãããããªã»ããæé ã§ã¯ãã«ãŒãã«ã³ãŒãããå®è¡ããã«ã¯äžäŸ¿ãªããã€ãã®ããªãããŒãªæäœãå¿ èŠã§ãã
ã€ãŸããBIOSã®ãããªãã®ãå¿ èŠã§ãã ARMã·ã¹ãã ã§ã®ã¿Secure MonitorãåŒã³åºããSecurity Extensionsã®ãããã§æ©èœããŸãã ç§ã®çµéšã§ã¯ããã«ãããã»ããµã·ã¹ãã ã®è¿œå ã³ã¢ã®èµ·åãšåæ¢ããã¹ã®å¶åŸ¡ãbig.LITTLEã¢ãŒããã¯ãã£ã®åŒ·åãªã³ã¢ãšåŒ±ãã³ã¢éã®å®è¡ã³ãŒãã®è»¢éããã€ããŒãã€ã¶ãŒã¢ãŒãã®ã¢ã¯ãã£ãåãªã©ã®ããªã±ãŒããªãã®ã«æããã䜿çšãããŸãã
ã»ãã¥ãªãã£æ©èœ
ã»ãã¥ãªãã£æ¡åŒµæ©èœã䜿çšãããšãç¬èªã®ã«ãŒãã«ãââãã³ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ã§å¥ã®OSãåŽããå®è¡ã§ããŸãã éåžžããã©ã¹ãããOSãšåŒã°ããŸãã ãã®OSã«ã¯ãç¬èªã®å®å šãªã¡ã¢ãªãšãæå·åã¢ã¯ã»ã©ã¬ãŒã¿ãªã©ã®å®å šãªåšèŸºæ©åšãžã®ã¢ã¯ã»ã¹ããããŸãã ãã®ãããªOSã®2ã€ã®äŸã¯ãGoogle TrustyãšãªãŒãã³ãœãŒã¹ã®OP-TEEã§ãã Global Platformã®ã³ã³ãœãŒã·ã¢ã ãããã Trusted Execution EnvironmentãšåŒã°ãããã®ãããªOSã®äžè¬çãªèŠä»¶ãéçºããŠããŸãã
ããšãã°ãGoogleã¯OSã䜿çšããŠããŒãå®å šã«ä¿åããŸãïŒAndroidãµãŒãã¹ããŒãã¹ã¿ãŒ ïŒã ã¢ãããŒã©ã¯ãåœæDRMã«ã»ãã¥ã¢ãªOSã®ç¬èªã®å®è£ ã䜿çšããŠããŸãã ã äžè¬ã«çŽ æŽãããã·ã¹ãã ããããŸããããŠãŒã¶ãŒã¯DRMãããªãä¿åããã³åçã§ããAndroidã«ãŒãã«ã§ãããéå§çž®ïŒãŸãã¯å°ãªããšã埩å·åãããïŒãããªãã¬ãŒã ãä¿åãããŠããã¡ã¢ãªã«ã¢ã¯ã»ã¹ã§ããŸããã§ããã ãããåæã«ãAndroidã¯ãã®ãããªãããªã®äžã«ã³ã³ãããŒã«ãæç»ããããšãã§ããŸãã
ã«ã¹ã¿ã ã¢ããªã±ãŒã·ã§ã³ïŒèªç¶ã«çœ²åãããïŒãå®å šãªOSã«ããŠã³ããŒãã§ããŸãã ããã«ãããããšãã°ãNFCãŸãã¯ä»®æ³SIMã«ãŒããä»ããæ¯æãçšã®éè¡æ¥åã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ããŸãã æ£çŽãªãšãããå®éã«ã¯ãç§ã¯ãŸã ãã®ãããªããšã«ééããŠããŸããã
ã»ãã¥ã¢ãªæ¡åŒµæ©èœã«ãããã»ãã¥ã¢ããŒããæŽçããããšãã§ããŸããä¿¡é Œã®ã«ãŒãã¯ã次ã®ããŒãããŒããŒã®çœ²åãæ€èšŒããROMã³ãŒãã§ãããããŒãããŒããŒã¯ã»ãã¥ã¢ã¢ãã¿ãŒã«é£çµ¡ããããšã§ã«ãŒãã«çœ²åãæ€èšŒã§ããŸãã ã«ãŒãã«ã¯ãå®è¡å¯èœã³ãŒãã®çœ²åãæ€èšŒã§ããŸãã ãã®ãã¯ãããžãŒã¯è°è«ã®äœå°ããããŸãããAndroidããã€ã¹ã®äžéšã®éçºè ã¯ãããéåžžã«æ°ã«å ¥ã£ãŠããŸãã
ä»çµã¿
æè¡çãªè©³çŽ°ã«é¢ããæ å ±ã¯å ¬éãããŠããŸãã ARMãã¯ãã«ã«ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ãããŠã³ããŒãããŠããã¹ãŠãèªåã§èªãããšãã§ããŸãã ããã«ããããã¯ãŒã¯ã«ã¯ããããçš®é¡ã®çŸãããã¬ãŒã³ããŒã·ã§ã³ããããŸããã ç§ã¯æ·±ããžã£ã³ã°ã«ã«ã¯å ¥ãããäž»ãªã¢ã€ãã¢ã説æããã ãã§ãã ARMv7ã§æ¡çšãããŠããçšèªãšæ¯èŒããŠããäžè²«ããŠãããããARMv8ã®çšèªã䜿çšããŸãã
CPUã¢ãŒã
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãããã€ãã®æè¡çãªè©³çŽ°ãæäŸããŸãã ã·ã¹ãã ããã°ã©ãã³ã°ãéåžžã«æããããã¯ã§ããå Žåã¯ããã®ã»ã¯ã·ã§ã³ãã¹ãããã§ããŸãã
å®éã誰ããx86ã®ä¿è·ãªã³ã°ã«ã€ããŠèããããšãããã§ãããã ARMã«ã¯ãŸã£ããåããã®ããããããã§ã®ã¿äŸå€ã¬ãã«ïŒç¥ããŠELïŒãšåŒã°ããŸãã 2ã4ïŒãŸãã¯ãã«ãŠã³ãæ¹æ³ã«å¿ããŠ6ïŒãããŸãã ãããã¯ããã»ããµã¢ãŒãã§ãã äŸå€ã¬ãã«ãé«ãã»ã©ãããã§å®è¡ãããã³ãŒãã®ç¹æš©ã¯å€§ãããªããŸãã
ãã¹ãŠã®ARMv7ãŸãã¯ARMv8ã³ã¢ã¯ããããã®å°ãªããšã2ã€ãEL0ããã³EL1ããµããŒãããŸãã
EL0ã¯ããŠãŒã¶ãŒããã°ã©ã ïŒãã©ãŠã¶ãªã©ïŒãå®è¡ããŸãã EL0ã§å®è¡ãããã³ãŒãã«ã¯ç¹æš©ããããŸãããïŒéåžžïŒããªãã§ã©ã«ã§ã®åäœã MMUã®åæ§æãå²ã蟌ã¿ã®çŠæ¢ïŒããã³èš±å¯ïŒãããã³äŸå€çãªç¶æ³ã®åŠçã¯ã§ããŸããã ãããããã©ãŠã¶ã¯ãã®ãã¹ãŠãå¿ èŠãšããŸããã ãŸã å¿ èŠãªå Žåã¯ãOSã«ãŒãã«ã«ãããå°ããå¿ èŠããããŸãã
EL1ã§ã¯ãã«ãŒãã«ãšãã©ã€ããŒãæ©èœããŸãã ãããã£ãŠãåšèŸºæ©åšãæäœããããMMUãããã°ã©ã ãããããªã¹ãã®ããã«äžã«è¡ãæ©äŒããããŸãã 10幎åã§ãããã§ååã§ããã ããããæè¡ã¯éæ¢ããŠããŸããã
ããã»ããµã³ã¢ã«è¿œå ã®æ¡åŒµæ©èœïŒä»®æ³åæ¡åŒµæ©èœãšã»ãã¥ãªãã£æ¡åŒµæ©èœïŒãå«ãŸããŠããå Žåãããã«2ã€ã®ELã衚瀺ãããå ŽåããããŸãã ããã«ããããã®æ¡åŒµæ©èœã¯äž¡æ¹ãšããªãã·ã§ã³ã§ããïŒææ°ã®ãã¹ãŠã®ãããã«ååšããŸãïŒãããã»ããµã¯ã©ã¡ããäžæ¹ããŸãã¯äž¡æ¹ãåæã«æã€ããšãã§ããŸãã ARMãã¯ãã«ã«ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ã®å€§éšåã¯ããããã®æ¡åŒµæ©èœã®çžäºäœçšã«åœãŠãããŠããŸãã
ãã®ãããã«ãŒãã«ã«ä»®æ³åæ¡åŒµæ©èœãããå ŽåãEL2ã衚瀺ãããŸãã ãã€ããŒãã€ã¶ãŒã¯ãã®ã¬ãã«ã§æ©èœããŸãã ãŸããMMUã¯2ã¹ããŒãžã«ãªããä»®æ³å²ã蟌ã¿ã³ã³ãããŒã©ãŒã衚瀺ãããŸãã ããããããã¯å®å šã«ç°ãªãã¹ããŒãªãŒã§ãããåå¥ã«è©±ãããå¿ èŠããããŸãã
ããã»ããµã«ã»ãã¥ãªãã£æ¡åŒµæ©èœãããå ŽåãEL3ã¢ãŒããšS-EL0ããã³S-EL1ã¢ãŒãã衚瀺ãããŸãã ããã«ãã»ãã¥ã¢ã¢ãŒãïŒãããã£ãŠéã»ãã¥ã¢ã¢ãŒãïŒã®æŠå¿µã衚瀺ãããŸã-ãããã¯ããã»ããµã¢ãŒãã®çŽäº€äŸå€ã¬ãã«ã§ãã EL3ã«ã¯ãEL2ãšåãç¹æš©ã«å ããŠãå¥ã®æ©èœããããŸãã EL3ã¢ãŒãã§ã®ã¿ãããã»ããµãã»ãã¥ã¢ã¢ãŒããšéã»ãã¥ã¢ã¢ãŒãã®éã§ã³ãŒãåãæ¿ãã§ããŸãã ãããã®éãã¯äœã§ããïŒ ãããŠãéãã¯1ãããã®å€ã ãã§ã-NS ã
å®éã®ãšãããã»ãã¥ãªãã£æ¡åŒµæ©èœã¯ã³ã³ãã¥ãŒãã£ã³ã°ã³ã¢ã®æ¡åŒµæ©èœã ãã§ã¯ãããŸããã ãããã®æ¡åŒµã¯ãMMUãå²ã蟌ã¿ã³ã³ãããŒã©ãŒãããã³ãã¹ã³ã³ãããŒã©ãŒã«ã圱é¿ããŸãã ããšãã°ããã¹ã³ã³ãããŒã©ã¯ãã¡ã¢ãªãšåšèŸºæ©åšã«ã¢ã¯ã»ã¹ãããšãã«ãNSã®ãã®åããããã®å€ããã§ãã¯ããŸãã ã¡ã¢ãªã®å Žæãã»ãã¥ã¢ãšããŠããŒã¯ãããŠããå Žåããã®ã¡ã¢ãªãžã®ã¢ã¯ã»ã¹ã¯ã»ãã¥ã¢ã¢ãŒãããã®ã¿ååŸã§ããŸãã ããã¯ãéåžžã®OSã®ã³ã¢ããã€ããŒãã€ã¶ãŒããå®å šãªãã¡ã¢ãªã®èªã¿åã/å€æŽãã§ããªãããšãæå³ããŸãã åšèŸºãšåãããšã ã»ãã¥ã¢ãšããŒã¯ãããå²ã蟌ã¿ãå°çããå Žåããã®å²ã蟌ã¿ã¯éåžžã®OSã§ã¯ãªããã»ãã¥ã¢ã¢ãŒãã®ä¿¡é Œã§ããOSã«ãã£ãŠåŠçãããŸãã
éåžžã®äžçãšå®å šãªäžçã®2ã€ã®äžçãåãããã»ããµã«ååšããŠããããšãããããŸãïŒãããã¯å ¬åŒããã¥ã¡ã³ãã®çšèªã§ãïŒã å®å šãªäžçã¯éåžžã®äžçã®äºæã«ä»å ¥ããªããã°ãªããŸãããããã®éã¯ãããŸããã EL3ã¢ãŒãã§ã¯ãå®å šãªã¢ãã¿ãŒãæ©èœããŸããããã¯ãCharonã®äžçš®ãšããŠæ©èœããããäžçããå¥ã®äžçã«ç§»åã§ããŸãã
ããããæ¢ã«æšæž¬ããããã«ãS-EL0ããã³S-EL1ã¢ãŒãã¯éåžžã®äžçã®EL0ããã³EL1ã®é¡äŒŒç©ã§ãã S-EL1ã§ã¯ããå®å šãªãOSã®ã«ãŒãã«ãå®è¡ãããS-EL0ã§ã¯ãã¢ããªã±ãŒã·ã§ã³ïŒããšãã°ãåãä»®æ³SIMã«ãŒãïŒãå®è¡ãããŸãã äžã®å³ã§ã¯ãARMv7ã®çšèªã䜿çšãããŠããŸãããäœãäœã§ããããç解ããã®ã¯éåžžã«ç°¡åã§ãïŒé¡ã£ãŠããŸãïŒã
éåžžã®äžçãšå®å šãªäžçã®çžäºäœçš
ããã»ããµã¯åžžã«ã»ãã¥ã¢ã¢ãŒãã§èµ·åããŸãïŒããããªããšãããã»ããµã¯ããã«å°éããŸããïŒã ãã©ã¹ãããOSãããŒãããã³åæåãããåŸãããã»ããµãŒã¯éã»ãã¥ã¢ã¢ãŒãã«åãæ¿ãããéåžžã®OSãããŒãããŸãã
ãã¹ãŠã®æ©èœã«ã€ããŠãã»ãã¥ã¢ãªäžçã¯ã·ã¹ãã å ã§æ¯é çãªäœçœ®ãå ããå¿ èŠãããããã«æãããŸãã ããããå®éã«ã¯ãã®éã§ãã ã»ãšãã©ã®å Žåãéã¢ã¯ãã£ãã§ãã åŸæ¥ã®OSãäœããã®ãµãŒãã¹ãå¿ èŠãšããå Žåã«ã®ã¿ãã»ãã¥ã¢ãªäžçãžã®ã»ãã¥ã¢ãªã¢ãã¿ãŒãšã³ã³ãããŒã«è»¢éã«ã¢ã¯ã»ã¹ããŸãã ãããã£ãŠãå®å šãªäžçããã€æ©èœãããã決å®ããã®ã¯éåžžã®äžçã§ãã ããã¯ããŠãŒã¶ãŒãããã€ã¹ãæäœãããããããªãèŠèŽããããé³æ¥œãèŽãããããã®ã劚ããªãããã«ããããã§ãã çµå±ã®ãšãããã»ãã¥ã¢ã¯ãŒã«ããééã£ãã¿ã€ãã³ã°ã§å¶åŸ¡ãååŸãããšãéåžžã®ã¯ãŒã«ããæ··ä¹±ããå¯èœæ§ããããŸãã
å®éãå®å šãªäžçã«ã¯ãå²ã蟌ã¿ã䜿çšããŠéåžžã®äžçãè¿åããŠå¶åŸ¡ããèœåããããŸãã ããšãã°ãã»ãã¥ã¢ã¯ãŒã«ããå®æçã«åŒã³åºãã¿ã€ããŒãéå§ã§ããŸãã ããããããã¯éåžžãäžèšã®çç±ã§è¡ãããŸããã äœããããŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ã
Linuxã«ãŒãã«ã®å Žåãåè¿°ã®GlobalPlatform TEEä»æ§ã«åŸã£ãŠãéåžžã®ã¢ããªã±ãŒã·ã§ã³ãTrusted OSã§å®è¡ãããŠããã¢ããªã±ãŒã·ã§ã³ãšå¯Ÿè©±ã§ããããã«ãããããã®ã»ããããããŸãã ãããã£ãŠãéçºè ã¯ãäºææ§ã®ããä¿¡é Œã§ããOSã§ïŒããããªå€æŽãå ããŠïŒåäœã§ããã¢ããªã±ãŒã·ã§ã³ãäœæã§ããŸãã
åŠæ³ã³ãŒããŒ
å®å šãªäžçã¯ããªãããã©ããŒã§ããŸããïŒ çè«çã«ã¯ãã¯ãã å®éã«ã¯ããããã©ã€ãšã¿ãªãªä¿¡é Œã§ããOSã«ã¢ã¯ã»ã¹ãããŠãŒã¶ãŒã®ããã€ã¹ã«ã€ã³ã¹ããŒã«ããŸããã ç§ã¯ãã®ãããªé¢æ°ãã³ãŒãã«èŠãŸããã§ããã ãã¡ãããããã¯äœã®æå³ããããŸããã
ããã€ã¹ã§ã»ãã¥ã¢ããŒããã¢ã¯ãã£ãã«ãªã£ãŠããå Žåãåé¡ããããŸãã å®å šãªäžçã§å®è¡ãããŠããã³ãŒãã§ã¯äœãã§ããªããšããæå³ã§ã 確ãã«ãã«ãŒãã«ã¢ãŒãã§å®è¡ãããŠããã³ãŒãã§ã¯äœãã§ããŸããã
幞ããªããšã«ãã»ãã¥ã¢ããŒããæå¹ã«ããSoCã¯éåžžã«ãŸãã§ããã誰ã«ã販売ããªãããã«ããŠããŸãã ãã®ãããããããä¿¡é Œã§ããOSãèªåã®ãã®ã«çœ®ãæããæ©äŒããããŸãã 確ãã«ãã»ãšãã©äœãã§ããªãROMã³ãŒãããŸã ãããŸãã ãŸããã»ãã¥ã¢ã¢ãã¿ãROMã³ãŒãã«é ç·ãããŠããå Žåã¯ãåé¡ãåã³çºçããŸãã ãã ããã»ãã¥ã¢ã¢ãã¿ãŒãã€ã³ã¹ããŒã«ã§ããSoCããããŸãã ããšãã°ãã«ããµã¹RCAR H3ã ãããã£ãŠããã¹ãŠã倱ãããããã§ã¯ãããŸããã
è©ŠããŠã¿ãã人ã®ããã«-Trusted OSãRaspberry PIã«ã¢ããã°ã¬ãŒãããæ©äŒããããŸãã ãããè¡ãæ¹æ³ã¯ãOP-TEEã®ããã¥ã¡ã³ãã«èšèŒãããŠããŸãã