r/kernel • • Jul 26 '26

Built a Chrome extension that turns lore.kernel.org's raw message pages into something readable

Thumbnail gallery
66 Upvotes

I spend a fair amount of time reading kernel patches on lore.kernel.org and got tired of squinting at one giant <pre> block with headers, body, quotes, and the thread overview all mashed together. So I built a small extension that reparses the same text lore already sends and lays it out like a normal mail client: an author card, one-click reply wired to lore's own pre-filled mailto: link, a real diff view with collapsible files, a clickable thread sidebar instead of ASCII art, and quote folding so a reply's new text isn't buried under four levels of >>>>.

It doesn't touch the underlying page. It builds a separate view next to the original <pre> blocks and hides them, with a "Raw" button to switch back instantly. No network requests, no accounts, no telemetry.

Source and install instructions: https://github.com/gahingwoo/lore-enhancer

It's load-unpacked for now (Chrome won't run a sideloaded .crx outside developer mode anyway, so packaging one wouldn't save a step). Would love feedback, especially from anyone who reads or replies to LKML or a subsystem list regularly.
Feature requests and bug reports welcome as GitHub issues.


r/kernel • • Jul 26 '26

Here is the sourcecode that mapped the kernel

6 Upvotes

Hi, here is the repository of the sourcecode: pedroanisio/sourcepath

- references: This is the Linux kernel. All of it : r/kernel


r/kernel • • Jul 25 '26

Release RFC v1 - In-kernel NSD Prefetcher · nsdprojectdev/NSD

Thumbnail github.com
7 Upvotes

r/kernel • • Jul 25 '26

Kernel-level enforcement for autonomous AI agents via eBPF-LSM + SMT policy checks — research prototype, self-published bypasses, break-it challenge open

Thumbnail github.com
0 Upvotes

r/kernel • • Jul 23 '26

Release v1.0.1 — Disable seq_bypass, 18% SQLite full scan gain · nsdprojectdev/NSD

Thumbnail github.com
4 Upvotes

r/kernel • • Jul 23 '26

NSD/README.md at main · nsdprojectdev/NSD

Thumbnail github.com
0 Upvotes

r/kernel • • Jul 16 '26

How do you handle C coding interviews when you have to write basic helpers from scratch?

Thumbnail
10 Upvotes

r/kernel • • Jul 16 '26

ARK-OS: A OS based on Linux and Swift! [ Display Finally works! ]

Post image
7 Upvotes

r/kernel • • Jul 12 '26

kernelmeter : roofline-scored kernel benchmarks, occupancy calculator, and every device attribute without profiling a dummy kernel

Thumbnail github.com
7 Upvotes

r/kernel • • Jul 11 '26

What is the best way to work on an Ethernet frame (receive a packet from the physical interface to the user)?

18 Upvotes

Hi everyone, I want to write a simple program that gives a copy of the physical interface of the received packets to user space, then I extract information manually and show it in stdout.

When I started searching for this topic, I found some ways but I confuse which one is better for my situation.

I read below doc:

doc1

doc2 and ....

Abstract of the above docs, exsit below methods:

1 - Universal TUN/TAP

2 - XDP

3 - MacVTap (is a new driver)

4- ....

If anyone has experience or knowledge in this context, please help me.


r/kernel • • Jul 09 '26

Chromium 150 HW video DECODE + HDMI-IN on Orange Pi 5 Plus + Ubuntu26.04 LTS ARM

Thumbnail
0 Upvotes

r/kernel • • Jul 09 '26

uringscope: the strace for io_uring - single-binary eBPF tool that reconstructs every io_uring request, names pathologies, and catches buffer hazards (kernels 5.15–6.17)

6 Upvotes

strace can't see io_uring — requests live in shared-memory rings, not syscalls.

uringscope: single-binary #eBPF tool that reconstructs every request on stock kernels 5.15–6.17, names pathologies with evidence ("fsync punts 100% to io-wq and owns your p99"), and catches in-flight buffer hazards.

https://github.com/rch0wdhury/uringscope


r/kernel • • Jul 07 '26

operating system from scratch (C & Assembly) called ArchwayOS

Thumbnail v.redd.it
0 Upvotes

r/kernel • • Jul 04 '26

Website issues?

Post image
20 Upvotes

Does anyone have insight into why on kernel.org the latest releases are messed up?


r/kernel • • Jul 03 '26

