Tagged Questions
2
votes
3answers
80 views
Linux kernel module freezing the computer while iterating over running processes to access process opened files
I am developing a kernel module using kernel version 3.x.
I have a function that is responsible to determine if a running process has a given file opened.
Here is my code (see my comments after):
...
1
vote
1answer
439 views
Simple interrupt handler: request_irq returns error code -22
I am writing a simple kernel module, which could register an interrupt and handle it.
However, when I try to register interrupt by calling the request_irq function,
it returns error code -22 :
...
0
votes
1answer
78 views
C - Linux - kernel module - TCP header
I'm trying to create linux kernel module, that will inspect incoming packets. At the moment, I'm in process of extracting TCP header of packet and reading source and destination port -> However I'm ...
-1
votes
0answers
32 views
How to read thread context from kernel module
I can intercept pagefaults in my kernel module(linux). I need to read ESP register, which the process had before switching the context. How can i do it?
I tried current->thread.sp, but it doesn't ...
0
votes
3answers
314 views
Arduino + RN-42 Bluetooth module HID
I am trying to make a "keyboard" with my Arduino Mini Pro and a RN-42 HID Bluetooth module. I can connect to it with my MacBook and it shows up as a Bluetooth keyboard. Also, I can press buttons and ...
-3
votes
1answer
51 views
removing from the output of NETSTAT
I am new here.
So I am developing a Linux Kernel Module, and want to hide an open socket on a specific port number from the output of sudo netstat -nap
What is the approach that I should take? I ...
1
vote
1answer
49 views
return http error code from CGI C module
I've a CGI module written in C & for some condition I want to return HTTP error 400 from this module. The problem is - I don't know how to return HTTP error from the module.
Looks like the ...
1
vote
0answers
75 views
Loading kernel module from C user space application
I'm trying to load a kernel module from C using kmod, but it's not working at all.
Here's what I have:
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include ...
5
votes
2answers
177 views
Is there a timeframe for the Apple C modules coming to Xcode toolchain?
There’s a presentation by Doug Gregor from Apple about a new modules feature in C, C++ and Objective-C. It feels obvious that this feature is going to end up in the Xcode toolchain. Is there a ...
7
votes
3answers
2k views
addr2line on kernel module
I'm trying to debug kernel module. I suspect to have there some memory leaks. To check it I have prepared build with enabled Memory leak debugging for kernel and modules. And I got some warning from ...
0
votes
1answer
180 views
Log the REQUEST_URI variable when php is set to log to syslog
This is the source code of php_log_err. I would like to modify it to be able to log the variable _SERVER["REQUEST_URI"]
/* {{{ php_log_err
*/
PHPAPI void php_log_err(char *log_message TSRMLS_DC)
{
...
-2
votes
1answer
52 views
GCC module dependencies
Is there a way to compile app which using cross module dependencies?
When I try to compile modules using standard function & other module functions
gcc module.c -c
gcc module2.c -c
gcc module.o ...
6
votes
1answer
204 views
C - Write to physical memory from kernel module
In the kernel module, I need to handle the interrupt by writing a "zero" to address of physical memory.
First of all, I should allocate a memory by some function like "mmap", but for kernel module; ...
3
votes
2answers
87 views
Suspend the program execution until interrupt is handled - how to achieve that?
I have created a kernel module, which handles interrupts. Also, there is a C program.
This program causes interrupts during its execution. When the interrupt is coming, the program should be ...
1
vote
0answers
86 views
Linux Kernel Module / Protocol Registration
My question is regarding Linux Kernel Module Programming, AF Registration, and Protocol Registration (e.g. AF_INET , sock_stream).
Goals:
I want to create a new Address Family and register it in ...