This is in reference to CVE-2018-8897 (which appears related to CVE-2018-1087), described as follows: A statement in the System Programming Guide of the Intel 64 and IA-32 Architectures Software Developer’s Manual (SDM) was mishandled in the development of some or all operating-system kernels, resulting in unexpected behavior for #DB exceptions that are deferred by MOV SS or POP SS, as
Tag: linux-kernel
Add syscalls to linux kernel
I’m new in working with kernel. I want to add a linked list to my kernel, and I try to fix it like this link : Linux Kernel Programming–Linked List here is code’s that I added to sys.c : syscall defenition: and my struct for linked list: and when I compile the kernel, I saw this error: thanks for your
How to estimate the time for spinlock holing/waiting time?
I’m doing a research on spinlock in Linux kernel. And I need to estimate the time for lock holding and lock waiting. To do that, I first tried to modify the spinlock function (arch_spin_lock()) but I could not modify that function because I could not build the kernel. This function was originally an inline function, but I think it was
gcc: error trying to exec ‘cc1’ when cross-compiling
I downloaded toolchain from parrot Github, installed, now I am trying to crosscompile here with the following command line: here’s the error log: Answer You should use the arm-none-linux-gnueabi–prefixed toolchain in bin instead. e.g. instead of
Is running `sync` necessary after writing a disk image?
Common way to write an image to disk looks like: After this command, is it necessary to run sync? sync(2) explains it only flushes filesystem caches. Since dd command is not related to any filesystem, I think it is not necessary to run sync. However, block layer is complex and in doubt, most people prefers to run sync. Does anyone
Do Linux capabilities partition the possible privileged operations?
More precisely, are there any operations for which more than one capability could be used to give a process the necessary permissions? Answer The short answer is yes. I would say the overarching model is that each operation is guarded by a single capability. However, there are certainly exceptions. At a glance through the kernel/ directory, I quickly found one
(deleted) file creating issue on Linux
My process reads a files and deletes it. This activity happens more than 2000 times. When I check the file in /proc/PID/fd, I see the file there and I see at the end of each line as (deleted). But I see 1024 records, with 1020 being the (deleted) entries. Later the new file operation from this PID fails. To overcome
How to find out which kernel spinlock eat up most of CPU?
I’m doing performance tuning of a crypto software, which is run on Linux and utilizes hardware crypto acceleration device. When the load is given over some threshold, kernel _spn_lock begin to eat most of the CPU’s time. The following perf top screenshot shows ~30% of CPU is taken by _spin_lock, but it goes up over 50% if a load is
Predefine a macro in kernel module
I would like to define a macro for my kernel module by using the -D flag, but I can’t figure out how to do it in a custom loadable kernel module. Just to be clear, to set the macro TEST to 1 I usually do something like: cc -D TEST=1 file.c -o file And inside the file.c I have Now,
V4L2: What happens when the queue is full
In video capture mode, what happens when the queue is full and a new frame comes in? Does the kernel drop frames? If so, does the newest frame (just arrived) get dropped or the oldest one in the queue gets dropped? Answer Yes if the queue becomes full kernel drops the buffer newest frame which just arrived, if no more