linux-kernel

nftables: Are chains of multiple types all evaluated for a given hook?

nftables: Are chains of multiple types all evaluated for a given hook? This is a question specifically about nftables chain types in the Linux kernel. I don’t understand how they’re processed. I’ve been staring at the kernel code for a while, and it looks to me like an nftables "chain" is attached to a netns …

Total answers: 1

How to disable the Linux page cache

How to disable the Linux page cache The Linux kernel implements the page cache to accelerate I/O operations. It would be helpful to be able to turn off and on the page cache for research and testing. How can the Linux page cache be diabled? Update 1: If it is not possible to turn off …

Total answers: 2

Unable to install any packages Ubuntu 23.10

Unable to install any packages Ubuntu 23.10 All of a sudden, I am unable to install anything successfully with apt with the below error: The following packages will be upgraded: linux-headers-6.5.0-10-generic 1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. 75 not fully installed or removed. Need to get 0 B/3,737 kB …

Total answers: 2

select() marks a FD to be readable, but there is no data to be read

select() marks a FD to be readable, but there is no data to be read I’m encountering an issue in my server code where calling accept() on the listening socket will occasionally block, even though select() marked it readable. My understanding is that this isn’t a case that should happen often, if at all, but …

Total answers: 1

What's the difference between the kernel boot parameters nohz_full and isolcpus=nohz

What's the difference between the kernel boot parameters nohz_full and isolcpus=nohz When isolating CPU cores for jitter-sensitive processes it is common to use both boot parameters nohz_full and isolcpus (I know the latter is deprecated in favor of cpusets, but it’s still around). isolcpus also has a nohz parameter. I wonder if it has the …

Total answers: 1

What does driver rejects match -19 mean?

What does driver rejects match -19 mean? When a driver ouputs probe of [driver] rejects match -19 Linux error -19 means there is No such device. Does this mean that the loaded driver doesn’t find its device? Asked By: Bret Joseph || Source Regarding most recent Linux kernel, the error reported in OP comes following …

Total answers: 1

tracking linux-firmware.git and backwards kernel compatibility

tracking linux-firmware.git and backwards kernel compatibility I’ve been tracking the upstream Linux firmware repo in /lib/firmware on a couple of machines, doing very periodic updates of that tree. I think I saw a firmware loading error booting an older kernel on the machine where I did a git-pull last week. Does that repository have a …

Total answers: 1

Is using the SysRQ Emergency Remount an acceptable way to clone hard disk?

Is using the SysRQ Emergency Remount an acceptable way to clone hard disk? I’m using Linux (Ubuntu) and I was told that I can use the method described below to clone the system’s hard drive to another one – to plug into a new machine. (Without booting from a Live CD) It assumes that the …

Total answers: 2

Can OS work without kernel?

Can OS work without kernel? I am interested in history of creating a GNU/Linux and how did these two operating systems unified. So, there was GNU, and it needed a kernel. They were developing their own kernel called "GNU Heart". But Richard Stallman said that he didn’t like it. Then he found out that there …

Total answers: 1

“binutils”/Kernel 6.5.X – “Invalid –compress-debug-sections option: `zstd’”

“binutils”/Kernel 6.5.X – “Invalid –compress-debug-sections option: `zstd’” I’m trying to build a driver for a USB to HDMI adapter… Bus 001 Device 010: ID 534d:6021 MacroSilicon VGA Display Adapter NOTE: "lsusb" output. … but this error is occurring… Fatal error: Invalid –compress-debug-sections option: `zstd’ …as can be seen in the full output below… [eduardolac@eduardolac-pc ms912x]$ …

Total answers: 1

Removing linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64 packages

Removing linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64 packages Is it safe to remove linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64 packages? After removing some unnecessary firefox language packs with dependencies, I was prompted to autoremove a few packages that were no longer needed: hunspell-gl-es, hunspell-sv-se, linux-image-5.10.0-21-amd64, linux-image-5.10.0-23-amd64. $ sudo apt autoremove Reading package lists… Done Building dependency tree… Done Reading state information… Done The …

Total answers: 1

Why does the Linux kernel have its own bootloader

Why does the Linux kernel have its own bootloader I am trying to work my way through Linux kernel code, and in this file there seems to be a full blown bootloader that bios is expected to run. I was under the impression that generally, grub will be in the mbr and then it will …

Total answers: 1

Is setting CONFIG_STRICT_DEVMEM=y safe?

Is setting CONFIG_STRICT_DEVMEM=y safe? I was playing around with /dev/mem and found out that even as root user you cannot access the whole file if CONFIG_STRICT_DEVMEM=y. It was new to me that there are mechanisms to prevent the root user from doing what he likes. But as root I could simply alter the Linux kernel …

Total answers: 1

Linux: Getting the kernel buffer size for a socket

Linux: Getting the kernel buffer size for a socket I have a C application which receives a lot of data over a TCP socket. Is it somehow possible to get the kernel buffer size for that file descriptor / socket? I would like to know how much data is still in the kernel for the …

Total answers: 1

Why does Linux needs both pid_max and threads-max?

Why does Linux needs both pid_max and threads-max? I understand the difference between /proc/sys/kernel/pid_max and /proc/sys/kernel/threads-max. There’s a good explanation at the answer to Understanding the differences between pid_max, ulimit -u and thread_max: /proc/sys/kernel/pid_max has nothing to do with the maximum number of processes that can be run at any given time. It is, in …

Total answers: 1

unable to boot kernel on A53 (devicetree?)

unable to boot kernel on A53 (devicetree?) I am trying to boot a Linux kernel on an A53 cpu (inside a ZU5 from xilinx). I have two hard. The first is a custom PCB with a ZU5. The second is the ZCU102 SDK with the zu9eg. Here the boot log : [ 0.000000] Booting Linux …

Total answers: 1

Leftover kernel directories with files

Leftover kernel directories with files Why there are Kernel leftovers and can I get rid of them automatically? There are so many kernel directories after a few months, that I get annoyed with it. I just carefully inspected the /usr/lib/modules directory and removed all old kernel directories, but for one, and inspected its actual contents: …

Total answers: 2

Why does ftruncate with a shared memory object not use memory?

Why does ftruncate with a shared memory object not use memory? I’ve observed that I can create a shared memory object and give it ostensibly any size with ftruncate, regardless of the resource limits on my system. The code below sets the size to 262 TB, and indeed stat() reports that is the size. However, …

Total answers: 2

Can loop devices be automatically cleaned up when a process exits?

Can loop devices be automatically cleaned up when a process exits? I’m trying to figure out a clean and safe way to use loop devices inside of a build script. To the best of my knowledge loop devices are required if you want to (GPT) partition and (FAT32, EXT3) format a sparse file1. Eg: Let’s …

Total answers: 1