Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
すごいBareflank楽しく学ぼう!
Search
morimolymoly
November 11, 2018
Technology
1
140
すごいBareflank楽しく学ぼう!
ゆるふわ入門編
morimolymoly
November 11, 2018
Tweet
Share
More Decks by morimolymoly
See All by morimolymoly
AVTOKYO2022
morimolymoly
0
2.2k
Linuxの改造とパッチ
morimolymoly
0
2.8k
Porting Golang Runtime To Baremetal
morimolymoly
1
120
Other Decks in Technology
See All in Technology
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
210
Storage Browser for Amazon S3
miu_crescent
1
130
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
C++26 エラー性動作
faithandbrave
2
690
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
160
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
The Language of Interfaces
destraynor
154
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
The Pragmatic Product Professional
lauravandoore
32
6.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Bash Introduction
62gerente
608
210k
Why Our Code Smells
bkeepers
PRO
335
57k
A designer walks into a library…
pauljervisheath
204
24k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Transcript
͍͢͝Bareflankָ͠ ֶ͘΅͏ʂ @Dentoo.LT #21 @morimolymoly
͜Μʹͪ
ࢲ morimolymoly a.k.a. ήΩΧϫͶ͜ΈΈϝΠυ řŐŕŲƄ:morimolymoly.com আ ීஈͬͯΔ͜ͱ • ใηΩϡϦςΟ •
Hypervisor • Twitter • ΞΠΧπ@10߸ؗΞΠΧπࢹௌεϖʔε ࣮MMA෦һͳΜͰ͢Ͷʙʙʙʙ
আ
ͯ͞ɼ
͘͡ • Hypervisorͱʁ • Bareflankͬͯͳʹ • Ͱ͖Δ͜ͱ • ͭΒ͍͜ͱ •
ৄղ Bareflank’s ϏϧυγεςϜ(͕࣌ؒ͋Ε -> ͳͦ͞ ͏ͳͷͰϒϩάͰॻ͘)
ΏΔ;Θʹೖ͍ͯ͠ ͖·͢
Let’s get started!
Hypervisorͱ ԾϚγϯΛཧ͢ΔͨΊͷγεςϜ Type1 - Baremetal Type2 - Host ϋʔυΣΞ Hypervisor
VM VM VM ϋʔυΣΞ Hypervisor VM VM VM ήετOS • Xen • KVM • Hyper-V • Bitvisor • VirtualBox • Qemu • Bochs
Is Կ •Hypervisor։ൃϑϨʔϜϫʔΫ •Type-1,2͕ͭ͘ΕΔʂ •LinuxɼWIndowsɼUEFIʹରԠ •x86-64ରԠ •ถۭ܉ݚڀॴൃͷελʔτΞοϓ͕։ൃ •ϕΞϝλϧͳͷʹC++Ͱ͔͚Δʂ •ͱͱͷ࣮͕͘͢͝ബ͍(࣮͕Ѳ͍͢͠) •։ൃָ͕ʂ(։ൃָ͕ͱݴ͍ͬͯͳ͍)
ͦ͢͝͏(খฒײ)
͏Ε͍͜͠ͱ • ࣮͕ബ͍ͷͰίʔυϦʔσΟϯάָ • ԾԽؔͷߏମ͕·ͱ·ͬͯͯΑ͖ • ϏϧυγεςϜ͕CMakeͰ·Ε͍ͯͯΏΔ;Θ • ϞμϯͳC++Ͱॻ͚Δͷ͏Ε͍͠ͱࢥ͏ •
STL͕͔ͭ͑Δ • gitterͰ࣭͢Δͱ։ൃऀ͕͘͞͠ڭ͑ͯ͘ΕΔ •
ͭΒ͍͜ͱ • ബ͍ϑϨʔϜϫʔΫ -> ࣗͰ༻ҙ͠Ζ • υΩϡϝϯτ͕ແ(͋Δ͚Ͳݹ͍) -> ςετίʔυ͋Δ͍͍͠? ->
ίϯτϦϏϡʔγϣϯͷ νϟϯε? ଞͷHypervisor(Xen, Bitvisor)ͷιʔεͱIntel SDMΛಡΊʂ͆
Αͦ͞͏จݙ • ʰϋΠύʔόΠβͷ࡞Γํʱhttp://syuu1228.github.io/howto_implement_hypervisor/ • ʰHypervisor From Scratchʱhttps://rayanfam.com/topics/hypervisor-from-scratch- part-1/ • Intel
SDM • Bitvisorͷιʔε - thin hypervisorͷྲّྀ͕Θ͔Δ(PassThrough Driverͱ͔) Γ͍ͨ͜ͱʹΑͬͯಡΉจݙ͋Γ͑Μଟ͘ͳΔ
۩ମతͳ֦ுํ๏ʁ • vcpuΫϥε(VMͷίΞ෦)Λܧঝͨ͠ΫϥεΛ࡞͢Δ͚ͩ
;Μ͍͖
ྫ ࢀߟ: http://github.com/Tr4pMafia • syscall -MSR-IA32-LSTARͷվ͟ΜʹΑΔsyscall໋ྩͷtrap • Int3 - INT3ͷtrap
• starter_kit - γϯϓϧͳ֦ு ࠓύεεϧʔυϥΠόͷ࣮ͱ͔Λ;͘Ή͍͍ײ͡ͷHypervisorΛ։ൃ͍ͯ͠Δ
͓ΘΓ