Kernel Oops 96000021 [#1] SMP
I'm writing a driver for petalinux, but I've some problems with an v4l2 ioctl function, in particolar with ioctl(fd, VIDIOC_STREAMON, &type). When I call streamon it sometimes goes correctly other...
View ArticleResolving ambiguous external symbol references in Loadable Kernel Modules (...
This question already has an answer here:What will happen if two kernel module export same symbol 1 answerLets suppose there are two loaded kernel modules that have exported two different functions as...
View ArticleHow can I test if a file could be marked as executable and run? [duplicate]
This question already has an answer here:Check if a file is executable 4 answersIs there a way to test whether a file, if I mark it as executable with chmod +x file and run it with ./file will cause...
View Articlelinux kernel function length in Oops and objdump (disassembly)
I have some kernel Oops which failed here:BUG: ... IP: [<ffffffffabcdefab>] myfunction+0x10/0x1e [mymodule] In Oops we can see that the function length is 30 bytes in decimal. I suppose that...
View ArticleIs there a way to switch to another process context from linux kernel module
I try to change the "current" process to another task as the scheduler do it but it's more complicated than I thought. In other words, I'm looking for KeStackAttachProcess linux equivalent.Flow:...
View Articlelinux kernel function page_address()
I'm confused with the function:void * page_address(struct page *page) which (1) "convert a given page to its logical address" according to "Linux Kerenl developement 3rd edition" (2) "returns the...
View ArticleHow can I control list of LEDs in kernel space
I am trying to build a kernel module for Linux to try to control a list of LED devices that will turn them on/off in a sequence. For example, green --> red --> green --> orange, and then...
View ArticleAWS Lambda Unable to import module 'demo': cannot import name 'windll'
Need a little help on aws lambda if ya'll came across this issue with deployment package uploading in aws lambda.Regards, xxSoumya----[find snippet of issue ] [1]: https://i.stack.imgur.com/2QeGe.png
View ArticleHow to read, understand, analyze, and debug a Linux kernel panic?
Consider the following linux kernel dump stack trace, you can trigger a panic from the kernel source code by calling panic("debugging a linux kernel panic");:[<001360ac>]...
View ArticleHow to compile / link / build a small sized Loadable Kernel Module ( LKM )?
I am successfully bulding this trivial LKM with gcc but the resulting binary is 50kB is size.#include <linux/init.h> #include <linux/module.h> MODULE_LICENSE("GPL"); static int __init...
View ArticleHow to check the owner field of struct mutex in Linux
I would like to check in a struct mutex which is locked in the kernel, who is the owner of that mutex.struct mutex { atomic_long_t owner; spinlock_t wait_lock; #ifdef CONFIG_MUTEX_SPIN_ON_OWNER struct...
View ArticleMSR_LSTAR modification double faults
I am trying to set up a trampoline using MSR_LSTAR by this tutorialThe code in question is this:#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h> #include...
View ArticleWriting a file in /proc continuouly floods the dmesg
I am trying to read/Write a variable in the linux kernel module using /proc file entry facility. Kernel module compiles successfully but when tried writing it viaecho 1 > My_file This operation...
View ArticleUsing perf_event_open in AMD for Counting and Sampling Memory Load
I want to count and sample memory load operations that happen in a chunk of code while running it on an AMD machine. I know that the following code can be used to count memory loads happening in a code...
View ArticleHow to resolve reading and writing operations with /dev file as a kernel...
Obviuosly, it's a unsuprising newbie's question after a lot of troubles with kernel programming. I try to launch a program that gets driver file in /dev folder available for some reading and writing...
View ArticleUnderstanding link between CONFIG_SMP, Spinlocks and CONFIG_PREEMPT in latest...
To give you full context my discussion begun with an observation that I am running a SMP linux (3.0.1-rt11) on ARM cortex A8 based SoC which is a uniprocessor. I was curious to know if there will be...
View ArticleChecking the owner field of struct mutex in Linux
I would like to check in a struct mutex which is locked in the kernel, who is the owner of that mutex.struct mutex { atomic_long_t owner; spinlock_t wait_lock; #ifdef CONFIG_MUTEX_SPIN_ON_OWNER struct...
View ArticleCLI instruction not executed in Linux kernel module
I'm writing a Linux v3.2 kernel module on an Intel Atom processor (x86_64 with 2 cores). I want to disable a specific IRQ number, but I'm having trouble doing so on Linux.I'm dual-booting MS-DOS where...
View Articleinsmod error in kernel module programming
I am just starting with modular programming. Above are my two files:hello.c#include <linux/init.h> #include <linux/module.h> static int hello_init(void) { printk(KERN_ALERT "TEST: Hello...
View ArticleWhat does "CPU dies" (not hardware-related) mean?
Recently working with workqueue of the Linux kernel, and I found something ("CPU dies") that I'm not sure what it is, even googling it.Does it means particular CPU core is currently not available or...
View Article