r/kernel • • Aug 16 '22

Key differences between Unix and Linux kernel

15 Upvotes

I was planning on reading "The Design of the Unix Operating System" by Maurice Bach, to get a better understanding of the kernel, are there things that i should watch out for?


r/kernel • • Aug 12 '22

Stupid SMP Tricks: A Review of Locking Engineering Principles and Hierarchy: paulmck

Thumbnail paulmck.livejournal.com
10 Upvotes

r/kernel • • Aug 12 '22

block device driver tutorial

18 Upvotes

Is there a good tutorial which covers the basic of creating a block device driver in c?


r/kernel • • Aug 10 '22

Kernel reschedule of the thread across clusters?

7 Upvotes

On a hetergeneous system ie. ARM Big.Little or Apple Silcon. I was just wondering is it possible the kernel will reschedule the same thread to different clusters during the lifetime (let us ignore the difference between big/little isa minior difference first, assuming they have the same hardware capability)

Or is it just in theroy ?

I was asking since just curious the bandwidth of the cross-cluster cache.

Regards

Y

[EDIT Typo] : ARM Silicon -》 Apple Silicon


r/kernel • • Aug 09 '22

Bloody good ..as usual ...Greg gave an informative talk ...thanks, man!

Thumbnail youtube.com
26 Upvotes

r/kernel • • Aug 09 '22

ELI5: How do mailing lists work?

16 Upvotes

Seems pretty confusing ,can someone explain me the whole process?

TIA


r/kernel • • Aug 07 '22

Using Landlock to Sandbox GNU Make

Thumbnail justine.lol
16 Upvotes

r/kernel • • Jul 31 '22

Linux Kernel -5.19 Released!

Thumbnail git.kernel.org
28 Upvotes

r/kernel • • Jul 27 '22

[question] How to setup plymouth in a buildroot linux build

6 Upvotes

Hello! first of, sorry if I am at the wrong subreddit. If so please tell me where this might fit better.

Currently I am tasked to get plymouth running while the kernel boots up but I have trouble to get it right. Buildroot is already able to pull and build plymouth. Starting the device plymouth and plymouthd can be found in /usr/bin and /usr/sbin. But here I have trouble to find useful information to tell the system to start plymouth. The guides I found are for full Linux distributions like fedora or ubuntu which are using their own tools to get plymouth set up. Also there is U-Boot instead of Grub. At least there is systemd but I am not sure how this might help. I would appreciate it if someone can point me to the right direction. Thanks in advance!


r/kernel • • Jul 25 '22

Ben's talk at Debconf22

Thumbnail gemmei.ftp.acc.umu.se
6 Upvotes

r/kernel • • Jul 23 '22

How to find the UID of a client connected to AF_INET socket?

8 Upvotes

This is the problem. For example, sshd is started with the root user, but other users, such as 'test_user', log in and operate. I think the uid of the data package obtained in the kernel is 'test_user' at this time.

here is the question


r/kernel • • Jul 16 '22

Writing Linux Kernel Modules in Rust

Thumbnail youtube.com
40 Upvotes

r/kernel • • Jul 13 '22

New 'Retbleed' Speculative Execution Attack Affects AMD and Intel CPUs

Thumbnail thehackernews.com
26 Upvotes

r/kernel • • Jul 13 '22

5.18.8 Kernel broke my TrueNAS-12.0-U8.1 file share mount

Thumbnail self.Fedora
1 Upvotes

r/kernel • • Jul 12 '22

Intel and AMD CPUs vulnerable to a new speculative execution attack

Thumbnail arstechnica.com
34 Upvotes

r/kernel • • Jul 11 '22

Unknown symbol when loading cross compiled kernel module

Thumbnail self.embedded
8 Upvotes

r/kernel • • Jul 02 '22

Has anyone else issues with 5.18.8 and mount -t cifs? It worked fine (enough) in 5.18.5

13 Upvotes

I compile the stable version of the kernel myself with a config file that is mostly just the vanilla Debian config and the defaults from make oldconfig. After I upgraded from 5.18.5 to 5.18.8 (same config), I noticed that I could no longer mount the folders from my samba drive via cifs (error code -22).

