Live data from Hacker News

Ask HN: Project ideas for a Linux kernel module

news.ycombinator.com

1–10 of 48 posts

Ask HN: Project ideas for a Linux kernel module

#1
Hey HN, I'm currently a senior CS student (graduating in fall), I wanted to align my career with low level/embedded systems and I wanted to focus more on the kernel/firmware side of things.

so to that end, What would be a good idea for a linux kernel module I can work on, something that may get me to interact with any topics involving communication standards/protocols ( i2c, SPI, or JTAG, wireless, BLE).

thank you.

Re: Ask HN: Project ideas for a Linux kernel module

#2
If you're in for a wild ride, you could try to take some reasonably current Android phone and get enough of the manufacturer's changes to the Linux kernel upstream to run generic Linux on it.

There are a lot of patches that are purely Android-specific and won't ever make it to upstream Linux, but others, like the drivers for flash chips and USB? These could definitely be submitted upstream.

Samsung for example uploads their FOSS dumps to [1].

First thing I'd do is to get u-boot working as a fourth-stage bootloader so you don't have to wrestle with ODIN or fastboot every time you rebuild your kernel. That alone should be a decent sized university project.

[1] https://opensource.samsung.com/uploadList?menuItem=mobile&cl...

[2] https://en.wikipedia.org/wiki/Booting_process_of_Android_dev...

Re: Ask HN: Project ideas for a Linux kernel module

#3
Id love a way for userspace applications to leverage the MMUs memory protection to trigger user code. Let me give you an example: Lets say I have large block of memory that is encrypted. I want to random access this memory, but i don't want to decrypt the entire memory before i start using it. I may have worker threads that start decrypting the data for me, but i don't want to wait for them. Ideally, id like to set a memory protection flag on all pages that are still encrypted, and then if any access is made of these pages, a callback will trigger that lets you decrypt the block and remove the flag from the page, only when accessed.

This could be used for things like user space memory mapping of networked memory, where memory is retrieved from a remote computer when accessed. This would make it possible to transparently implement userspace large scale shared memory systems in a very elegant way. Good luck with what ever you decide to do!

Re: Ask HN: Project ideas for a Linux kernel module

#4
Given Linux now allows bits written in Rust, I think a port-to-Rust project may be interesting. There's probably some place on the internet where the Rust minded are discussing what are the most interesting projects in this space (I have no idea, sorry). It could make a cool review on the differences between both implementations, wrt complexity, safety, LOC, compile time, etc.

Re: Ask HN: Project ideas for a Linux kernel module

#5
I have recently been looking into getting a 12" Apple Macbook for on the road. The 12" Macbooks were small 12" Intel laptops produced between 2015 and 2017. They can boot Linux, but many devices are not functioning.

They are great little machines, though a bit underpowered (even when they were new) so running MacOS is not a great experience. Decent Linux support should give these devices a second live.

Most devices should be able to work, as they are all standard components. My suspicion is that we are mostly lacking device trees and maybe some SMC work.

I expect the circuit diagrams for this laptop to be floating around the web somewhere (otherwise shoot Louis Rossman an email), so reverse-engineering the SMC should be doable, and a great low level/embedded challenge.

Re: Ask HN: Project ideas for a Linux kernel module

#6

Id love a way for userspace applications to leverage the MMUs memory protection to trigger user code. Let me give you an example: Lets say I have large block of memory that is encrypted. I want to random access this memory, but i don't want to decrypt the entire memory before i start using it. I may have worker threads that start decrypting the data for me, but i don't want to wait for them. Ideally, id like to set a…

You could probably do this in userspace now with userfaultfd.

Re: Ask HN: Project ideas for a Linux kernel module

#7

If you're in for a wild ride, you could try to take some reasonably current Android phone and get enough of the manufacturer's changes to the Linux kernel upstream to run generic Linux on it. There are a lot of patches that are purely Android-specific and won't ever make it to upstream Linux, but others, like the drivers for flash chips and USB? These could definitely be submitted upstream. Samsung for example upload…

This would greatly help projects like postmarketOS. Plenty of old devices that have already been partially ported to pick from: https://wiki.postmarketos.org/wiki/Devices

Having an existing community may also be useful for figuring this stuff out.

Re: Ask HN: Project ideas for a Linux kernel module

#8
Perhaps you can work on the new promising Shortest Path Bridging (SPB) in the Linux kernel that has not been very popular as it should be [1],[2],[3].

[1] 802.1Q-2018 - IEEE Standard for Local and Metropolitan Area Network--Bridges and Bridged Networks:

https://ieeexplore.ieee.org/document/8403927

[2] Provider Backbone Bridging for Linux:

https://github.com/openss7/pbbr

[3] Are there inherent problems with 802.1aq preventing wider adoption?

https://www.reddit.com/r/networking/comments/8gez0r/are_ther...

Re: Ask HN: Project ideas for a Linux kernel module

#9

If you're in for a wild ride, you could try to take some reasonably current Android phone and get enough of the manufacturer's changes to the Linux kernel upstream to run generic Linux on it. There are a lot of patches that are purely Android-specific and won't ever make it to upstream Linux, but others, like the drivers for flash chips and USB? These could definitely be submitted upstream. Samsung for example upload…

Anything that supports the Android ROM scene and that makes their life easier sounds fantastic in my opinion. Please have a go here.

Re: Ask HN: Project ideas for a Linux kernel module

#10
write a backdoor :) A kernel module that drops the user into a root shell if they call an obscure kernel functionality with a secret value in some registers.

This should be somewhat easy to start and self-contained. If you want, you can easily extend it if you want things to become more fancy. E.g., hiding the secret constant. Implementing a challenge response protocol, limiting access to other global state (hardware dongle? ip address?) and so on.

Post reply on HN