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
Device access filtering in cgroup v2
Search
KONDO Uchio
October 09, 2021
Technology
1
800
Device access filtering in cgroup v2
第15回 コンテナ技術の情報交換会@オンライン ->
https://ct-study.connpass.com/event/223739/
KONDO Uchio
October 09, 2021
Tweet
Share
More Decks by KONDO Uchio
See All by KONDO Uchio
大規模レガシーテストを 倒すための CI基盤の作り方 / #CICD2023
udzura
5
2.3k
Ruby x BPF in Action / RubyKaigi 2022
udzura
0
210
Narrative of Ruby & Rust
udzura
0
180
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.6k
Talk of RBS
udzura
0
400
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
720
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
690
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
750
生産性を可視化したい! / SUZURI's four keys
udzura
11
5.3k
Other Decks in Technology
See All in Technology
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.4k
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
140
2025年のARグラスの潮流
kotauchisunsun
0
790
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
160
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
技術に触れたり、顔を出そう
maruto
1
150
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
540
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
170
データ基盤におけるIaCの重要性とその運用
mtpooh
4
510
re:Invent 2024のふりかえり
beli68
0
110
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
It's Worth the Effort
3n
183
28k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Designing for Performance
lara
604
68k
Site-Speed That Sticks
csswizardry
3
270
Embracing the Ebb and Flow
colly
84
4.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Transcript
ͳΜͰ#1'ͰΔ࣌ͳΜͩͳΝ 6DIJP,POEP(.01FQBCP *OD DHSPVQWͷ σόΠεΞΫηεϑΟϧλ
γχΞɾϓϦϯγύϧΤϯδχΞ ۙ౻ Ӊஐ࿕ / @udzura https://blog.udzura.jp/ Uchio Kondo ٕज़෦ ٕज़ج൫νʔϜ/σʔλج൫νʔϜ
@ GMOϖύϘ ΤϯδχΞΧϑΣʢԬࢢẂנจԽձؗʣ αϙʔλʔ Duolingo Diamond Leaguer 💎 * ͖ͳγεςϜίʔϧ: open_by_handle_at(2) * ͖ͳLinux Namespace: Time Namespace * ࠷ۙݴޠ࣮ʼOSࣗ࡞ʼBPFɺίϯςφɺͱ͍͏ײ͡...
͜Ε·Ͱͷ͋Β͢͡ wF#1'ͱ͍͏ٕज़͕͋Δ w<F#1'DIJLVXBJU>·ͨ<F#1'JENNJ>Ͱݕࡧ wͳΜΧʔωϧͰ҆શߴʹϑΟϧλ͢Δٕज़
F#1'ͷϓϩάϥϜλΠϓ wW w ଟ͗ͯ͢ѲͰ͖ͳ͍ͷͰ ୭͔෩དྷͷγϨϯʹྫ͑ͯ؆ܿʹڭ͑ͯཉ͍͠
BPF_PROG_TYPE_CGROUP_DEVICE
DHSPVQWͷσόΠεΞΫηε੍ݶ wEFWJDFTͱ͍͏αϒγεςϜ͕͋ͬͨ wಛఆͷϑΥʔϚοτͰEFWJDFTBMMPXEFWJDFTEFOZʹॻ͖ࠐΉ IUUQTXXXLFSOFMPSHEPD%PDVNFOUBUJPODHSPVQWEFWJDFTUYU
DHSPVQWͰͷσόΠεΞΫηε੍ݶ wJOUFSGBDFpMF͕ͳ͘ͳΔʢʂʣ w#1'@$(3061@%&7*$&ͳϓϩάϥϜΛDHSPVQʹΞλον͢Δͱͷ͜ͱ wϓϩάϥϜͰΑΓࡉ੍͔͘ޚՄೳԿͳΒྫ͑ϩάΛͨ͠ΓͰ͖Δ IUUQTXXXLFSOFMPSHEPD%PDVNFOUBUJPODHSPVQWUYUɹ
σϞϓϩάϥϜ
ϑΟϧλ͢ΔϓϩάϥϜʢ$Ͱॻ͘ʣ
ϑΟϧλ͢ΔϓϩάϥϜʢ$Ͱॻ͘ʣ ηΫγϣϯ໊ͷࢦఆ EFWVSBOEPNͰ͋ΕΛฦ͢ σϑΥϧτΛฦ͢
Ϗϧυ͢Δ ͖ͬ͞ͷ$ίʔυ͕͜͏͍͏ #1'ϓϩάϥϜʹίϯύΠϧ͞Ε͍ͯΔ
Ξλον͢Δ w΄΅Χʔωϧಉࠝͷ αϯϓϧίʔυͦͷ ··Ͱ͕͢
None
ΧϨϯτϓϩηε͕UFTUCQGʹॴଐ͍ͯ͠Δ WͳͷͰͷߦͷΈݟΔ EFWVSBOEPNʹΞΫηεͰ͖ͳ͍ ʢͪͳΈʹSPPUͰͰ͖·ͤΜʣ ଞͷσόΠε0,
͔͜͜Β༨ஊ
3VDZͱ͍͏ϓϩάϥϜΛ࡞ͬͨ w3VCZͷεΫϦϓτΛ#1'ʹ͠·͢ SVDZίϚϯυͰΦϒδΣΫτϑΝΠϧΛ ੜ͠ɺಉ༷ʹϩʔυ͢Δͱ༗ޮʹͳΔ
Έ Ruby Script mruby OpCodes BPF OpCodes BPF Object (ELF
format) mruby Rucy transpiler wNSVCZͷ0Q$PEFΛ࡞ΓɺͦΕΛ#1'0Q$PEFʹ༁͢Δ
໋ྩηοτͷൺֱʢҰ෦ʣ wNSVCZ wϨδελϚγϯ7.ɺϨδελݸʢݸΛਪʣ w໋ྩՄมɺҾ3 3ɺҙͷϨδελΛฦ٫Մ w#1' wϨδελϚγϯ7.ɺϨδελݸ w໋ྩݪଇݻఆʢCJUɺඞཁͳ߹CJUʣ wҾ3 3ɺฦ٫ඞͣ3
มͷྫ
·ͱΊʁ
ॴײͱ͔ w#1'ϓϩάϥϜͷதͰɺσόΠεΞΫηεϑΟϧλ খ͍࣮͞Ͱࢼ͢͜ͱ͕Ͱ͖ΔͷͰɺ 3VDZͷ࣮Λ͢Δࡍʹςετઌͱͯ͠ศརͩͬͨɻ wΈͳ͞ΜσόΠεΞΫηεϑΟϧλ͔Β#1'࢝Ί·ͤΜ͔ʁ