Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Browsing all 12332 articles
Browse latest View live

What actions are taken by linux before it successfully call to start_kernel()?

I'm learning linux kernel internals and I understand that the first C function called is start_kernel(). But I think that the system must prepare itself to be able to run c functions, like installing...

View Article


How to find the kernel source corresponding to the Ubuntu of specific version?

Recently, I'm doing some research about wireless network, in order to achieve my experiment goals, some changes must be done about mac80211_hwsim, but it's fail to find the kernel source corresponding...

View Article


what's the difference between 'load mmc' and 'load addr'?

Here's my u-boot ## Booting kernel from Legacy Image at 42000000 ... Image Name: Linux-4.1.8 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3458160 Bytes = 3.3 MiB Load Address: 70008000...

View Article

building /lib/modules/$(uname -r)/build while compiling a kernel

I am cross-compiling 3.4.0 kernel for an embedded device. Then I would like to install compat-wireless drivers which require /lib/modules/3.4/build directory and sub-files. Could anyone explain how can...

View Article

eBPF: reading the result of getaddrinfo

Similar to the gethostlatency.py tool in the BPF Compiler Collection (bcc) I want to trace function calls to getaddrinfo. Additionally, I want to collect the returned values (IP addresses, address...

View Article


Is linux'"mutex lock" implemented using "memory barrier"?

I was reading this where Robert Love mentioned that mutex is implemented using memory barrier but I am not able to see the memory barrier instructions being used in Linux implementation of mutex lock.I...

View Article

What is the function of "(void) (&_min1 == &_min2)" in the min macro in...

In kernel.h min is defined as:#define min(x, y) ({ \ typeof(x) _min1 = (x); \ typeof(y) _min2 = (y); \ (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; })I don't understand what...

View Article

Is timer interrupt independent of whether system is in kernel mode or user mode?

In a Linux uni-processor system, is timer interrupt independent of whether system is in kernel mode or user mode?Is there any different behavior for the timer interrupt while system is in kernel mode?

View Article


Quick rebuild of device tree only with Yocto/bitbake?

So, each time I modify the device tree I typically change the dts in a custom recipe and rebuild the image. The rebuild takes a long time since it rebuilds the entire kernel, and then the image needs...

View Article


Linked list in Linux kernel freezes machine

I wrote a kernel module that needs to push messages to user space. The idea is that the kernel module buffers the message and signals the user space program, then the user space program goes and gets...

View Article

How can I show printk() message in konsole?

The information which is printed by printk() can only be seen under Alt+Ctrl+F1 ~ F7 console.These consoles are very inconvenient for debugging since they can't roll back. I am using KDE desktop...

View Article

Is the sscanf function in the Linux kernel susceptible to buffer overflow...

From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject malicious code and rewrite the return...

View Article

Binutils update causing ld: no machine record defined error

OLD Setup (based upon Buildroot 2015.08.1)GCC 4.9.3 (ARM cross compiler for ARM11 based target, Buildroot built)GLIBC 2.20BINUTILS: 2.24 (target) 2.22 (host)Linux kernel: 3rd party provided v3.14.17...

View Article


Understanding the getting of task_struct pointer from process kernel stack

Right now I'm reading the book "Linux Kernel Development 3d Edition" by Robert Love. There he write about the thread_info struct which contains the pointer to task_struct struct and, as I understood,...

View Article

insmod error: inserting './hello.ko': -1 Invalid module format"

I have just made my first driver module, the hello world module following LDD3. However unfortunately encountered this error:insmod: error inserting './hello.ko': -1 Invalid module format.I am doing...

View Article


cross compiler works compiling app but not kernel

I compiled a cross tool for arm with ct-ng. I tested it by compiling a hello.c just printing "hello world", and downloaded it to a working board, it worked.But using it to compile a kernel, and...

View Article

How to pass compiler options during Linux kernel compilation?

For reasons, I need to compile the Linux kernel (currently 4.7.10) passing some simple and innocent additional command line options (e.g. -pipe -Wsomething etc) to the C compiler.How do I do it?More...

View Article


Is there a difference between fsync() writethrough behavior vs dirty page...

In addition to what the man page of fsync() says it also says "This includes writing through or flushing a disk cache if present." I'm concerned if the implementation is 'writing through the cache'....

View Article

How does Linux kernel flush_write_buffers() work on x86?

The following code is from include/asm-i386/io.h, and it is invoked from dma_map_single(). My understanding is that flush_write_buffers() is supposed to flush CPU memory cache before mapping the memory...

View Article

Use generic ARM64 as target in openwrt

I want to build OpenWrt for generic ARM64 (armvirt/64) similar to the images found at https://downloads.openwrt.org/releases/19.07.3/targets/armvirt/64/During building OpenWrt, I couldn't find...

View Article
Browsing all 12332 articles
Browse latest View live


Latest Images