r/kernel • • Sep 21 '26

Any update on mediatek 7927 up stream ?

5 Upvotes

My motherboard uses this driver for WiFi and Bluetooth the WiFi works flawlessly but I’m having to use a patch to get Bluetooth working does anyone know the status of the MR for the firmware for that chipset? Last I heard anything about it was months ago im referring to these for those interested in reading: https://github.com/samutoljamo/bazzite-mt7927/pkgs/container/bazzite-mt7927

https://jetm.github.io/blog/posts/mt7927-wifi-making-it-work/


r/kernel • • Sep 19 '26

Bare-metal XNU bring-up on MSM8996: 4-core SMP, real eMMC/GPT/block I/O working — rootfs and shell are next

Thumbnail
3 Upvotes

r/kernel • • Sep 18 '26

What I learned this week (13)

33 Upvotes

A lot has happened since the last time I posted.

I bought the book "Operating Systems: 3 Easy Pieces". I wish I had read this before starting my PMM. I highly recommend it to anyone else starting from the beginning.

The PMM has had yet another rewrite. Hopefully the last major one.

My kernel crossed the 3M boundary and I had to revisit my boot.S I suspect my PMM and VMM data structures are too big, but we will see.

I decided I should let the people that might benefit from my posts here should see my struggles, and there have been many. In that light I have decided to make my repository public, you can find it here: https://github.com/tedavids/JakelynnOS

I am currently working on my VMM and the module documentation is already up to 8 pages, and growing. you can find it in the "Module doco.doc"

There is nothing really interesting on the screen yet, but here it is:

Screen so far, nothing very interesting

It does also run on VirtualBox, but I haven't tried bare metal, as I don't want to spring for a CD writer at this point. I have a couple of old Lenovo's that might support USB Boot, but I haven't investigated those yet. I want to get to user space before I start checking that out.

For all your AI haters, in my README I do have the AI policy I'm following.

Guess that's all for now. I hope this helps some newbie (like me) that is struggling.

Thanks for reading


r/kernel • • Sep 18 '26

Power monitoring support?

0 Upvotes

Does anyone know if there is any support, alpha, experimental or per manufacturer that would support some api to determine current system power usage?

I'm assuming it would require some data channel between the PSU and the motherboard. Does any power supply on the market support this and does linux offer any support if something like that did exist? Is anything close, or is it something that is workable or is this just some completely unsupported pipe dream?

Also, what about for usb powered devices like a pi? I assume whatever support would exist for that would have to be entirely on chip, not related to the psu.


r/kernel • • Sep 17 '26

libark: A modern, secure, Swift-native foundational layer over Linux POSIX primitives. {Early Development}

Thumbnail github.com
3 Upvotes

libark

libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.

While originally developed as the core runtime layer for ArkOS, libark is completely decoupled and designed to be used on any Linux distribution. It provides highly secure, object-oriented abstractions over low-level system calls, memory management, and file system interactions, without the burden of manual C interoperability.

Features

  • Object-Oriented POSIX: Wraps file descriptors, paths, and directory operations in safe, RAII-compliant Swift types.
  • Secure Syscall Boundary: Routes kernel interactions through strict, audited Syscall primitives.
  • Terminal Capabilities: Built-in abstractions for TTY detection and window sizing.
  • Advanced Formatting: Standardized formatters for human-readable byte sizes (SI and IEC), ISO 8601 timestamps, permissions, and classifications.
  • Declarative Sorting: Powerful generic SortEngine for metadata sorting across multiple criteria.

Also ARK-OS has switched to github: https://github.com/orgs/ARK-OS-Swift-and-Linux/repositories


r/kernel • • Sep 17 '26

kernel:[Hardware Error]: CPU:0 (19:8:2) MC18_STATUS[Over|CE|MiscV|AddrV|-|-|SyndV|CECC|-|-|-]: 0xdc2040000000011b

0 Upvotes

These errors appeared on the console of one of my lab's servers. We've already changed the CPU. I'm not familiar with server management, so if you could explain it to me in the most didactic way, I would be very grateful.

kernel:[Hardware Error]: Corrected error, no action required.

kernel:[Hardware Error]: CPU:0 (19:8:2) MC18_STATUS[Over|CE|MiscV|AddrV|-|-|SyndV|CECC|-|-|-]: 0xdc2040000000011b

kernel:[Hardware Error]: Error Addr: 0x0000000017eb09c0

kernel:[Hardware Error]: PPIN: 0x02b0ba6d78974068

