Use netlink to get inode from socket on older kernel
I wrote a piece of code to get a list of sockets and their inodes using sock_diag netlink. Here is the send code:struct { nlmsghdr nlh; inet_diag_req_v2 id_req; } req = { .nlh = { .nlmsg_len =...
View Articlekernel module: reading existing proc file (proc_create)
I am an absolute newbie on Linux kernel. Sincere apologies if this has been answered. I have spent many hours and could not resolve it and hence decided to ask (reading Linux device drivers book as...
View ArticleCan't find static function local_apic_timer_interrupt in /proc/kallsyms
I am new to kernel programming and I am trying to write a program about APIC. I find smp_apic_timer_interrupt in /proc/kallsyms but I can't find local_apic_timer_interrupt in kallsyms by command: grep...
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 Articleget WARNING: undefined! when i build an android kernel module
my android phone is pixel 2xl,I want to dump memory use LiME.When I build LiME I got this warning.I want to know how to fix it. here is my step: 1.Build the kernel completely with build.sh in repo....
View ArticleWhat exactly expands the KERN_INFO, and where it is implemented?
In this question: Why doesn't the function printk() use a comma to separate parameters?, someone said KERN_INFO expands to ""\001""6". I know the first \0 is null character, but then what 01 is? As I...
View ArticleLinux/Golang : unable to access /sys/kernel/debug/tracing/kprobe_events
I'm running Arch linux on LTS kernel (4.19.75). I've checked with more recent kernels, same issue.I do have debugfs mounted, and as root I can see this file :/sys/kernel/debug/tracing/kprobe_events I...
View ArticleYocto load kernel module
I try to add a kernel module to a yocto image and load it on boot.I create a recipe to build and install a kernel module. Here's a part of the Makefile content:modules_install: test_driver.ko install...
View ArticleHow does iOS manage memories?
On the jailbroken iPhone, I'm looking at an app called SuperTestApp.I have a question on how the kernel manages the memory associated with the app.How can I find the memory range of application code...
View ArticleBooting Intel-based PC to BIOS without pressing F2 key
I am trying to write an automation which I need to boot Intel-based PC to BIOS, as one of the steps, without pressing F2 for obvious reason, that nobody will push F2 in automation. Does anyone know to...
View ArticleJupyter has problem with kernel. How to fix?
When i starting work with my jupyter notebook, kernel failed with this errorenter image description hereall text errorBlockquoteTraceback (most recent call last): File...
View ArticleHow can I get contents of page with page structure?
I'm currently looking kernel source code about page cache.I got a struct page (include/linux/mm_type.h), and I want to read and save the real contents of that page descriptor points to.I found...
View ArticleWant to run Spark(scala) kernel inside Jupyter Notebook. Getting OSError:...
Traceback (most recent call last): File "c:\users\rdx\anaconda3\lib\runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "c:\users\rdx\anaconda3\lib\runpy.py", line 85, in _run_code...
View Articlekernel vs user-space audio device driver on macOS
I'm in a need to develop an audio device driver for System Audio Capture(based on Soundflower). But soon a problem appeared that it seems IOAudioFamily stack is being deprecated in OSX 10.10 and later....
View ArticleJava - How to create Entry Point and Kernel to read contactless card
I want to develope Entry Point and Kernel to read VISA contactless card. I researched and found in some documents: <br/> - A-Architecture-and-General-Rqmts-v2-8-final <br/> -...
View ArticleMapping physical address to user space, dealing with cache issues
In a project I’m working on there is a need for a buffer reside in the DDR. This buffer needs to be accessible to both the SW, and the HW (FPGA). The SW is doing some calculation on this buffer and...
View Article32 bit kernel compiling using make-kpkg on a 64 bit Ubuntu 16.04 failed
i tried to compile a 32 bit kernel using make-kpkg for the atom machine on a 64 bit ubuntu server machine but it failed and get the following error message:====== making target...
View ArticleErrors occurred while inserting kernel modules
I made a kernel module and inserted it using sudo insmod syscall-hook.ko, but I got the following message.syscall-hook: loading out-of-tree module taints kernel.syscall-hook: module verification...
View ArticleWhy need seprate IOREMAP and KMAP, when they both map cpu physical address...
In case of memory mapped IO : Both Memory mapped IO and RAM are in same CPU physical address space. When we map any higmem memory we use kmap and when we need to map memory mapped IO we use ioremap So...
View ArticleLinux kernel module crash debug: general protection fault: 0000 [#1] SMP
I have a kernel module for splitting incoming rtp packets and merging rtp outgoing packets. The program crashes once in 2/3 days. If would be very convenient for me if its possible to find the exact...
View Article