Breaking Into The World Of Kernel Hacking?
crow_t_robot asks: "In
the past couple of months I have become increasingly interested in
kernel programming and have finally decided to take the leap and
'get my hands dirty.' I have searched around the web and read a few
docs and FAQs on getting started with the kernel but I was wondering
what kind of personal experiences those in the Slashdot crowd have
had that are so bold as to start goofing with the kernel code. For
those that have become competent kernel programmers, how did you
'break in' and what advice would you give beginners?"
(Now taking bets on whether this first hits -1 Troll or +5 Funny).
To protect against modern DNA evidence collection, wrap youself completely in saran wrap except for breathing holes also.
If you get desperate, cut yourself with something sharp lying around the house and sue the owners. Works every time. Good luck on your new career!
--KingPrad
Two fish are in a tank. One says to the other, "I'll drive. You man the guns."
Stop the Slashdot Effect! Don't read the articles!
Connect remotely to a debug build of the OS on a seperate machine than your host machine and step through the code. Set breakpoints at places that look interesting, and just skip over things that don't do much. Watch the registers and keep an eye out for error codes, these will tell you what's going on with the OS.
Oh wait, you need a kernel debugger...
Nevermind.
Take a knife and start hacking a cherry kernel. When you become good it at, you can try hacking a peach kernel with an axe, then a mango kernel with a chainsaw, and so on...
If you don't have that much of experience, I would start making a device driver for a relatively simple device.
dude, don't take the bait! he's just trying to get someone to write a driver for his mp3 player.
Blaze a trail to the New World
Could someone please tell me what does RTFM stand for?!?!
:)
RTFM!!!
Thanks for the set-up!
Could someone please tell me what does RTFM stand for?!?!
Yeah, Microsoft can. Great knowledge base article.
i bet that guy can hack a kernel but can't figure out how to change his oil or replace an alternator or something like that
That is true, but in the spirit of open source, we just borrow somebody else's car.
Do you have Linux and a DotPal? Click here now!
Rather than just hacking in general, you should identify a particular area where kernal development has lagged. That way, you can make incremental improvements in long-neglected code rather than trying to one-up the preeminent kernel hackers.
For instance, I've noticed that there is a sad lack of resources devoted to incorporating practical jokes into the kernel. Everything is so "write to disk, read from disk, move bytes around, manage processes" boring.
I've got some ideas you might want to consider for your first project. Implement these babies, and I'm sure you'll garner a great deal of attention.
- Fake "blue screen" crashes: When "root" is logged on locally, intermittently go to a blue screen with memory dump info for a few seconds, then switch back to console mode as if nothing happened.
- "Ha! Just Kidding!" memory manager: when an app requests a memory allocation, periodically claim that it has failed for no reason at all. That'll keep 'em laughing forever!
- Unionized thread scheduling: implement the concepts of lunch breas, smoke breaks, and overtime into thread scheduling. Union threads should refuse to work with non-union threads. Periodic strikes for better working conditions, and so on.
Do a good job with this stuff, and I'd be shocked if it wasn't included in the main tree!
Cheers
-b
If I wanted a sig I would have filled in that stupid box.
I recall a certain Finnish nerd, who sat around in his bathrobe in his mom's apartment all the way thru college. Apparently with those credentials he managed to write a pretty decent OS...
It's called XP
--
The Cap is nigh. Time to get a fresh new account.
Ok, now you can go back to read all these good advices that other
"4. Read the kernel source." Yeah. Well, i stopped after the first 300 pages. I found the plot a bit too thin. Maybe it gets better along the way, i dunno. I liked the photo version of the kernel a lot better ;p
I think the audio version is even better.(dd if=linux-2.4.17.tar.bz2 of=/dev/dsp)
-- free as in swatantryam - not soujanyam.
SPOILER ALERT:
The butler does it, in the library with the scheduler code.
~~~~~ BigLig2? You mean there's another one of me?