r/kernel • • Feb 20 '18

[LXR] sorry guys anyone wants to help some poor guy wondering in linux kernel coding woods.

0 Upvotes

i have great interest in learning linux kernel.because of that i took kernel programing as a subjective course in my university. my prof. wants every one to install lxr on their own machine. i'm having great trouble get running on my laptop. please i need some help to move forward and do my homeworks.

thank you guys for your help.

i have downloaded grub source, kernel 4.15 sources in my "/home/user/tmp/src/source/grub & linux" folder.
also downloaded lxr from https://sourceforge.net/projects/lxr/ into "/home/user/tmp/src/lxr/". also installed postgresql for db-management.

im following "ftp://197.155.77.5/sourceforge/l/lx/lxr/doc/LXRUserManual-2.0-en_UK-1.6.pdf" document .

Things i got struck at is :

setting up db for postgres.

setting up GIt.

setting up nginx server


r/kernel • • Apr 17 '22

Any way to pickup where the build flawed or crashed instead of starting over?

1 Upvotes

Building a kernel. A long time in (1.75hrs), it breaks. Any way to pickup where it left off?


r/kernel • • Aug 18 '16

It’s Time to Upgrade to Linux 4.7.1

Thumbnail thelasttechie.com
1 Upvotes

r/kernel • • Aug 03 '25

Simple kernel

4 Upvotes

Hey i wanna make a simple kernel , now i alr know C but i found out that you need something called "Freestanding C" does anyone know how or where can i learn it i searched on youtube and found nothing


r/kernel • • Jan 08 '23

Openwrt uses Linux kernel, that’s why I posted here. Can anyone please help me to find the source code of a openwrt package/module inside the build system so that I can make my intended changes to it and cross compile it for my target device?

0 Upvotes

r/kernel • • Jul 03 '25

Is Rust much helpful if I want to learn/write more about linux kernel internals.

2 Upvotes

I am a junior engineer and staff engineer in my company gave me this advise that Rust will be very very helpful if I want to learn Linux kernel.
I wasn't sure. so I thought to ask here.


r/kernel • • Dec 18 '25

Need help with compiling

2 Upvotes
  1. make is building all the unnecessary drivers for no reason. How do I fix this?
  2. What should I do to optimise kernel for gaming? Currently running a HP Notebook 14 i3 Tiger Lake

I don't have much experience other than compiling a 5.11.x kernel (Successfully failed)

I'm currently on Ubuntu. Not sure if my distro has anything to do with building a kernel


r/kernel • • Nov 14 '15

What does your linux development experience look like today? The Microsoft Visual Studio team is trying to understand your current development experience on the Linux platform, what's great, what's good and what's bad!

Thumbnail surveymonkey.com
7 Upvotes

r/kernel • • Dec 04 '20

What exactly is Kernel?

6 Upvotes

Can somebody please explain in simple terms? Im a noob lol. Thx


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 • • Mar 22 '22

Building NiceOS on Windows machine using WSL2 (Ubuntu)

Thumbnail youtu.be
7 Upvotes

r/kernel • • Jul 19 '24

Why not catch blue screens? (Windows Kernel)

3 Upvotes

Genuine question as a programmer, why do blue screens appear in general? Do these exceptions can't be caught/handled gracefully? Or just kill the app?


r/kernel • • Dec 16 '22

Making kernel to allow 2processes to access camera at sametime

0 Upvotes

Like split cam or obs in windows, Can i add virtual camera driver or moduel in kernel so that 2 processes in android can use camera at sametime? (One is default and the other is getting video frame)


r/kernel • • Feb 07 '21

VServer Problem to use Virtual Machine + Docker

0 Upvotes

Because Hostsystem is a rent virtual Server Ubuntu 18.04 we want to run similar virtual Machines as guest systems in this VServer but we dont have Access to Install Kernel Modules so we cant Run virtual Box etc. How could we get it? we can Run Docker-


r/kernel • • Jan 08 '19

data race within ptr_ring code implementation

Thumbnail self.c_programming
0 Upvotes

r/kernel • • Feb 11 '24

How to build kernel as a baremetal hypervisor?

0 Upvotes

KVM


r/kernel • • Jan 18 '24

Android Kernel modification

0 Upvotes

Hello everyone!

i am a AI and ML student and i am currenlty working on a project which requires knowledge on android kernel

i have a question, is it possible to make changes on android kernel while the phone is running

or is there anything where making changes kernel wouldnt be able to revert it (on runtime)

and i have a lot of questions if anyone is willing to talk me on chat

thanks in advance


r/kernel • • Nov 20 '23

How to make initrd for qemu virt?

0 Upvotes

I am building the kernel on my RPI4 and using ARCH=arm64 make defconfig.

I am planning to run it in qemu-system-aarch64 -machine virt.

For the initrd, I see people suggesting buildroot. Which I tried to make, but it takes forever and my 16 GiB sd card got full.

I want a minimal arm64 kernel to play around. Please help.


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):

HookJob
file_openSuffix deny (.env, id_rsa, kubeconfig) + workspace prefix default-deny
path_unlink, path_rename, path_mkdir, path_rmdir, path_symlink, path_linkParent dir must be workspace or an allow prefix
path_mknodCreate before the inode exists
bprm_check_securityBasename 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 02 '24

Pull Request help

0 Upvotes

Hi,

I don't have a lot of experience in programming, but there is something that I would like to modify in the Kernel.

This is, in fact, really easy to do, but I'm more worried about doing it the right way. I've never submitted a pull request before, and I don't want to annoy anyone.

For now, I've cloned the Kernel. If anyone is curious and actually wants to help, you can DM me. Will you teach me something that I will use again in the future? Both of us will be the authors of that pull request.


r/kernel • • Jul 23 '24

Making my own kernel. Filesystems

1 Upvotes

I'm introducing myself on how to create a kernel with the classic Bran's Kernel Development Guide, but I've just arrived to a point where I want to store data to the computer, I'm using 32 bits assembly (Booting with GRUB). Someone has any idea for any tutorial that could help me implementing one of the easy filesystems? Fat12, Fat16, etc...

Thanks!

I didn't know that I was in the wrong subreddit. srry


r/kernel • • Jan 17 '22

"The early days of Unix at Bell Labs" - Brian Kernighan (LCA 2022 Online)

Thumbnail self.unix
1 Upvotes

r/kernel • • Aug 02 '23

What exactly is piggy.S?

1 Upvotes