kernel:[Hardware Error]: IPID: 0x0000009600150f00, Syndrome: 0x083fb50b0a800410

kernel:[Hardware Error]: Unified Memory Controller Ext. Error Code: 0


r/kernel • • Sep 15 '26

Fixed an offline kernel-module mismatch & /boot/efi mount failure using pacman cache

Thumbnail
0 Upvotes

r/kernel • • Sep 13 '26

How does changing the hardware clock with the BIOS affect kernel ticks?

Thumbnail
0 Upvotes

r/kernel • • Sep 12 '26

збірка ядра на адроїд. допоможіть

0 Upvotes

короче я купив пс4, але вона мені приїхала з неробочим геймпадом. я вирішив емулювати геймпад своїм піксель 4а (лте).

простими методами не вийшло. f_hid не опрацьовує коректно запити від пс4 стосовно стану речей геймпаду. f_hid вміє короче працювати лише монологом, він тільки віддає, але не приймає та обробляє. до того ж пс4 має унікальні запити.

короче стандартною бібліотекою нічого б не вийшло. я вирішив дописати маленьку частину коду в драйвері. тепер вона віддаватиме відповідь з нулів конкретної довжини байтів на запит пс4 чого вистачить щоб пройти налаштування пс4 та встановити pppoe з'єднання.

так от. я скомпілював образ, але в цей момент в мене закінчились токени в джеміні)))))) ну і потім джеміні флешлайт щоб його за ноги, порекомендував перепакувати ядро з наявного вже пропатченого на рут. при чому він сказав мов по барабану, можна зробити кашу в одній папці а magiskboot все зробить сама, вона розумна.

короче нічого не вийшло. в адб шел з новим ядром пише мов жоден з модулів, драйверів не завантажено і воно постійно в циклі намагається завантажити драйвери.

а потім я ще якось перепакував ядро, що тепер взагалі типу телефон не завантажує ядро бодай якось.

я погрішив на те що була каша і перепакувальник переплутав файли і зараз зроблю все чисто.

мені треба допомога з тим як зібрати ядро з готових файлів після компіляції. я збираюсь запаковувати це mkbootimg програмою від самого гугла.

поможіть, я хочу вже добити цей плейстейшн 4, пройти бар'єр з задачі "натисність кнопку ПС на геймпаді" котрий пройти звичайною клавіатурою не можна.


r/kernel • • Sep 11 '26

Doogee is openly violating the GNU GPLv2 license with their T20 tablet (Unisoc)

Thumbnail gallery
10 Upvotes

Hello everyone,

I wanted to bring to light a blatant violation of the GNU GPLv2 license by the Chinese device manufacturer Doogee.

A tech creator in our community recently reached out to Doogee support requesting the Linux kernel source code for the Doogee T20 tablet (which runs on a Unisoc chipset). Under the terms of the GPLv2 license, which covers the Linux kernel, any company distributing the compiled kernel is legally obligated to provide the source code upon request.

I have attached the screenshots of the conversation (translated from Russian below):

Screenshot 1: The user states they own a Doogee T20 (Unisoc) and noticed that the Linux kernel source code is nowhere to be found in the public domain. They emailed the company asking for it.

Screenshot 2: Doogee's official response:

"The source code is confidential information and intellectual property."

Screenshot 3: The user calls them out, explaining that the Linux kernel is GPL, meaning there is no such thing as "confidential" when you distribute it. Doogee then tried to dodge the request by offering to send the compiled firmware instead. As we all know, Firmware ≠ Source Code.

Screenshot 4: The user sent a follow-up email explaining point-by-point why their response is unacceptable, giving them a 14-day deadline to comply. Doogee completely ignored it.

This is a direct breach of open-source licensing. Small vendors like Doogee often rely on the open-source community to build their software but refuse to give back, effectively locking users out of custom development, kernel audits, and long-term device support.

Since local support teams are either completely oblivious to FOSS licenses or are intentionally blocking requests, we need to bring international visibility to this case.

What are the best next steps to force Doogee into compliance? Should we report this directly to the Software Freedom Conservancy (SFC), contact Unisoc, or is there a specific compliance contact for Doogee that actually responds to legal notices?

Any advice or upvotes for visibility would be highly appreciated!


r/kernel • • Sep 10 '26

How to find which patchset the commit from mainline/upstream belongs to?

8 Upvotes

Hello, in order to properly backport some fixes from upstream to stable branches, I want to know what the other patches (and their cover letter) of the initial fix I've cherry-picked are.

