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

usage of !!, __warned and __ret_warn_once as int in WARN_ON_ONCE macro...

I was going through the WARN_ON_ONCE macro definition. I have doubt regarding the following line, what is the use of !! before condition. If we remove !! then also same will be stored in...

View Article


What does the function put_pid() in the Linux Kernel do?

I have been trying to understand what does the function put_pid() in the Linux kernel do. https://docs.huihoo.com/doxygen/linux/kernel/3.7/pid_8c_source.html#l00243When should it be used, etc....

View Article


how to insert kernel module which has only subsys_initcall

I am trying to make changes to the md.c file and reload it to the kernel. Since its a kernel module I thought it would be an easy task.But, after reading the code, I found out that it does not have a...

View Article

ARP reply is not recognized from linux kernel

I am facing the following situation:A network application is calling arp_send kernel system call in order to send an ARP request for resolving an IP address. An ARP reply is received and send to kernel...

View Article

How are socket typed files(S_IFSOCK) used in Linux ext4 filesystem?

In linux kernel, special inode for device files and FIFOs are hooked to their special f_ops, but sockets are left dangling. Here is a snippet from kernel 5.4 code:void init_special_inode(struct inode...

View Article


How do "pinned" pages in Linux present (or actually "pin") themselves

I am using get_user_pages in a Linux kernel driver to pin memory for the purposes of [hardware] DMA. It all seems to work fine - but I am having a hard time proving that the "pinning" is doing the...

View Article

align macro kernel

I am unable to understand what this macro does. These are defined in linux-kernel but I my doubt is independent of that. I am unable to understand what does (((x)+(mask))&~(mask)) line does.#define...

View Article

arp_send: what is the difference between target_hw and dest_hw?

I am trying to generate arp requests from within the kernel but I do not understand the difference between the 'target MAC address' and the 'destination MAC address'. The kernel function that I am...

View Article


Why rwlock is more popular than seqlock in linux kernel? [closed]

After reading Robert Love's LKD, I learn rwlock and seqlock, both of them are based on spinlock.When distinguish between reader and writer, rwlock is better than spinlock, it will get better...

View Article


What's the best linux kernel locking mechanism for a specific scenario

I need to solve a locking problem for this scenario:A multi CPU system.All of the CPU's use a common (software) resource.Read only access to the resource is very common. (Processing of incoming network...

View Article

Kubernetes installation error in flannel step

I am installing kubernetes using kubeadm on GCP Centos VM and I am getting the following error while running flannel step.Error:[root@master ~]# kubectl apply -f...

View Article

Is there any sample c code using mailbox kernel module? [closed]

I want to change the module mailbox in linux kernel. And I want to check performance of new mailbox module.So, I browsed a lot to find c code using mailbox module. I couldn't find it.If there is no...

View Article

Why a "barrier()" is enough for disabling or enabling the preemption?

From Linux kernel code,I can see the preempt_enable() and preempt_disable() are nothing except just barrier(): #define preempt_disable() barrier() #define preempt_enable() barrier() I can't understand...

View Article


What does it mean to say "linux kernel is preemptive"?

I read that Linux kernel is preemptive, which is different from most Unix kernels. So, what does it really mean for a kernal to be preemptive?Some analogies or examples would be better than pure...

View Article

Running emulator after building Android from source

I am able to pull down the latest android source code into a Ubuntu virtual machine 32-bit (Host: Windows 7 64-bit). The build completes without any errors.Then I tried to follow these instructions,...

View Article


Parallel Redundancy Protocol (PRP) support in Linux Kernel [closed]

I am looking for a Parallel Redundancy Protocol (PRP) driver in Linux. I cannot find any in the mainline kernel. It seems that there is a HSR driver that seems also to take into account the PRP...

View Article

Is there a netfilter hook that has the receiving socket already associated?

The NF_INET_LOCAL_OUT hook has skb->sk pointing to a struct sock for the socket that sent the packet. If there a hook that has it set for the socket that receives the packet? In the NF_INET_LOCAL_IN...

View Article


Building complete control flow graph for Linux kernel binary

Are there any tools that can build the control flow graph for an entire Linux kernel binary? For example, consider Linux kernel compiled for x86 architecture (vmlinux file). Is it possible to determine...

View Article

Image may be NSFW.
Clik here to view.

How to insert a ramfs module into linux kernel

I want to compile source code of a very simple file system--ramfs. But when I inserted the module into Linux kernel 3.10 I got a problem:could not insert module myramfs.ko: Device or resource busy I...

View Article

Undeploy module/package deployed with Yocto devtool

When a module/package is deployed with Yocto's devtool deploy-target how can it be undeployed if the target is only accessible via a serial console (i.e. devtool undeploy-target is not available)? What...

View Article
Browsing all 12339 articles
Browse latest View live


Latest Images