I’ve always been fascinated by kernel development. Realistically though, what are some examples of useful modules someone could write without several years of practice?
Probably nothing that will get added to the upstream source but you could make infinite file system modules for things. Userspace FUSE would probably make more sense but this would be a good way to get started. The general vibe I got when looking in to this is that the Linux kernel has more than enough contributors right now so they make no effort to make it beginner friendly or offer an easy on ramp. IIRC Linus said…
Linux Kernel Module Programming Guide
21–30 of 44 posts
Re: Linux Kernel Module Programming Guide
#22This looks really good. :) Pity it's on GitHub Pages though, so people using IPv6 only can't access it. :(
It doesn't work for protocols that embed IP addresses, like BitTorrent, since you'd need a protocol-aware proxy for that rather than just an IP firewall, but for something like HTTP there won't be any problem.
Re: Linux Kernel Module Programming Guide
#23Re: Linux Kernel Module Programming Guide
#24I’ve always been fascinated by kernel development. Realistically though, what are some examples of useful modules someone could write without several years of practice?
Re: Linux Kernel Module Programming Guide
#25This looks really good. :) Pity it's on GitHub Pages though, so people using IPv6 only can't access it. :(
So offer to mirror it then. The D in git’s DVCS stands for “decentralised”. I’ve heard some dumb complaints in my time but the real beauty of this one is you made it on another site that’s IPv4 only (HN doesn’t yet support IPv6 either).
Saying that it's a "dumb complaint" to point out that large parts of the world can't access the content is kind of taking the piss though. :(
Re: Linux Kernel Module Programming Guide
#26This looks really good. :) Pity it's on GitHub Pages though, so people using IPv6 only can't access it. :(
Not the world's biggest fan of GitHub myself but to be fair they're about to support ipv6. They've started putting up AAAA records around other parts of the site if memory serves.
Re: Linux Kernel Module Programming Guide
#27This looks really good. :) Pity it's on GitHub Pages though, so people using IPv6 only can't access it. :(
Do you have real examples of people that actually have zero access to IPv4 sites, or is this just a theoretical concern?
Seems to be mainly people located in South East Asian countries, though I'd have to go trawling back through log history to get the exact details.
Re: Linux Kernel Module Programming Guide
#28I’ve always been fascinated by kernel development. Realistically though, what are some examples of useful modules someone could write without several years of practice?
Probably nothing that will get added to the upstream source but you could make infinite file system modules for things. Userspace FUSE would probably make more sense but this would be a good way to get started. The general vibe I got when looking in to this is that the Linux kernel has more than enough contributors right now so they make no effort to make it beginner friendly or offer an easy on ramp. IIRC Linus said…
A lot of work goes into refactoring and cleaning up code, making things cleaner, adding documentation, adding static and dynamic checkers for locks, memory errors, and various other things, making useful common data structures and code into libraries, inspection and debugging tools, reimplementing as much hand-coded assembly as reasonably possible in C, adding a staging area in the tree and moving to a distributed vcs, there are automated CI tests that get kicked off when you post a patch to a mailing list.
In my opinion it is far nicer to develop for, and a lot of code is far nicer to read than it was 20 or even 10 years ago. It's simpler to write some basic hello world filesystem or device driver module because APIs have become a lot cleaner and there are a lot more checks. It is also now far easier let's say to develop a high performance multi-queue block IO subsystem that is mostly lock free and can steer interrupts to specific CPUs based on context and have all the platform specific PCI and interrupt issues and the different memory ordering behaviors of different CPUs all just work. Linux already has one of those though.
Outside of device drivers and new hardware enablement for really simple device types or minor updates to an existing device type, what the kernel is doing now is vastly more complicated. So it is a lot of work to make a significant useful change. This isn't because there is no interest in making it beginner friendly, it's because a lot more of the "easy" things are done.
Re: Linux Kernel Module Programming Guide
#29I’ve always been fascinated by kernel development. Realistically though, what are some examples of useful modules someone could write without several years of practice?
Learn about FTRACE - https://jvns.ca/blog/2017/03/19/getting-started-with-ftrace/
Use ftrace to trace your favor .ko
- simple one such as serial port driver.
- usb driver
- usb to serial port driver,
- usb camera driver
- gpu driver (opensource intel/amd)Re: Linux Kernel Module Programming Guide
#30Earlier quoted context omitted.
Probably nothing that will get added to the upstream source but you could make infinite file system modules for things. Userspace FUSE would probably make more sense but this would be a good way to get started. The general vibe I got when looking in to this is that the Linux kernel has more than enough contributors right now so they make no effort to make it beginner friendly or offer an easy on ramp. IIRC Linus said…
It really depends what you mean by making it "beginner friendly". A lot of work goes into refactoring and cleaning up code, making things cleaner, adding documentation, adding static and dynamic checkers for locks, memory errors, and various other things, making useful common data structures and code into libraries, inspection and debugging tools, reimplementing as much hand-coded assembly as reasonably possible in C…