How and Why You Should
Become a Kernel Hacker

               James Morris
             jmorris@namei.org



    FOSS.IN/2...
Introduction
Only Three Essential Requirements

●   Genuine interest
●   Common sense
●   Willing to work hard
Kernel Hacking Myths



Myth: Kernel hacking is bizarrely difficult and
 mysterious.

Reality: It’s just software.
Kernel Hacking Myths


Myth: Kernel hackers are mutant super geniuses.

Reality: There are a few of those, but most are
 j...
How – Getting Started


●   Dreaded mailing list: lkml

●   Books

●   Online resources
How – Getting Started


●   Learn C

●   Become familiar with kernel build environment

●   Test and submit bug reports
How – Getting Started


●   Fix bugs

●   Scratch an itch

●   Try many ideas
How – Getting Started


●   Get the Basics Right!

●   Coding Style

●   Patch Submission
How – Getting Started

●   Seek Mentors

●   Follow Your Interests

●   Initial learning curve is steep: be persistent!
How – Technical Tips

 ●   Keep it simple

 ●   Read the code of good programmers

 ●   Review others’ code




“I always ...
How – Technical Tips
Study Kernel Primitives

●   Locking
●   Modes, contexts
●   Timers
●   Data structures
●   Library c...
How - Process Tips
●   Don’t defend bad code

●   Show, don’t tell


“Talk is cheap. Show me the code.” -- Linus
How - Process Tips
●   Incremental changes

●   Small, logically contained patches

●   Release early and often

●   Respo...
How - Process Tips

●   Respect maintainer decisions

●   Encourage contributions

●   Mentor & delegate
How - Social Tips

●   Kernel community is a relic of USENET culture

●   Getting flamed is an occupational hazard

●   No...
How - Social Tips

●   If you find yourself arguing with Alan Cox,
    you’re probably wrong

●   Demonstrate your ideas a...
Resources
● “Being a Moron on linux-kernel”
● LWN

● KernelTrap

● Documentation directory

● Online books (“ldd3”)

● The...
Upcoming SlideShare
Loading in …5
×

How and Why You Should Become a Kernel Hacker - FOSS.IN/2007

753 views
645 views

Published on

How and Why You Should Become a Kernel Hacker - FOSS.IN/2007

Presentation given in Bangalore, India.

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
753
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

How and Why You Should Become a Kernel Hacker - FOSS.IN/2007

  1. 1. How and Why You Should Become a Kernel Hacker James Morris jmorris@namei.org FOSS.IN/2007 – Bengaluru, India
  2. 2. Introduction
  3. 3. Only Three Essential Requirements ● Genuine interest ● Common sense ● Willing to work hard
  4. 4. Kernel Hacking Myths Myth: Kernel hacking is bizarrely difficult and mysterious. Reality: It’s just software.
  5. 5. Kernel Hacking Myths Myth: Kernel hackers are mutant super geniuses. Reality: There are a few of those, but most are just good engineers.
  6. 6. How – Getting Started ● Dreaded mailing list: lkml ● Books ● Online resources
  7. 7. How – Getting Started ● Learn C ● Become familiar with kernel build environment ● Test and submit bug reports
  8. 8. How – Getting Started ● Fix bugs ● Scratch an itch ● Try many ideas
  9. 9. How – Getting Started ● Get the Basics Right! ● Coding Style ● Patch Submission
  10. 10. How – Getting Started ● Seek Mentors ● Follow Your Interests ● Initial learning curve is steep: be persistent!
  11. 11. How – Technical Tips ● Keep it simple ● Read the code of good programmers ● Review others’ code “I always listen for what I can leave out” -- Miles Davis
  12. 12. How – Technical Tips Study Kernel Primitives ● Locking ● Modes, contexts ● Timers ● Data structures ● Library code
  13. 13. How - Process Tips ● Don’t defend bad code ● Show, don’t tell “Talk is cheap. Show me the code.” -- Linus
  14. 14. How - Process Tips ● Incremental changes ● Small, logically contained patches ● Release early and often ● Respond to feedback
  15. 15. How - Process Tips ● Respect maintainer decisions ● Encourage contributions ● Mentor & delegate
  16. 16. How - Social Tips ● Kernel community is a relic of USENET culture ● Getting flamed is an occupational hazard ● No excuse to do it to others ● Majority are professional
  17. 17. How - Social Tips ● If you find yourself arguing with Alan Cox, you’re probably wrong ● Demonstrate your ideas and politely defend them if needed ● When you’re wrong, admit it and move on
  18. 18. Resources ● “Being a Moron on linux-kernel” ● LWN ● KernelTrap ● Documentation directory ● Online books (“ldd3”) ● The perfect patch ● GIT for kernel hackers ● Kernel Mentors ● Kernel Newbies ● LXR

×