/r/kernel
A moderated community dedicated to technical discussion about the Linux kernel.
Welcome to /r/kernel, a moderated community dedicated to all things about the Linux kernel. Technical articles only, please!
You may be interested in the following links:
And some books:
Related Communities
/r/kernel
hello, quick question, what does "runtime" mean in programming?
for example, i can go to wikipedia and go to
https://en.wikipedia.org/wiki/Runtime
and it's giving me several different things that runtime could mean, so i wanted to ask, what is runtime to you?
thank you
You are more than welcome to disagree with the decisions and opinions expressed by anyone in the upstream community, including Linus, so long as you express your opinion on the matter in a measured and respectful way. This subreddit is to some degree meant to reflect the culture of the Linux kernel community. You can call it like you see it, and say things that may otherwise be considered somewhat “mean”, “prickly”, or overly direct in normal circles. In other words, for the most part, this community can reflect the tone and standards followed on LKML, and it will be fine.
What we absolutely will not tolerate is calling anyone a derogatory slur, or make offensive comparisons that are grossly slanderous. For instance, do not call someone a nazi because you disagree with them, or compare them to Hitler. Doing so will result in an instant ban, no warning.
It’s sad that this even needs to be said, but this latest unfortunate and understandably controversial news about banning Russian maintainers has resulted in some of the worst takes I’ve ever seen.
That is all.
Speaking from a demand perspective, what skill set is typically more needed by more companies? Of course the two disciplines are relatively niche and most companies don't need either. Regardless, I am curious to know!
Is it viable to do kernel dev on wsl2 or not? I wish I could use arch which I have but games hold me back so I need something that is not as slow as a vm but fast and just works ootb aka wsl 2. TIA
Hi,
I created a kernel module that implements a dynamic queue within a Kernel module for educational purposes.
It supports IOCTL so that userspace programs may communicate with it.
It might be helpful for beginners.
message d'erreur kernel/makefile:1926: .] error 2
Hello everyone, I'm a master's student, soon to become a computer engineer. After a long journey searching for the right project idea for my degree, I knew I wanted to focus on something related to operating systems, low-level programming, or networking. However, I was unsure about the exact direction, especially since I now lean more toward software-oriented work. Recently, I came across an interesting theme: "Low-Latency Kernel Bypass Framework for High-Performance Networking." I'm considering pursuing this idea, but I have a few concerns. Is it feasible to complete within a one-year period? Also, would this project be a case of reinventing the wheel, given that some existing tools already perform similar tasks? if you have better project ideas please feel free to share them here! THANK YOU!!
ok, so i'm doing research for a new laptop, and when i look for a new laptop i like to get a laptop with two drives, one that is ssd for my linux operating system
and another that is hdd for all my files, i like to encrypt both of them with two different passwords.
now, i have been doing research into buying a new laptop, and i can't find any laptops with both a hdd and sdd, it's either one or the other.
so i wanted to ask, is this a feature that linux's encryption "luks" can do for me?
1_can i make two paritions on the same sdd drive,
2_can it encrypt both when two different passwords
3_can one the operating system partition be unencrypted while my file partition be encrypted?
4_how can i do this? how can i set this up on my new laptop? what would i need to do when i format and install linux on my new laptop?
Hi,
I'm following the A Beginner's Guide to Linux Kernel Development (LFD103) course and I a bit confused about one part.
According to the tutorial, I should be cloning :
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
But after looking a bit at https://git.kernel.org/ there is no linux-stable.git
There are :
|| || |kernel/git/stable/linux.git|Linux kernel stable treekernel/git/stable/linux.gitLinux kernel stable tree|
|| || |kernel/git/stable/linux-stable-rc.git|Linux Stable -rc releaseskernel/git/stable/linux-stable-rc.gitLinux Stable -rc releases|
And I don't know which one is the correct one to use.
Any help is appreciated.
Thank you.
How do you testrace conditions to see if the written logic works ?
Or, in general how do mutex providers (kernel) test their code ?
What are the involved tools ?
How can I mimic a race to check a piece of code ?
I'm looking at an SoC with a reconfigurable L2 cache, some can be RAM some can be L2 and you can dynamically allocate it before any OS comes up.
Its 2MB total but in reality the out of the box set up is 1MB as cache. Looking at the dt for the device its set as 2MB in the dt.
I'm guessing this would have some impact on performance but the scale of the impact I'm not sure of. Can anyone explain what this might be? Linux thinking it has a 2MB L2 and actually only having 1MB.
Not sure if I can post this here, but I've been trying to compile an android kernel (source) and got this error:WARNING: vmlinux.o(.data+0x1f3288): Section mismatch in reference from the variable modem_spi_boot_driver to the function .init.text:modem_spi_boot_probe()
The variable modem_spi_boot_driver references
the function __init modem_spi_boot_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
I'm not sure exactly what this means or what I would have to do to fix it. I'd really appreciate any help I could get.
EDIT: just tried compiling the Pixel OS kernel (source) for the same phone and got the same error. It might not be an error with a kernel, but something wrong with my build environment instead. I'n not sure how I would fix that either.
If a page is allocated using GFP_HIGHUSER, and its type is MIGRATE_UNMOVABLE as obtained through get_pageblock_migratetype, will this page be reclaimed? My current understanding is that as long as the page type is MIGRATE_UNMOVABLE, it will neither be migrated nor reclaimed. However, I'm not sure if this is correct. I've been searching online but haven't found a definitive answer, and I couldn't find any explanation in the official documentation either. I would greatly appreciate it if someone could clarify this for me. Thanks!
hello, i'm doing researching into process 0 and i can't seem to get answers on the most basic questions?
what is process 0?
what does it do?
why does it do it?
and so i wanted to ask here and ask what is process 0?
i checked around online and found this
https://blog.dave.tf/post/linux-pid0/
and this
https://superuser.com/questions/377572/what-is-the-main-purpose-of-the-swapper-process-in-unix
but i can't seem to get answers for basic questions, so i thought you guys might know
thank you
Does anyone know of something like a Thunderbird (or any other email application) plugin, configuration, template, etc. that enforces the Linux Kernel Mailing List conventions? In-line replies, plain text, possibly some integration with Git or syntax highlighting for patches.
I have been manually composing and formatting replies in Vim, and then sending with git-send-email. It does the job, but gets really tedious.
I'm sure most Linux kernel developers know some black magic to do all of the above with command line tools, but I'm very GUI-centric.
so i was wondering what do i need to know in C for linux kernel development.
Hello all,
I have been using Linux since 2.4 or so but never contributed beyond man pages translations. I just exited corporate workforce and am hoping to devote my remaining productive years to the open source cause, specifically Linux. I have a basic understanding of os dev and Linux kernel module development.
My question is, where do I start if I want, at some point, to contribute code? Is there a list, of sorts, of backlog items that need to be picked up? Or maybe a ticket/issue backlog? I know I need to start at the bottom but the question is, where is it?
Thank you!
On gentoo wiki then have a section here [firmware_blobs](https://wiki.gentoo.org/wiki/AMDGPU#Firmware\_blobs\_for\_a\_known\_card\_model)
I want to know do I need to update these in the future / is there a reason to update them?
If so, how do I know what to include?
Example here:
amdgpu/gc_11_5_1_imu.bin amdgpu/gc_11_5_1_me.bin amdgpu/gc_11_5_1_mec.bin amdgpu/gc_11_5_1_mes1.bin amdgpu/gc_11_5_1_mes_2.bin amdgpu/gc_11_5_1_pfp.bin amdgpu/gc_11_5_1_rlc.bin amdgpu/psp_13_0_10_sos.bin amdgpu/psp_13_0_11_ta.bin amdgpu/smu_13_0_10.bin amdgpu/dcn_3_5_dmcub.bin amdgpu/sdma_6_1_1.bin amdgpu/vcn_4_0_6_1.bin amdgpu/navi10_vcn.bin amdgpu/navi10_ta.bin amdgpu/navi10_sos.bin amdgpu/navi10_smc.bin amdgpu/navi10_sdma1.bin amdgpu/navi10_sdma.bin amdgpu/navi10_rlc.bin amdgpu/navi10_pfp.bin amdgpu/navi10_mec.bin amdgpu/navi10_me.bin amdgpu/navi10_gpu_info.bin amdgpu/navi10_ce.bin amdgpu/navi10_asd.bin
That does not work, and I don't know why because they are all the modules I would need.
But if I use their documentation/versions, it works no problem.
Edit1:
I'm on `NAVI31`
I was wondering how it looks of someone working on the kernel and wanted to copy what they use lol.
Hello, I would like to share and receive feedback about two things I have been working on recently.
First I am writing a set of scripts to ease the kernel development workflow. I started with `virtiofsd` and `qemu`, assuming you have a system tree on your host's filesystem (for easy deployment of stuff like modules), my scripts make the workflow a tiny bit easier than writing long `qemu` command-lines.
I can't know whether it's good or not and will accept any feedback.
I plan on incorporating kernel build module there soon, including a `make modules_install` deploy of modules and support for `ccache` with both gcc and clang.
Since I often boot with `init=/bin/bash` for kernel development purposes, I added a small bash script option for that.
Here's the repo for that: https://github.com/devlavender/kdev-utils
Like I said, I'm eager to hear your feedback!
Moreover, since I always lose my kernel config files and had to make a "minimal" config for kernel development/testing purposes a thousand times to work with `virtiofsd`, I also created a repo with a "minimalist" (not that much, there's a lot to strip out yet) kernel config for this setup as well.
https://github.com/devlavender/agatha-kernel-config
I'm also accepting feedback! I will create variations for building with `clang` as well, for now there's just a gcc variation. I will appreciate any feedback, like options I could securely turn off to reduce compile time and, if possible, image size, increase boot time, etc.
I will also make variations for kgdb support possibly soon!
I'm eager to hear from you people! :D
Howdy!
Simple question as in the title - are there any specific social-media-like sources, that you follow on the regular basis? Of course related to the kernel development. Obviously I omit here LWN and mailing lists in general ;)
How do I contribute to the linux kernel and learn about things like drivers dev etc? I am learning C and I have always wanted to contribute to the kernel so I am open to recommendations from all of you, tia.
EDIT: I FOUND SOME BOOKS MYSELF FROM HERE, WHAT ARE YOU THOUGHTS ON IT?
Linux System Programming: Talking Directly to the Kernel and C Library by Robert Love
https://lwn.net/Kernel/LDD3/ - this one is pretty old so does anyone know if its any good or if there is a newer version out there?
Hi! Something in Linux kernel filters out duplicated keyboard events. For example, my keyboard has two whitespace buttons, if I hold them both and then release both (release one whitespace, and then release another whitespace), I can read only one input_event
from device file descriptor (e.g. /dev/input/eventX), and the second physical key release gets completely ignored.
I thought that maybe keyboard itself does it, but I can observe the same behavior if I inject a key release event for the key artificially, and then release a button physically on the keyboard - I read only one release event back (the one I artificially injected). Does anyone know where it happens in the kernel and if there's a way to get both events somehow? I've tried to read input.c, evdev.c and some usb hid driver related code, but I haven't found anything by just looking at the code, and I'd rather ask before I dig deeper at this point.
UPD: Alternatively, could libinput do something like this? Like, grab a device event file and mess with its stream?
Hello,
I try to improve the code quality of our OOT Module using static analyzers.
We already use the checkpatch.pl
script and run-clang-tools.py clang-analyzer
but would like to use smatch
, too.
I already tried running smatch
with
KDIR=/usr/src/linux-source-6.1 CHECK="~/builds/smatch/smatch -p=kernel" make C=2 -d
but could not find a call to smatch
in the verbose print-out (I tried absolute path to smatch as well, no difference). The make process claims to run CHECK, though, so I'm a bit confused here.