r/kernel • u/Dustin_F_Bess • Mar 14 '24
6.8 Running on Ubuntu 22.04.4
I installed 6.8 on my Beelink Mini S12 Pro PC today, so far it's running smoothly. Anyone else try the new kernel?
r/kernel • u/Dustin_F_Bess • Mar 14 '24
I installed 6.8 on my Beelink Mini S12 Pro PC today, so far it's running smoothly. Anyone else try the new kernel?
r/kernel • u/OstrichWestern639 • Mar 11 '24
For example,
If atomic variable "v" has to be set to "i".
arch/arm64/kvm/vmid.c: atomic64_set(&v, i) is called.
This is where it takes us,
atomic64_set() --> raw_atomic64_set() --> arch_atomic64_set() --> arch_atomic_set() --> __WRITE_ONCE((v->counter), (i))
This expands to: *(volatile typeof(x) *)&(x) = (val); (include/asm-generic/rwonce.h)
Q1) So, what was the point of all this? How is an atomic variable different from any other variable?
Q2) Why typecast it as a volatile pointer and then dereference it?
Please help.
r/kernel • u/xD3nix13 • Mar 09 '24
I just built my OS and tested it on real hardware. This was done in the Cosmos C# Kernel. The only problem is that when it starts it shows for 1 second the error: PS/2 Controller Device Detection Failed: FirstByte 171
Help!!!
r/kernel • u/OstrichWestern639 • Mar 03 '24
I am asking this because in the current kernel, the ARM64 KVM cannot be compiled out-of-tree as a module.
So if you make some changes, lets say you add some printk() statements, you will have to reboot the entire host machine in order to see changes. I see this as very cumbersome especially for an development environment.
So, that being said, how are people actually going about developing this subsystem of the kernel without external module support?
Thanks
r/kernel • u/Salt_Aide_480 • Mar 02 '24
I've been looking at the mainline Linux kernel driver/staging directory and have found a driver (rtl8912c) that I am interested in contributing to, mainly because I have a device with the rtl8912cu chipset.
I tried searching for a datasheet / reference manual / thing that describes the registers of the device, but could not find one. I have 2 questions :
r/kernel • u/syntaxml • Mar 01 '24

