Imagine making someone’s computer only play the Rick Astley song “Never Gonna Give You Up”, no matter what mp3 file they tried to play, no matter which media player they tried to play it with. Wouldn’t that be neat? (or annoying?)
Well, now you can. At least, with certain versions of the linux kernel, that is.
A little while ago I stumbled across someone’s implementation of it. I happened to notice that it contained portions of some of my own code from tpe-lkm that are exact copy/pastes, specifically the set_addr_rw and set_addr_ro functions. Having your own code copied elsewhere is a great form of flattery. I normally don’t mind, especially if it’s for a good (or in this case, hilarious) reason.
The main issue with this code is it serves a specific niche of kernels, as the internals change enough between versions that this won’t compile or work on all of them. So if it doesn’t work for you (or you end up crashing your machine), don’t say I didn’t warn you.
The method I use in tpe-lkm is a little more flexible. Perhaps one day if I’m ever bored enough, I’ll re-implement it myself. I can’t make any promises, though, as I’m not a big user of the Linux Desktop.
What would be really funny is if someone ported the idea to the Microsoft Operating Systems. Or even better, iPod / iPhone product lines.