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

Memory management in C - Linux Kernel

I am attempting to write a Linux Kernel Module, I am stumbling at really simple issue.I have a pointer to a structure provided by the kernel, i would simply like to copy one of the elements to a local...

View Article


How to apply multiple parameter expansion in BASH for a single output?

files=("Benjamin Johnson""Bastin Johnson""Bagio Johnson")( IFS=','; echo "${files[*]/#/Mr.}"; echo "${files[*]/ /_}" )Expected ResultMr.Benjamin_Johnson,Mr.Bastin_Johnson,Mr.Bagio_JohnsonOutput...

View Article


How does the Linux kernel "listen" to the C library?

I'm trying to build up a "big picture" of how things work in the Linux kernel and userspace, and I'm quite confused. I know that userspace make use of system calls to "talk" to the kernel, but I don't...

View Article

How __ATTR macro is used in Linux kernel?

I would like to create a sysfs entry, which is done using an "attribute" structure. The way recommended to do this is to use the __ATTR macro, as in this:static ssize_t functionCalledOnRead(struct...

View Article

Control Kworker/0:0

In our real time Linux application we are pinning our processors to specific cpus from which we have successfully excluded all linux processes apart from kworker and ksoftirq threads with specific...

View Article


Char Driver Linux: What is the correct implementation of file_operations read...

I am trying to read and write to a char driver. When i use a C program to open the device file and read and write it gives a SEG fault. When i use a cat to the device file it goes to infinite loop.1)...

View Article

Size command lsmod comparing with modules

Why does the quantity (sizes) of the modules associated to the kernel that are being used and stored in /lib/modules/kernel1 for a given kernel (only one in the system "kernel1") differ from the size...

View Article

pci_enable_device() fails after remove/rescan

I have here Linux 4.4 (I used to work on an older kernel which failed in the same way) with a PCIe connected FPGA device and a driver for it which are both of my own design. These have been working...

View Article


Laptop says ext4-fs error reading directory lblock 0 while having no bad...

I've been trying to solve this issue to no avail, but basically my machine (Huawei Matebook X Pro, MX150 GPU, Ubuntu 19.10) has been giving me this randomly and going into a kernel panic:ext4-fs error...

View Article


undefined reference when applying patch file

I am working on a project where I have to make some custom system calls by modifying the kernel files in a VM. I am trying to test that my calls work by applying a patch file to a new snapshot of a VM....

View Article

Ubuntu: Kernel 5.6.0-rc3: No IOCTL support in file_operations?

I am using ubuntu and kernel version 5.6.3-rc3. I don't see any ioctls in the file_operations structure in the header.Is the support removed? What is the substitute?Pasted below from the linux/fs.h...

View Article

How NOHZ=ON affects do_timer() in Linux kernel?

In a simple experiment I set NOHZ=OFF and used printk() to print how often the do_timer() function gets called. It gets called every 10 ms on my machine. However if NOHZ=ON then there is a lot of...

View Article

How do I get a Linux kernel binary file?

I have downloaded the latest kernel from kernel.org . What I want is to compile it to get the executable file. I need the file to run some commands on it (like strings) to figure what how to identify...

View Article


Get x86 SMEP CPU flag from user mode

I am writing a usermode tool that watches for changes to CPU flags such as WP from CR0, and SMEP from CR4. I can read the WP bit using smsw %rax but there is no similar opcode for reading CR4 (or its...

View Article

How to boot linux kernel over http for x86? [closed]

I am using Minnnowboard Max and I have enabled DHCP from UEFI. Now I can see in /var/log/syslog that Minnow is getting assigned IP by my dhcp server running on the host machine. Currently I have only...

View Article


What is the need of empty braces '{ }' at the end of array of structs?

I hit some ccode in Linux kernel:static struct ctl_table ip_ct_sysctl_table[] = { { .procname = "ip_conntrack_max", .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec, }, // ... {...

View Article

Why does grep loop getdents system call?

I am running a recursive grep command against a webspace on a Linux Ubuntu 18.04.4 LTS server in order to find all files with the specific phrase. The command seems to be hanging and not doing...

View Article


Linux OOM Killer and Java Process

I am often facing issue in our production environment of the Tomcat process getting killed by Linux OOM.Checking /var/log/messages it says java not tainted and java invoked OOM killer.-Xms20480m...

View Article

centos 7.7 WLAN install error in th offline

The following error occurred while installing the WLAN card in the offline environment.DKMS make.log for rtl8192eu-1.0 for kernel 3.10.0-1062.el7.x86_64 (x86_64) 2020. 03. 03. (화) 01:43:08 KST make...

View Article

How to test LTE in linux [closed]

There is AT command interface tool in windows but not getting info how to test it on Linux.is there any open source tools in Linux for testing LTE or GSM ?

View Article
Browsing all 12368 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>