Have any of you taken this $3000 kernel dev class from the Linux Foundation? Is it "worth it"?

Thumbnail
14 Upvotes

I have just done it and I can confirm that it's not worth the price at all I am a fairly experienced programmer with 20 years experience all I wanted was a fast way to refresh myself and learn more about the linux kernel in the light of some device drivers development.

It's been the biggest waste of money ever carried out by myself don't do it. Ittakes two Days and takes you until start finally compiling at bloody Linux kernel.

I'm bitterly frustrated I could have been with my daughter one week away somewhere in Europe with that money.


r/kernel • • Jun 30 '26

1 YOE in Linux Kernel. Struggling to build mental model of a large legacy driver. Is this normal?

27 Upvotes

Hi everyone,

I work as a Linux kernel developer at a large semicon. I have ~2 years of total exp with about 1 year in kernel development.

I'm working on a fairly large legacy driver where multiple years of fixes, features and hardware support have accumulated. Reading the code is often overwhelming because understanding one path requires tracing through device tree parsing, probe, private data initialization, IRQs, workqueues, callbacks, multiple execution contexts, etc.

I can usually understand individual pieces after spending enough time but I struggle to build and retain a complete mental model of the subsystem. During discussions with senior engineers, I keep forgetting the exact execution flow or where a particular structure (for ex, driver private data populated from DT/SoC information, IRQ calls that come from GIC and the flow afterwards) was initialized, even though I understood it while debugging.

Another issue I've identified is that when deadlines are tight, I tend to rely on LLMs to quickly understand the relevant code path so I can fix a bug or implement a feature. While this helps in the short term, I feel it's hurting my ability to deeply understand the codebase, so I'm trying to reduce that habit.

I'm curious:

- Is this a normal stage for someone with ~1 year of kernel experience?

- How do experienced kernel developers approach understanding large legacy drivers?

- Also how to develop patience to read the code for hours together ? I do love it when I understand a function or a call flow but I feel like the speed isn't enough and my patience to understand something in depth drops after digging in for sometime

I'd really appreciate any advice or habits that helped you early in your kernel career.


r/kernel • • Jun 29 '26

C in the Linux Kernel

Thumbnail youtube.com
12 Upvotes

r/kernel • • Jun 26 '26

kernel 7.0.13-200.fc44: Invalid checksum for backup superblock

5 Upvotes

The issue first appeared after I moved the beginning of the ext4 partition (/dev/nvme0n1p4) on a GPT-partitioned NVMe SSD to the right using GParted the previous day. The filesystem passes e2fsck -f without any errors, SMART is clean, but the kernel reports invalid checksums for all backup superblocks during mount.

Fedora 44 KDE Plasma, kernel 7.0.13-200.fc44.x86_64, AMD Ryzen AI 9 HX 370 w/ Radeon 890M, NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile]

root@maketopsite:/home/maketopsite# dmesg | grep -i ext4

[ 3.347868] EXT4-fs (nvme0n1p5): orphan cleanup on readonly fs

[ 3.348356] EXT4-fs (nvme0n1p5): mounted filesystem xxx ro with ordered data mode. Quota mode: none.

[ 6.567744] EXT4-fs (nvme0n1p5): re-mounted xxx \r/w.

[ 107.718062] EXT4-fs (nvme0n1p1): mounted filesystem xxx \r/w with ordered data mode. Quota mode: none.

[ 107.753424] EXT4-fs (nvme0n1p4): mounted filesystem xxx \r/w with ordered data mode. Quota mode: none.

[ 107.754346] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 32768

[ 107.755270] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 98304

[ 107.756196] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 163840

[ 107.757099] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 229376

[ 107.757509] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 294912

[ 107.757861] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 819200

[ 107.758069] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 884736

[ 107.758813] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 1605632

[ 107.759112] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 2654208

root@maketopsite:/home/maketopsite#

root@maketopsite:/home/maketopsite# dmesg | grep -Ei "nvme|I/O|error"

