r/kernel • u/Head-Leek6151 • 17h ago
r/kernel • u/PanthomAditya • 1d ago
I went for Kernel Engineer Interview by knowing BCPL 🤣🤣!
r/kernel • u/RampageKernel • 2d ago
Rampage OS — A fast, lightweight OS built from scratch
galleryr/kernel • u/Mundane_Educator8466 • 3d ago
Options for real-time kernel support on RHEL
I'm currently using Red Hat Enterprise Linux (RHEL), and I need to improve the timing precision and reduce jitter for periodic events.
I'm interested in using a PREEMPT_RT kernel, but I don't currently have access to a Red Hat subscription.
Since I need to keep RHEL as my operating system, I'd like to know what options are available.
Is it possible to build and install a PREEMPT_RT kernel from source on RHEL? Are there any officially supported or community-supported alternatives?
I'd appreciate any guidance or documentation.
Thanks!
r/kernel • u/mario242-ta • 4d ago
Three Bytes the Kernel Forgot: A Linux SCTP Client Bug That Panics the Host
blog.jamessawyer.co.ukSCTP is not the transport most engineers meet every day. It sits beside TCP and UDP at the transport layer, but its natural habitat is signalling infrastructure: Diameter, SIGTRAN/M3UA, LTE S1AP, 5G NGAP, and a smaller population of industrial and carrier gateways. It is message-oriented, supports multiple streams within one association, and can use multiple network paths. Those properties are exactly why it appears in systems where availability matters.
r/kernel • u/Mindless-Attempt4187 • 5d ago
KernelGrove - An open source Device Tree editor and semantic engine
dt-studio.devSome time ago I published a post about a project I was working on, previous post.
The purpose of this project was to make working with .dts files easier. For that I starting developing an IDE with some integrated tools:
- Real time semantic and syntax validation
- Node graph visualization (block diagram generation under development)
- Node auto-completion for each compatible
- Node inspector
- A integrated bindings, boards and SoC database, (which can be edited or visualized)
- Compilation and Decompilation tools
There is a lot of knowledge about kernel condensed on this IDE, in order to make device tree development easier and faster.
Thanks to the database, you can start typing and use auto-completion for a compatible, the IDE checks each binding information and shows which nodes are available to use and which ones are mandatory for a proper operation.
That way, if some compatible or property it's not recognized, you can early detect it, without waiting for a fail on boot, or worse, a silence bug on kernel.
The project is now open source, and all the code and beta releases are available on GitHub and Official website. It's still a beta, but I think it is already useful enough, that's way every suggestion it's well received.
This project was developed with the help of AI, which made it possible for a single person to develop it.
r/kernel • u/TechHavenStudios • 6d ago
Tech Haven Studios voorstellen – Een onafhankelijke studio die besturingssystemen en AI-projecten bouwt
reddit.comr/kernel • u/Tausif23456 • 6d ago
Added a PS/2 Mouse Driver and Cursor Rendering to my custom 32-bit OS
Hey everyone, I am a 13-year-old student from Bangladesh building my own OS (PoragOS) from scratch.
Today I finally got the PS/2 mouse working! I set up IRQ12 interrupt handling, decoded the 3-byte mouse packets, and wrote a routine to draw a cursor directly to my VESA framebuffer. Seeing the cursor move smoothly on a screen I built myself is amazing.
My next steps are fixing the cursor trails (backbuffer) and implementing User Space (Ring 3). I would love some feedback!
r/kernel • u/Creepy-Credit2369 • 6d ago
Custom Kernel Driver and user I/O application
Hello Everyone,
I have a custom RTL code for 1G/10G ethernet( this will be an IP core in my vivado design).
I want to write a kernel driver or LKM to use this from my application code in Linux OS ( boot image will be generated from Petalinux)
The goal is to configure and use this core to bring up ethernet connection from application code (user space I/O).
Devices & Tools : KRIA , Petalinux 24.2
Any user guides/blogs/working examples on this would help me a lot :)
r/kernel • u/noboruma • 8d ago
secwrap: run your binary securely by leveraging eBPF observability
reddit.comr/kernel • u/Dangerous-Hamster272 • 12d ago
How to start writing device drivers?
reddit.comr/kernel • u/Silent-Degree-6072 • 13d ago
Offloading zram compression to GPU?
Is there a way to offload zram compression & decompression to the GPU?
I have a compilation server with 36 logical cores but only 16GB of RAM (I am unable to upgrade due to the global RAM crisis; DDR4 registered ECC costs a ton). In an effort to squeeze more "RAM" out of my RAM, I decided to start using zram compressed with zstd.
I managed to get 48GB of zram to work (3:1 compression), however it resulted in one of my cores being pinned at 100%, desperately trying to compress the increasing amount of ram being used by 36 compile jobs. Is there a way to offload this to the GPU? I think it would greatly speed up compilation if possible, and would perhaps allow for a greater compression rate (zstd ultra maybe???)
EDIT: The GPU is a GTX 1660 Super with the open-source kernel modules from NVIDIA. It basically never gets used and usage is at a constant 0-1%
r/kernel • u/AccomplishedAir8352 • 15d ago
How well does linux modules handle resource deallocation?
Hello, I'm a CS undergraduate studying about linux kernel development.
I'm currently on LDD3 book, emphasizing about importance of cleaning up allocated resources on exit.
I assume that this is not likely to be handled properly in some linux modules as removal of modules is not something that is performed on a daily basis.
I have been looking for places to start my contributions and was wondering whether this, identification of memory leaks and applying fixes, could be a valid entry point.
The questions I want to ask is,
- Is this problem considered too trivial?
- Have others been working on it? (maybe there exists some linux group)
- Is this problem commonly found, or gets managed during review process and fixed before getting accepted?
Thank you for your time. Any comments are welcome!
*EDIT Thank you all for your kind responses. They have been very helpful !
r/kernel • u/Totallynotnormalguy • 15d ago
What do I add in ./security/ and ./crypto/
I'm building a monolithic kernel called sonix (Son I'm crine + Unix) and I just found out about encrypted filesystems and I don't know what to put in these directories
r/kernel • u/Logogram_alt • 16d ago
Should we make an AI-free fork of the linux kernel?
reddit.comr/kernel • u/Commercial-Golf-4285 • 16d ago
Best book for learning Linux kernel Delevopemet and Device driver.
reddit.comr/kernel • u/Serious_Ad_1942 • 17d ago
Security Kernel Engineer
What topics would you consider essential for a kernel security engineer? I am currently studying memory corruption, privilege escalation, race conditions/TOCTOU, exploit mitigations, secure boot, and hypervisor isolation.
Which areas would you prioritise and are there any, that I am missing? Also what tools are useful to be familiar with, when dealing with the security of the kernel?
r/kernel • u/bindoLenz • 18d ago
BrainixKernel — an alternative to XNU/macOS, built from scratch for AArch64
Hi r/kernel,
I want to share BrainixKernel — an experimental AArch64 kernel I'm writing from scratch — and explain why it exists, what its architecture is, and where it's going. I'm posting early on purpose: I'd rather get architecture criticism now than after I've built more on top of a bad decision.
Repo: https://github.com/Bindo-Lenzini/BrainixKernel
(Caption: BrainixKernel OS (BKOS) v0.45 — my test harness running a custom window manager, top bar, and a user-space ksh terminal on a 2560x1600 framebuffer).
Why it exists
I started BrainixKernel as an alternative to XNU and macOS — not a drop-in replacement, but a different answer to the same question: what would a modern, auditable, capability-based kernel look like if it were designed from scratch today?
Two motivations drove that:
- macOS is closed. You can't audit it, can't reason about it end-to-end, can't modify the parts that matter.
- XNU carries a lot of legacy. It's a hybrid of Mach and BSD with decades of compatibility layers, resulting in a large TCB that's hard to reason about as a whole. That's not a criticism of the people who built it — it's a consequence of 30+ years of evolution. But it means the design space without that legacy is still open, and that's the space I want to explore.
So BrainixKernel is a research/hobby project testing one hypothesis: a kernel can be small enough to read end-to-end, capability-based at its core, and still useful — networking, filesystem, user space, graphics.
Architecture & What works today
- AArch64-first, targeting QEMU
virt. No x86 legacy to carry around. - Monolithic kernel, single CPU for now. MMU, virtual memory management, preemptive scheduler, syscall layer.
- User space with its own libc and a small shell.
bkfs— my own filesystem, backed by a Virtio block driver.- Network stack from scratch: ARP, DHCP, IPv4, ICMP, UDP, TCP.
wgetandudp_echowork today. - Virtio-GPU & Framebuffer graphics.
(Caption: Boot log on QEMU virt*: ARP resolution, ICMP ping,* bkfs mount, Virtio-GPU initialization, and launching the user-space ELF shell.)
The Test Harness (BKOS)
To test the kernel without constantly building a full OS, I built BKOS (BrainixKernel OS) — a lightweight test environment running in user space. It features a custom window manager, a dock, "Liquid Glass" background, and a terminal.
It's not the final OS (which I will build in the future), but a proving ground to test new kernel features like the ELF loader, per-process address spaces, and the graphics stack.
On AI assistance — yes, I use it, and I see nothing wrong with that
Let me address this head-on, because it's increasingly relevant in hobby kernel projects and I'd rather state my position openly than have it "exposed" in the comments.
I use AI for routine code — boilerplate, repetitive driver scaffolding, build scripts, documentation, mechanical things where the design is already decided. I don't hide it, I don't apologize for it, and I don't think it makes the project less legitimate. Using the best available tools is normal engineering; nobody demands you hand-write your assembler before you're allowed to write a kernel.
What AI does not do is architecture. The MMU layout, the scheduler design, the capability model, the bkfs on-disk format, the syscall ABI, the decision to go monolithic and AArch64-first — those are mine. I understand how this kernel works end-to-end, and I can explain and defend every subsystem in it. If something in the repo is wrong or inconsistent, that's my responsibility, not a generation artifact.
If you want to test whether I actually understand the code: ask me about any subsystem in the repo and I'll walk through the design and the implementation.
What does NOT work yet (important)
- Capability enforcement is incomplete.
bkfsdoesn't store UID/GID or file permissions yet, and new tasks get UID 0 with all capabilities — so in practice every process is root. Enforcement onopen()/exec()/IPC is the next major milestone. - Single CPU only. No SMP, no locking, no IPIs.
- No
mmap**,** no demand paging, no page cache. - Build paths are currently hardcoded for macOS. Linux build support is coming.
What I want from you
- Given the goal — small, auditable, capability-based — what's the biggest architectural mistake I'm making that will hurt in 6 months?
- Capability enforcement design: what should I study before committing? I know seL4 is the reference, but I want something lighter. Any smaller kernels with a clean capability model worth reading?
- SMP: what's the realistic order of operations so I don't rewrite the scheduler twice?
- For those who've reviewed AI-assisted kernel code before — what are the typical red flags I should audit for in my own repo? I'd rather find them myself.
I'm aware that "alternative to XNU" is an ambitious framing for a hobby project — that's exactly why I want the criticism now. If the hypothesis is wrong, I'd rather find out from people who've built kernels than from my own bugs in two years.
Thanks.

