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.9k
Porting Golang Runtime To Baremetal
morimolymoly
1
120
Other Decks in Technology
See All in Technology
Kubernetesでメールの大量配信をしている話/k8sjp-20250205
hfukamachi
0
270
BLEAでAWSアカウントのセキュリティレベルを向上させよう
koheiyoshikawa
0
180
開発者が自律的に AWS Security Hub findings に 対応する仕組みと AWS re:Invent 2024 登壇体験談 / Developers autonomously report AWS Security Hub findings Corresponding mechanism and AWS re:Invent 2024 presentation experience
kaminashi
0
130
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
560
Postman Vaultを使った秘密情報の安全な管理
nagix
3
220
Redshiftを中心としたAWSでのデータ基盤
mashiike
0
120
Autify Company Deck
autifyhq
2
41k
プロダクト観点で考えるデータ基盤の育成戦略 / Growth Strategy of Data Analytics Platforms from a Product Perspective
yamamotoyuta
0
420
これからSREになる人と、これからもSREをやっていく人へ
masayoshi
5
3.8k
SCSAから学ぶセキュリティ管理
masakamayama
0
130
Power BI は、レポート テーマにこだわろう!テーマのティア表付き
ohata_ds
0
140
Bounded Context: Problem or Solution?
ewolff
1
200
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Navigating Team Friction
lara
183
15k
Practical Orchestrator
shlominoach
186
10k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Embracing the Ebb and Flow
colly
84
4.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
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Λ։ൃ͍ͯ͠Δ
͓ΘΓ