Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
18行のLinuxカーネルモジュールを 作ってみる
Search
Satoru Takeuchi
PRO
November 28, 2023
Technology
430
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
18行のLinuxカーネルモジュールを 作ってみる
以下動画のテキストです
https://youtu.be/U6cCXndBDVU
Satoru Takeuchi
PRO
November 28, 2023
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
70
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
95
あなたの知らないバージョン命名規則
sat
PRO
3
900
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
66
バイナリダンプの模様を読む
sat
PRO
0
89
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
89
114-ファイルのshallow_copy.pdf
sat
PRO
2
58
113-Btrfsのスナップショット.pdf
sat
PRO
0
41
Other Decks in Technology
See All in Technology
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
150
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
160
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
1.1k
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
2
620
人間はどの意思決定を手放せるのか
kawasima
15
7.8k
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
120
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
140
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
530
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
あけおめLINE 傾向とその対策
nasa9084
0
190
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
190
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
142
7.7k
How STYLIGHT went responsive
nonsquared
100
6.3k
RailsConf 2023
tenderlove
30
1.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
The Invisible Side of Design
smashingmag
301
52k
Accessibility Awareness
sabderemane
1
210
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Transcript
18行のLinuxカーネルモジュールを 作ってみる Nov. 28th, 2023 Satoru Takeuchi X: satoru_takeuchi 1
今回話すこと • Linuxのカーネルモジュールを作ってカーネル開発の入口の入口に立つ • Ubuntu 22.04.3で実験 2
そもそもカーネルモジュールとは • Linuxカーネルの機能の一つ • システムの動作中にカーネルに機能を組み込む • 組み込まれた機能はlsmodコマンドでリストできる • カーネル本体を拡張するのは大変 •
単純なカーネルモジュールを作るくらいなら簡単 3
カーネル開発にはお作法がある • Kbuildという独自のビルドフレームワークに沿ったMakefileを書く ◦ 頑張ってKbuildを理解する必要はなくてコピペでいい ◦ Building External Modules ▪
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/modules.rst • モジュールの作者、ライセンス、簡単な説明などを書く • カーネルモジュールのコードを書く ◦ 所定のシグネチャを持つ初期化関数と終了関数を書く ◦ あとは自由 ◦ C言語なのでちょっと大変かも ▪ 最近はRustで書ける(そのうち紹介するかもしれない ) 4
この動画で作るもの: helloモジュール 1. ロード時に”Hello world!\n”という文字列をカーネルログに出力 2. たった18行 5
まとめ • Linuxのカーネルモジュールは凄く簡単なものならすぐ作れる • ソース ◦ https://github.com/satoru-takeuchi/youtube-sample/0061-linux-kernel-module 6