I can't dump a stacktrace when i use linux trace event triggers
The kernel document 'tracing: trace event triggers' said i can use stacktrace cmd to dump a stacktrace to the trace buffer whenever the trigger event is hit. But all i got is a simple string...
View ArticleHow does this enumeration work in this driver?
As I was studying the code of the mxs-auart.c driver I noticed the following declaration:enum mxs_auart_type { IMX23_AUART, IMX28_AUART, ASM9260_AUART,};and then later on:static const struct...
View ArticleLinux: How to find the list of daemon processes and zombie processes
I tried checking on Google, but I couldn't find much information related to the actual question. How do I get a consolidated list of zombie processes and daemon processes?How do I do it on different...
View ArticleWhy struct linux_dirent members ( d_name, d_reclen, .. ) always getting 0?
This is for educational purposes and I'm new in kernel programming. I'm trying to override sys_call_table[__NR_getdents] with my custom function. The goal of my custom function is to read all the files...
View ArticleUnable to boot 64-bit kernel after installation
My system supports 64-bit architecture and I am able to use debian-buster meant for amd64 architecture separately. Now, I have an os running debian-buster having kernel as "linux-image-686-pae". I want...
View ArticleMAP_DENYWRITE option of mmap was a source of denial-of-service attacks?
The man page of mmap function mentioned MAP_DENYWRITE can cause denial-of-service attacks. But why?MAP_DENYWRITE This flag is ignored. (Long ago, it signaled that attempts to write to the underlying...
View ArticleHow does `cpupower frequency-set -g performance` work?
I looked at the source code, and I don't see exactly how to tell the cpu to stay at highest possible frequency. Through interrupt? Some dummy workload? or?Any pointer would be highly appreciate.
View ArticleHow to find the LLC size and BW peak from the Linux kernel
I need to know the size of the system's Last Level Cache from a kernel module as well as the capacity of the Bandwidth in between L3 and Main Memory. Does any struct store such information within the...
View Articlemissing MODULE_LICENSE() when two module using same object file
I have two files:main.c will become module calc, it will use API in expression.c.livepatch-calc.c will become module livepatch-calc.I have following makefile and work wellobj-m += calc.oobj-m +=...
View ArticleWhat is the difference between DMA and memory-mapped IO?
What is the difference between DMA and memory-mapped IO? They both look similar to me.
View ArticleSimple SPI device driver
I have written a simple driver for a character device in Non Blocking mode using epoll.Now I would like to use that driver for SPI interface.What should be the device name or how will I map the actual...
View Articleaarch64-linux-gnu-ld: no input files
In general, I restarted the collection and the log is the following:root@W-PC:/home/w-pc/kernel_dev/android_kernel_huawei_hi6210sft# make -j5CHK include/generated/uapi/linux/version.hCC...
View ArticleVim configuration for Linux kernel development [closed]
Kernel development is actually different from a traditional C project development (from my view, as a newbie). So, I always wonder what is the vim configuration of a kernel hacker.The most important is...
View ArticleUnderstanding how the copying of the compressed Linux kernel works in head_64.S
I am working on understanding how the Linux kernel v3.19 prepares for decompression on a machine with x86_64 architecture in arch/x86/boot/compressed/head_64.S. The part that is confusing me is the...
View ArticleWrite into /sys/bus/usb/drivers_probe with C++ application
I am trying to make C/C++ application which should block some USB devices.I have similar problem described here, but now I need to implement that solution into C++. I just need to write some string...
View ArticleHow do I write a Linux device driver for SPI based ADC, MCP3462?
I'm working on a Linux Device Driver for an SPI based ADC, MCP3462.Kernel series : 4.9As the driver is not available anywhere, I am referring the closest one i.e. MCP320x. But I realised the...
View ArticleWhat is the use of struct cpufreq_policy in Linux Kernel CPU Frequency Subsystem
I was reading about CPUFreq subsystem. There are two drivers Scaling Governors: Which decide what should be the next frequency to chooseScaling drivers: Which directly communicate with the hardware and...
View Articleunsure about structure of platform device driver for i2c/spi device
I am after some clarification/guidance. For a leaning experiment I am wanting to implement a driver for both the MCP23xxx gpio expander ICs. One series using i2c and the other SPI. I have experience...
View ArticleWhat RTDM class and subclass for uart?
I am building a Xenomai Uart RTDM driver for an IMX28 based on the mxs-auart.c (which is the Linux version of the driver). In order to do that, I also looked at the rt_imx_uart.c because it is very...
View ArticleWhy more memory (than being required) is allocated to a struct with flexible...
I am learning linux wifi drivers, and was exploring the code in cfg80211 subsytem for a scan request.I can't understand why the following struct is allocated more memory than required. Or, I can't...
View Article