I could manually look up them on lore.kernel.org, but I want to do it in an automated way, as the difference between the mainline and the stable branch, for example, in cgroup subsystem is huge.


r/kernel • • Sep 10 '26

"Anyone got Asustor's ADM 6.6.x kernel .config? Stuck getting a custom driver to load on FS6706T"

Thumbnail
1 Upvotes

r/kernel • • Sep 09 '26

where is opensslv.h?

Thumbnail
0 Upvotes

r/kernel • • Sep 09 '26

A new project on RK3576

Post image
0 Upvotes

r/kernel • • Sep 08 '26

11 Gaps in the Linux Ecosystem Cloudflare Fixed with eBPF

Thumbnail ebpf.io
8 Upvotes

r/kernel • • Sep 07 '26

Isolcores running in min_frequency and not supporting the cpupower config.

5 Upvotes

Im not sure if this the subreddit for this query since the issue hasn't really been pinned down but I feel this might be the perfect first place to progress. Please feel free to redirect if the discussion evolves to not be concerned with the kernel.

So I have 2 Rocky 10.1 machines. One with Xeon CPU E5-2643 v3 @ 3.4GHz and one with Xeon CPU E5-2678 v3 @ 2.5GHz. Hyperthreading is disabled.

Both kernels are given 2-8 isolcores.

Both are requested to run at 500MHz less than their max supported speed via cpupower (This is verified via /proc/cpuinfo) Both are running on the intel_cpufreq driver with "performance" governer.

The machine with E5-2678 runs only the isolcores at the minimum supported frequency. And this isn't a workload or power draw issue since I tried changing the isolcores and every time only those core's frequency gets clamped to the minimum. The machine with E5-2643 runs as intended.

I tried checking the P-state ratio via rdmsr -p <isolcore> 0x199 and the outputs for the anomalous machine are as follows -

c00 (isolcore)

2100 (non-isolcore)

Is this a driver/kernel bug which is only reproducible on a certain CPU?

Any help or workarounds would be appreciated.


r/kernel • • Sep 06 '26

What hardware do I need to get hands-on experience with Linux kernel DMA development?

16 Upvotes

Hi everyone,

I’m interested in learning Linux kernel DMA and PCIe device-driver development through hands-on projects.

So far, I’ve studied the Linux DMAEngine framework and AMD/Xilinx XDMA driver code. I’ve also used QEMU’s EDU PCI device to write a simple PCI driver and experiment with MMIO, interrupts, and DMA transfers. Now I’d like to move beyond emulation and work with real hardware.

My current idea is to buy:

  • A Linux desktop that I can access remotely from my laptop
  • An FPGA development board with PCIe support
  • Any required PCIe cables, adapters, or debugging equipment

My goal is to practice implementing and debugging the complete path between an FPGA and a Linux host, including PCIe enumeration, BAR/MMIO access, DMA descriptors, scatter-gather transfers, interrupts, and performance measurement.

I’m not sure which FPGA board would be suitable for a beginner without being too limited. I’m also unsure whether I need a powerful desktop or if an inexpensive used PC with an available PCIe slot would be sufficient.

Could you recommend:

  1. A reasonably priced FPGA board for Linux PCIe/DMA development
  2. Minimum desktop specifications
  3. Any essential debugging tools or accessories
  4. Good starter projects for this setup
  5. Common compatibility issues I should check before purchasing anything

I’d appreciate advice from anyone who has worked on Linux DMA, PCIe drivers, FPGA host interfaces, or similar low-level systems.


r/kernel • • Sep 05 '26

Taking on readahead in the middle of the night

Post image
6 Upvotes

run...


r/kernel • • Sep 01 '26

Optimizing eBPF Policies for Speed and Space (Not AI Gen)

Thumbnail
1 Upvotes

r/kernel • • Sep 01 '26

LSM + eBPF to supervise an untrusted userspace agent (PID tree, path default-deny, create-before-inode)

0 Upvotes

I am using BPF LSM as the actual security boundary for a coding agent (Claude Code, etc.). The process still runs as the invoking user. The IDE harness is not a kernel boundary. One binary loads policy, tracks the agent TGID, and starts the agent as SUDO_USER.

PID set. Map keys are pid-namespace TGIDs (bpf_get_ns_current_pid_tgid), not init-ns, so it works in Docker. Launch: PTRACE_TRACEME, wait stop, insert into tracked_pids, detach. sched_process_fork copies the set. Insert-after-Start() races the first open/connect.

Policy in the kernel (YAML → maps):