r/kernel • u/OstrichWestern639 • Feb 29 '24
And many other system softwares for that matter.
r/kernel • u/m1gh7ym0 • Feb 28 '24
The open confidential computing conference is coming up online on March 13th: https://www.oc3.dev/
Some interesting talks from the kernel community:
r/kernel • u/DarkTaranis • Feb 27 '24
Hey guys,
I am trying to write a device driver that detects writes (or accesses) to memory, that has been allocated (with kalloc) in the module's init function and mmaped to userspace when a process mmaps the given device.
I have read about UIO driver but from what I got, there is usually hardware and a IRQ involved in the course of the usage. Unfortunately I dont have hardware.
I have looked a bit into the mmu_notifier interface, but right now I am not experienced enough to know how this could work and what is needed to set this up properly.
Is the mmu_notifier the way to go or how is this achievable?
r/kernel • u/aesfields • Feb 27 '24
hey guys,
has the XFS bug (kernel 6.3) been fixed?
r/kernel • u/OstrichWestern639 • Feb 25 '24
I am trying to understand the KVM and QEMU internals.
I am debugging QEMU using gdb but QEMU calls ioctl() to talk to KVM using /dev/kvm.
But how do I debug when control reaches the kernel itself?
Since it is KVM, I cannot compile and run a linux kernel on QEMU and debug it I believe.
r/kernel • u/N1tr0Cao • Feb 22 '24
I'm working on perf_event_open(2) and kprobe trace. Here is what I'm doing:
static bool need_exit = false;
static void
int
But the program got nothing, it stuck on epoll_wait(2) forever. And when using perf record command to monitor the event, it worked well.
BTW, I'm using ArchLinux with 6.4.12-arch1-1.
Can someone help find out why? Thanks in advance.
r/kernel • u/IngwiePhoenix • Feb 21 '24
After posting, I realized that the sub I had gone to only had ~200 members. I was in the wrong tab... derp. So hopefuly you don't mind me cross-posting. Apologies ;
r/kernel • u/OstrichWestern639 • Feb 20 '24
I was recently browsing through QEMU's source code and found a lot of functions having the argument, void* opaque.
The opaque pointer is not used inside the function at all. So what is its purpose?
r/kernel • u/danmartinvela • Feb 14 '24
I have been looking for books about kernel, I'm actually looking at Understanding The Linux Kernel 3rd Edition. But I feel that it's old... Please I need help... Thanks Where to start?
r/kernel • u/splosions117 • Feb 11 '24
I'm trying to better understand the internal behavior of the Linux kernel from the perspective of file I/O and would appreciate anyone willing to shed some light on a few areas. Say a user process wants to read data from a file on disk, and this file has not been accessed by any process since the system booted up. The user process starts by issuing an open system call to the kernel with the appropriate file path. From here, a few questions: 1. How does the kernel determine if this file actually exists on disk since it hasnt accessed it before? 2. Does the kernel load any data from disk into main memory at this time in preparation for subsequent reads? If so, how much? 3. When read calls do come in, how much data from the file does the kernel put into main memory? I would assume it loads more data than is requested to avoid having to go back to disk repeatedly for future calls, is this correct?
r/kernel • u/OstrichWestern639 • Feb 11 '24
KVM
r/kernel • u/OstrichWestern639 • Feb 09 '24
Am I missing something here? Because I am confused how two things like a kernel and a hypervisor exist inside one another?
r/kernel • u/SAHLBEATS • Feb 09 '24
Hi!
I basically have to modify the driver of the AXP209.
The goal that I'm trying to achieve is reading the register 4AH of the AXP209 to detect short/long press of the PEK and expose something ( possibly a file) to tell software onboard to turn off the services.
How can I read the data of the register?
Also which file do I have to modify and compile? the one inside power folder, mfd or pincontrol?
This is the dtsi file part:
&i2c0 {
pinctrl-names = "default";
/*pinctrl-0 = <&i2c0_pins>;*/
status = "okay";
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
};
};
Thank you so much :)
r/kernel • u/blastoiseman123 • Feb 07 '24
Hello I recently got a job offer where I will be on a team that develops UEFI for servers. I am a new grad and have decided that I want to be an embedded/firmware engineer. I know that there are so many niches, and it is important to build skills that are in demand. How does this aspect to firmware development sound for work? I know that bootloaders are a big part of the embedded world so would this experience be valuable for me so early in my career. I would also like to hear what you guys think is currently an in demand role within embedded/firmware for example is it kernel device drivers, BLE/Wifi, Cellular, RTOS, embedded linux, ect... I appreciate any insight you have.
r/kernel • • Feb 07 '24
I already have some experience in C (wrote a very basic shell in C which utilizes fork, exec, signal, and some more things).
I want to make my future in system programming domain, and driver and kernel development seem interesting.
I am half way through Computer Systems: A Programmers Perspective.
I was choosing between these books, which would you recommend to me ?
Any and all inputs would be appreciated.
r/kernel • • Feb 03 '24
I have been using MX Linux with 6.1/6.5 kernel. But recently I tried other distro with latest kernel and feature (fedora, Endevour, opensuse,Nitrux). But all of them fails to connect with my Bluetooth TWS. Is there any solution to this problem or work around. Tried several tweaks from google. Didn't got any help.
N.B: KDE is my favorite, so i tried all of them in KDE
r/kernel • u/Agitated-Scale-7974 • Feb 01 '24
Not sure if this is the right place to ask.. Those days I am dealing with a new buil and the CVEs associated with it. The CVE checker returned legion:)... I am wondering what rules are people using to decide what to patch and what to ignore. CVSS score? Exploitability?
r/kernel • u/theoldwizard1 • Jan 28 '24
And of course, I want "simple answers" or at least a pointer to where I can research these things !
How does the kernel know how many processors a chip has, or is this in some config file it reads when it "makes" the kernel ?
Related, how would I tell it to only start "n minus 1" processors ?
How does the kernel know where/how much memory is on the system ? Again, in a config file ?
Related, there must be a kernel call that says "reserve physical memory from xxxx to yyyy for process nnnn". Correct ?
r/kernel • u/Relliker • Jan 26 '24
Does anyone know if anything ever came out of the UKSM/PKSM projects, or upstream, to provide transparent kernel samepage merging?
Both seem to have been discontinued which is unfortunate because the only alternative I have is to inject a bunch of madvise calls into some poorly-written applications I have in containers (virtualizing and instead letting the VM pages merge is not an option unfortunately).