I need to obtain the real_dev (f.e. ID) of the given VLAN-inteface. I wrote some test snippet using libnl: So I have some interface ID and I can check if it’s a VLAN-interface, but I have no idea how to obtain the interface the vlan is attached to. It seems that libnl’s API does not provide such possibility. Is there
Tag: linux-kernel
Is it possible to disable spectre/meltdown/related patches on coreos?
Is it possible to disable Spectre and Meltdown patches on later builds of CoreOS? At my company we are running an entirely internal Kubernetes computer cluster, and are looking to get the performance back. On a normal linux system, you could boot with the kernel boot parameters: But adding: To /usr/share/oem/grub.cfg doesn’t appear to have any effect. I’m wondering if
Computing the set of writes when executing a function
I want to write a function computeWriteSet that takes an arbitrary function f as an argument and (1) executes the function f and (2) returns the set of places modified or written to (addresses/pages/objects) during f’s execution. What options exist for implementing it? What are their tradeoffs (in which case which implementation is more efficient and what are the limitations?)
Adaptation from old init_timer to new timer_setup
I have been trying to port a driver from 2.6 to 4.X without support from the original board manufacturer (and very limited Linux experience). The original driver uses init_timer() and passes in a pointer to the timer_list structure. That timer_list structure’s data element was set to a pointer to another memory structure and the function element set to the callback.
Kernel Panic with Buildroot Linux
I (try to) make a complete minimal Kodi Linux system with buildroot from scratch, everything compiles fine and i also got it to boot but after some lines of console output and graphics reset it gives me a kernel panic error: I have no clue why… My buildroot config file: https://pastebin.com/7PC4zLEa Image from the kernel panic: https://imgur.com/a/dPECTRH Answer It turns
Can I block a new process execution using Kprobe?
Kprobe has a pre-handler function vaguely documented as followed: I was wondering if one can use this function (or any other Kprobe feature) to prevent a process from being executed forked. Answer As documented in the kernel documentation, you can change the execution path by changing the appropriate register (e.g., IP register in x86): So you might be able
How atomic the fork() syscall actually is?
Assuming check_if_pid_exists(pid) returns true when a process with such a pid exists (but possibly hasn’t been running yet) or false when there is no process with such pid, is there any chance in parent code for a race condition when the fork() returned the child pid, however the kernel hasn’t had a chance to initialize the data structures so that
Cannot get memory allocated from `flex_array_alloc` when requesting a relatively big size in linux kernel
I’m doing some linux kernel development. And I’m going to allocate some memory space with something like: ptr = flex_array_alloc(size=136B, num=1<<16, GFP_KERNEL) And ptr turns out to be NULL every time I try. What’s more, when I change the size to 20B or num to 256,there’s nothing wrong and the memory can be obtained. So I want to know if
My newly compiled kernel loses Networking in qemu
I compiled a kernel from source : make defconfig make kvmconfig make -j 4 After this , i use the resulting bzImage for my qemu command: qemu-system-x86_64 -hda debian.img -kernel bzImage -append “root=/dev/sda console=ttyS0” -nographic -m 4096 -smp 2 –enable-kvm -net user,hostfwd=tcp::10021-:22 -net nic It mounts, and I get a shell and everything, but it loses connectivity. In qemu, it
Timing/Clocks in the Linux Kernel
I am writing a device driver and want to benchmark a few pieces of code to get a feel for where I could be experiencing some bottlenecks. As a result, I want to time a few segments of code. In userspace, I’m used to using clock_gettime() with CLOCK_MONOTONIC. Looking at the kernel sources (note that I am running kernel 4.4,