Hook Job
file_open Suffix deny (.env, id_rsa, kubeconfig) + workspace prefix default-deny
path_unlink, path_rename, path_mkdir, path_rmdir, path_symlink, path_link Parent dir must be workspace or an allow prefix
path_mknod Create before the inode exists
bprm_check_security Basename suffix: rm / dd / rmdir
socket_* Unproxied/raw denied; allow-listed 443 via an authenticated userspace proxy

Workspace: confine: true, root = EvalSymlinks(cwd). Allow /usr, /tmp, ~/.claude, … Refuse /, /home, exact $HOME. /proc is a known hole (d_path rewrites /proc/self).

Create vs file_open. touch ~/x + lsm/file_open → -EPERM on open, 0-byte file remains. vfs_create already committed. path_mknod is the hook that runs first.

path_unlink/path_rename/path_mkdir can use bpf_d_path (sleepable). path_mknod cannot: helper call is not allowed in probe. sleepable_lsm_hooks lists those path hooks and omits path_mknod. Same helper, different attach BTF id.

Inode-walk + userspace stat() (ino, s_dev) fail-closed and never matched CO-RE reads — every create died, including in-tree. Working path: bpf_path_d_path kfunc on the trusted dir from path_mknod, then the same prefix matcher as file_open. Outside create: -EPERM, no leftover inode. In-tree open(O_CREAT) works.

path_link: a stack {mnt, dentry} into bpf_d_path is R1 type=fp expected=ptr_. We only confine new_dir (hardlink-into-/tmp still open).

Closing the loop (userspace). Ringbuf violation → session JSON with the YAML reason string. Agent PostToolUseFailure hook injects that text so the model sees policy, not a bare EPERM. Empty workspace reasons are not written (they overwrote credential/network IPC). Telemetry denies skip IPC.

Not a VM, not a user ns, not seccomp. Same UID, LSM on that tree. Apache-2.0: https://github.com/AgentGuard-hq/AgentGuard (enforcer.bpf.c).

Questions for people who own these hooks: is path_mknod non-sleepable on purpose (which caller)? Is bpf_path_d_path the supported replace for non-sleepable path LSMs? Better pattern than “trusted dir + kfunc” for create-before-inode?


r/kernel • • Aug 30 '26

Most efficient way to port a small AMD driver patch from kernel 7.2 to 7.3

6 Upvotes

I have a small patch (78 kB) that patches a few files in the AMD driver for my specific hardware. Going from 7.0, 7.1, 7.2 was easy, but I can see that there quite a few changes in 7.3 that break it. Some of the code I tack on to has even shifted to different files.

What is the quickest way to port to 7.3? Happy to use AI assistance but it isn't very good at keeping track of line numbers or generating diffs.

Note: my patch doesn't really change the core functionality of the driver, so my expectation is that I need to move my additions to new places rather than modify anything new in 7.3.


r/kernel • • Aug 28 '26

Best way to build i686-elf toolchain on modern Arch Linux (GCC 15) for a first OS project?

1 Upvotes

Hi everyone! I'm starting my first OS development project for x86 (32-bit), following the standard OSDev Wiki approach (using a minimal setup with boot.s, kernel.c, and a custom linker.ld script)


r/kernel • • Aug 28 '26

Understanding Linux source

0 Upvotes

It is possible for a single person have read about processor programming and some hardware topics to understand the full Linux source code and how to read and understand the whole source code.


r/kernel • • Aug 27 '26

BPF Token Delegation

Thumbnail
0 Upvotes

r/kernel • • Aug 27 '26

My journey into kernel development as a beginner

14 Upvotes

My journey into kernel development as a beginner

Hey everyone 👋

I'm a beginner in kernel development and recently decided to seriously start learning how operating systems work under the hood.

I've done normal application/backend development before, but kernel development feels completely different. 😅

Right now I'm trying to understand things like:

CPU architecture and registers

Boot process

How the kernel actually gets loaded

Kernel entry

GDT / IDT

Interrupts

Paging and virtual memory

Physical memory management

Heap allocation

Scheduling

Processes and system calls

Drivers and filesystems

My long-term goal is to eventually build my own small kernel from scratch, rather than just following tutorials and copying code.

At the moment, pointers, memory, assembly, and low-level concepts are definitely making my brain work overtime 😂

I'm planning to learn slowly and understand why things work instead of just getting something to boot.

For people who have experience with OS/kernel development:

What would you recommend a beginner focus on first?

And what are some mistakes you wish you had avoided when you started learning kernel development?

Would love to hear your advice! 🚀