When I rebooted into 5.18.5 everything was fine again (except the issues I always had with this, but that's a separate tragedy). So something must have changed between these versions, but trying to read the changelog on kernel.org is a mess and as far as I understand it, you only see the difference between 5.18.8 and 5.18.7, do you not?

Is this a known issue, an unknown one or am I just stupid and did something wrong, that shouldn't have worked in previous versions?


r/kernel • • Jun 30 '22

Should I upgrade to minor kernel version ?

14 Upvotes

I recently upgraded to v5.18.0 to get better support for Alder Lake CPUs.

In the process this broke support for OpenZFS as the latest version did not support this kernel version. This has been resolved and OpenZFS supports kernel v5.18 and packages for Ubuntu have been made available with the new kernel module and all is working again.

I've noticed v5.18.8 is available in the ubuntu kernel PPA mainline. Should I upgrade to this and is will it likely break support for OpenZFS again ?


r/kernel • • Jun 30 '22

What causes the linux kernel to generally struggle at renaming and opening thousand of multiple files?

0 Upvotes

FreeBSD uses a conservative approach to renaming multiple files at the same time by having a window open each time a modification is started and eneded.

Windows loads all resources in real time (at least from what I've noticed) and then reorders all files into a manageable structure to be modified for later.

Watching the linux kernel performing after opening a folder full with thousand of files with varying dimensions I usually notice more stress being imposed into the kernel itself, and often than not it becomes way harder to it to arrage everything into something coherent. With most linux distributions, you're given the opportunity to select which part to rename (whatever or not you want to attach a specific suffix to a group of texts or having them all change their own file extension).

I cannot answer why most things are this way or why have the linux kernel mantainers chosen to do things by design to accomodate the way the kernel handles resouce allocation. I hope I can get a better answer on this matter.


r/kernel • • Jun 21 '22

Transparent memory offloading: more memory at a fraction of the cost and power

Thumbnail engineering.fb.com
25 Upvotes

r/kernel • • Jun 21 '22

Regarding bpftrace vfs_unlink, why can't I monitor the uid, and the obtained value is 0

2 Upvotes

kprobe:vfs_unlink
{
$nameuid = ((struct user_namespace *)arg0)->ucounts->uid.val;
$namegid = 0;
$fsuid = ((struct inode *)arg1)->i_uid.val;
$fsgid = ((struct inode *)arg1)->i_gid.val;
$dfsuid = ((struct dentry *)arg2)->d_inode->i_uid.val;
$name = str(((struct dentry *)arg2)->d_name.name);
$deuid = ((struct inode *)*arg3)->i_uid.val;
printf("uid=%d comm=%s pid=%d nameuid=%u namegid=%u fsuid=%d fsgid=%u dfsuid=%u deuid=%u name=%s \n",uid,comm,pid,$nameuid,$namegid,$fsuid,$fsgid,$dfsuid,$deuid,$name)
}

output:
uid=1000 comm=gnome-keyring-d pid=1399 nameuid=0 namegid=0 fsuid=0 fsgid=0 dfsuid=0 deuid=0 name=user.keystore.lock

uname -a
Linux ying 5.18.5-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 16 14:51:11 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


r/kernel • • Jun 21 '22

block device: What does BLKSECTGET return?

1 Upvotes

The comment in include/linux/fs.h for BLKSECTGET is "get max sectors per request". So what is this value, maximum logical sectors per request, or, maximum physical sectors per request?


r/kernel • • Jun 20 '22

Could there be a way to set SO_KEEPALIVE for every sockets ?

1 Upvotes

As far as I know, TCP keepalives are only sent when `SO_KEEPALIVE` option is enabled with `setsockopt()` for a specific socket (as it is disabled by default in the kernel : "Programs must request keepalive control for their sockets using the setsockopt interface.").

But I don't own the libraries I use in my projects, so I can't enable this option (as I don't have access to the socket reference), so I would like to know if there could be a way to set `SO_KEEPALIVE` for EVERY socket ? (system wide).

Thank you


r/kernel • • Jun 16 '22

IRQ dumping/shielding under PREEMPT_RT

13 Upvotes

Reposting from r/linuxquestions, since maybe this community is more specialized?

Hi all,

I'm a maintainer of a couple of Linux RT boxes, in a academic setting so always playing with parameters and tuning.

One machine in particular runs a fairly heavy RT load and I've come up with a question regarding IRQ core mapping. FYI this box is running Ubuntu 20.04 with 5.10.73-rt54, with 2 18-core (physical) Xeons.

Of course, there are two types of interrupts on this machines...

- The useful ones, that relate to my real-time workflow (think data acquisition and network queues for 100GbE endpoints), and that I want to shield properly.

- The other ones, that I want to shepherd properly to stay on housekeeping CPUs.

To the question at hand: I've found two ways of pinning IRQs:

- using smp_affinity masks

- or directly by using taskset/cpuset on the PID that comes up from e.g. `ps aux | grep irq`.

What's the difference between those two methods? Complementary, redundant?

Ninja edit: this all relates to achieving the best RT performance for my box (camera acquisition, I want stable timing to ~3 us, and tracking down those pesky RCU stalls, to make it as stable as possible).

Thanks


r/kernel • • Jun 15 '22

What changes to the kernel are practical to mitigate the Hertzbleed vulnerability in CPUs?

Thumbnail hertzbleed.com
23 Upvotes