SPIDEV Linux Driver on Intel Atom E3900 Series [duplicate]
This question already has an answer here:spidev Linux driver on Intel Atom board 3 answersI am attempting to expose the SPI #2 interface from the Intel E3900 series (specifically the E3940) as a spidev...
View ArticleIs Every Bus Controller on Chip a Platform Device in Linux Kernel
I have a question about this confusion:Is every bus controller(Usb, I2C,PCI...) a platform device from linux kernel point of view? So for example a Usb device is not platform devices but usb controller...
View ArticleWhether the value pointed by current->comm is reliable in interrupt handler
I wrote a simple device driver which will print the value of pid and comm in interrupt handler.I know interrupt handler runs in interrupt context, then why are the values not cleared.#include...
View Articlelocal_irq_disable does not work as expected
local_irq_disable()is used to disable all interrupts on the current processori wrote a basic code to test local_irq_disable().#include <linux/module.h> #include <linux/init.h> #include...
View ArticleEnabling EPT in VMX causes failed entry due to guest state
I'm building a hypervisor at home and I'm having an issue with entering VMX when enabling EPT. The following code is used to set the guest mode, and it successfully enters VMX. However, when I enable...
View ArticleKernel selection using yocto
I am building images for i.MX board using Yocto. My requirement is to build specific kernel for the board. After downloading from Freescale Yocto repository site, I could see recipes for multiple...
View ArticleHow to access a kernel variable using BPF?
For example, to access the skb variable in function ip_rcv:int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { ... } I searched the Internet...
View ArticleBPF: translation of program contexts
I was looking at the different types of BPF program, and noticed that for different program types the context is being passed differently.Example:For program type BPF_PROG_TYPE_SOCK_OPS, an object of...
View ArticleHow can I determine which namespaces a PID is in from kernel space?
I am trying to write an eBPF program to log every call of a particular syscall from containers running on the system. I am using bcc and can retrieve the PID using bpf_get_current_pid_tgid(). From...
View ArticleIn the fork() process, child clearly gets a new kernel stack, but fork() man...
I was going through the fork() process and the steps executed mainly to get a detailed view of what is and what is not shared between the parent and the child process.So in the dup_task_struct()...
View ArticleLinux Kernel Module : Problem with kernel_write function
I have a problem using kernel_write function while I am developing LKM for Linux 4.14.73 version.This is the part of my module where I am facing the issue : void change_led_state(char *led_path, int...
View ArticleZedboard: Kernal panic with undefined instruction and reboots
I am using zedboard with zynq-7000. Furthermore, I am using petalinux 2018.3 My intentions are as follows.1. Fsbl starts, a. load Helloworld.elf @ 0x30000000 b. load u-boot.elf @ 0x21000000 2....
View ArticleHow to show all x86 control registers when debugging the Linux kernel in GDB...
I am curious why gdb does not show control registers for x86. I have been using gdb with qemu to debug some kernel stuff. I get register values using info registers and info all-registers. However, I...
View Articleemqx start command is not starting the mqtt broker
I am having an issue with running emqx. When I run emqx start, It shows:emqx v3.2.7 is started successfully! When I run emx_ctl status:Node 'emqx@127.0.0.1' not responding to pings. When I run emqx...
View ArticleIRQF_PROBE_SHARED vs IRQF_SHARED in flags field of linux request_irq
What is the use of IRQF_PROBE_SHARED flag in request_irq,From the header file IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur I wrote a sample driver by setting this...
View ArticleTools for memory leak detection in linux kernel modules
I am writing the driver and I would like to know the tools which can be helpful for scanning/analyzing the memory leaks in the Linux kernel modules.
View ArticleAre the interrupts in Linux queued
I wrote a sample driver which disables keyboard interrupt for few seconds, and when i press keys at that duration, i get the pressed keys on the console when the interrupt is enabled?#include...
View Articledefine a macro symbol to itself
In Linux kernel, many places I saw code like the following:#ifndef __raw_readl #define __raw_readl __raw_readl static inline u32 __raw_readl(const volatile void __iomem *addr) { return *(const volatile...
View ArticleHow to change PAGESIZE in linux kernel
I want to change PAGE_SIZE from 4096 for the experiment. So I changed the value of PAGE_SHIFT in /arch/x86/include/asm/page_types.h. But I can't compile it.In file included from...
View ArticleHow to create / general steps to create SDK for Linux Kernel and given cpu...
How to cross compile my current code running on Linux kernel 5.0.0-37 architecture x86_64, Intel core i7-8850H CPU. onto Architecture i686 Model name: Inte Atom CPU E3845 @ 1.91 Ghz Linux Kernel 4.9.65...
View Article