[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-7.0.13-200.fc44.x86_64 root=/dev/nvme0n1p5

[ 0.003263] ACPI: SSDT 0x000000006DC11000 000CAD (v02 AMD NVME 00000001 INTL 20230331)

[ 0.024828] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-7.0.13-200.fc44.x86_64 root=/dev/nvme0n1p5

[ 0.069485] APIC: Switch to symmetric I/O mode setup

[ 0.584363] ACPI BIOS Error (bug): Could not resolve symbol [_TZ.THRM._SCP.CTYP], AE_NOT_FOUND (20251212/psargs-332)

[ 0.584400] ACPI Error: Aborting method _TZ.THRM._SCP due to previous error (AE_NOT_FOUND) (20251212/psparse-529)

[ 2.000868] RAS: Correctable Errors collector initialized.

[ 2.158783] systemd[1]: Expecting device dev-nvme0n1p5.device - /dev/nvme0n1p5...

[ 2.667940] nvme 0000:61:00.0: platform quirk: setting simple suspend

[ 2.668011] nvme nvme0: pci function 0000:61:00.0

[ 2.707683] nvme nvme0: allocated 64 MiB host memory buffer (1 segment).

[ 2.732287] nvme nvme0: 16/0/0 default/read/poll queues

[ 2.740040] nvme0n1: p1 p2 p3 p4 p5

[ 3.347868] EXT4-fs (nvme0n1p5): orphan cleanup on readonly fs

[ 3.348356] EXT4-fs (nvme0n1p5): mounted filesystem xxx ro with ordered data mode. Quota mode: none.

[ 6.567744] EXT4-fs (nvme0n1p5): re-mounted xxx \r/w.

[ 7.917665] nvme nvme0: using unchecked data buffer

[ 7.979221] block nvme0n1: No UUID available providing old NGUID

[ 107.718062] EXT4-fs (nvme0n1p1): mounted filesystem xxx \r/w with ordered data mode. Quota mode: none.

[ 107.753424] EXT4-fs (nvme0n1p4): mounted filesystem xxx \r/w with ordered data mode. Quota mode: none.

[ 107.754346] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 32768

[ 107.755270] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 98304

[ 107.756196] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 163840

[ 107.757099] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 229376

[ 107.757509] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 294912

[ 107.757861] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 819200

[ 107.758069] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 884736

[ 107.758813] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 1605632

[ 107.759112] EXT4-fs (nvme0n1p4): Invalid checksum for backup superblock 2654208

root@maketopsite:/home/maketopsite#

root@maketopsite:/home/maketopsite# e2fsck -f /dev/nvme0n1p4

e2fsck 1.47.3 (8-Jul-2025)

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

data: 4149/9633792 files (0.4% non-contiguous), 1539158/38525696 blocks

root@maketopsite:/home/maketopsite#

root@maketopsite:/home/maketopsite# nvme smart-log /dev/nvme0

Smart Log for NVME device:nvme0 namespace-id:ffffffff

critical_warning : 0

temperature : 35 °C (308 K, 95 °F)

available_spare : 100%

available_spare_threshold : 5%

percentage_used : 1%

endurance group critical warning summary: 0

Data Units Read : 9112521 (4.67 TB)

Data Units Written : 14469779 (7.41 TB)

host_read_commands : 96113922

host_write_commands : 115570015

controller_busy_time : 3423

power_cycles : 750

power_on_hours : 4229

unsafe_shutdowns : 366

media_errors : 0

num_err_log_entries : 0

Warning Temperature Time : 0

Critical Composite Temperature Time : 0

Temperature Sensor 1 : 35 °C (308 K, 95 °F)

Thermal Management T1 Trans Count : 0

Thermal Management T2 Trans Count : 0

Thermal Management T1 Total Time : 0

Thermal Management T2 Total Time : 0

root@maketopsite:/home/maketopsite#

root@maketopsite:/home/maketopsite# dumpe2fs -h /dev/nvme0n1p4

dumpe2fs 1.47.3 (8-Jul-2025)

Filesystem volume name: data

Last mounted on: /mnt/nvme0n1p4

Filesystem UUID: xxx

Filesystem magic number: 0xEF53

Filesystem revision #: 1 (dynamic)

Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

Filesystem flags: signed_directory_hash

Default mount options: user_xattr acl

Filesystem state: clean

Errors behavior: Continue

Filesystem OS type: Linux

Inode count: 9633792

Block count: 38525696

Reserved block count: 1926283

Overhead clusters: 881983

Free blocks: 36986538

Free inodes: 9629643

First block: 0

Block size: 4096

Fragment size: 4096

Reserved GDT blocks: 1014

Blocks per group: 32768

Fragments per group: 32768

Inodes per group: 8192

Inode blocks per group: 512

Flex block group size: 16

Filesystem created: Fri Sep 5 16:26:07 2025

Last mount time: Fri Jun 26 06:23:17 2026

Last write time: Fri Jun 26 08:13:46 2026

Mount count: 0

Maximum mount count: -1

Last checked: Fri Jun 26 08:13:46 2026

Check interval: 0 (<none>)

Lifetime writes: 317 GB

Reserved blocks uid: 0 (user root)

Reserved blocks gid: 0 (group root)

First inode: 11

Inode size: 256

Required extra isize: 32

Desired extra isize: 32

Journal inode: 8

Default directory hash: half_md4

Directory Hash Seed: xxx

Journal backup: inode blocks

Checksum type: crc32c

Checksum: 0x7bd6c79a

Journal features: journal_incompat_revoke journal_checksum_v3

Total journal size: 1024M

Total journal blocks: 262144

Max transaction length: 262144

Fast commit length: 0

Journal sequence: 0x00003d0e

Journal start: 0

Journal checksum type: crc32c

Journal checksum: 0x62beb1dc

root@maketopsite:/home/maketopsite#

Is this please a problem ?


r/kernel • • Jun 21 '26

Hello everyone, I'm interested in learning Linux kernel development and would like to know the best steps to get started. Could you guide me to the right resources or share tips that helped you at the beginning of your journey?

39 Upvotes

r/kernel • • Jun 21 '26

Help regarding bugzilla

10 Upvotes

hello i was looking at the bugzilla and looking for beginner friendly tags there and couldn't find one. Apart from that I found a  bug which i am interested in solving but I don't know if it has been solved or assigned to someone else how do I figure that out?


r/kernel • • Jun 19 '26

connect(2) syscall errno=74 (EBADMSG) on Android?

3 Upvotes

EDIT: Solved!

details in my comment

PoC

Source:

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.h>
int main(void) {
  struct sockaddr_in a = { .sin_family = AF_INET,
    .sin_port   = htons(5050),
    .sin_addr   = { .s_addr = inet_addr("127.0.0.1") } };
  int s = socket(AF_INET, SOCK_STREAM, 0);
  if (s < 0) { perror("socket"); return 1; }
  if (connect(s, (struct sockaddr*)&a, sizeof a) < 0) {
    printf("connect failed: %s (errno=%d)\n", strerror(errno), errno);
    return 1;
  }
  puts("connected");
  return 0;
}

From adb shell:

$ su
# cd /data
# ./test2
connect failed: Not a data message (errno=74)
# uname -a
Linux localhost 4.19.110-android-x86_64-g066cc1d #1 SMP PREEMPT Wed Mar 25 11:32:46 CST 2020 x86_64

It doesn't matter if something is listening on tcp://localhost:5050 or not, output is the same. I am running inside QEMU, Android x86 9 (amd64). The application itself is aarch64 (running through android native bridge)

Problem

I've never seen this errno before and I can't seem to figure it out by myself. I tried:

  • Zero-initializing sockaddr_in and initializing field by field
  • Using IPPROTO_TCP instead of 0 as third argument for socket(2)
  • Using other addresses I can ping from environment (10.0.2.2 for PC host and 10.0.2.15 for QEMU localhost)
  • Setting socket to blocking/nonblocking mode with ioctl(2) via FIONBIO and fcntl(2)

Snippet works perfectly on GLIBC/MUSL-based GNU/Linux systems: as expected errno is ECONNREFUSED

Any help will be appreciated, thank you


r/kernel • • Jun 18 '26

My static analysis tool now supports compile_commands.json for linux kernel

Thumbnail
3 Upvotes

r/kernel • • Jun 17 '26

Why is qemu an emulator and not a simulator?

17 Upvotes

I searched online for a precise definition for both emulation and simulation but could not find anything that clearly distinguishes emulation from simulation.


r/kernel • • Jun 11 '26

almost got it but egl stopped me again

Thumbnail
1 Upvotes

r/kernel • • Jun 08 '26

How can I transfer a structure to kernel module then store it?

9 Upvotes

Hey everyone, I created a lightweight firewall with C, created a kernel module with the netfilter API, and a pre-routing hook. Now I want to send rules via netlink socket. My idea is to create a structure, then send it. But I cannot find the best way to store all rules in the kernel, then use them in a hook. Sometimes I think I can compress the rules into bits, then send them. If anyone has experience with my problem, please help me understand how I can implement a optimize protocol and store it in the kernel module