kernel

Current Linux Kernel debugging techniques

A linux machine freezes few hours after booting and running software (including custom drivers). I'm looking a method to debug such problem. Recently, there has been significant progress in Linux Kernel debugging techniques, hasn't it? I kindly ask to share some experience on the topic. ...

Is MODULE_LICENSE in a Linux Kernel Module legally binding?

I own a piece of proprietary hardware purchased from a company. They also provide a Linux kernel module for it, but it is incompatable with my kernel version and I'd like to get the source code to it to fix it. The License file that comes with the software claims the software is under a proprietary license. However during my efforts to m...

Difference between interrupt and event.

What is the difference between interrupt and an event ? I am very confused between this two. Please clarify me. ...

how to monitor the syslog(printk) in a LKM

deal all, i am a newbie for writing Linux Kernel Module. i used printk function in linux kernel source code (2.4.29) for debugging and display messages. now, i have to read all the messages i added via httpd. i tried to write the messages into a file instead of printk function, so i can read the file directly. but it's not work ver...

Is the linux kernel's list.h thread safe?

Is the linux kernel's list.h thread safe? Thanks, Chenz ...

What kind of kernel does MS Windows have?

I saw a question on Linux Kernel. While reading that I had this doubt. LInk to that post : http://stackoverflow.com/questions/1806585/why-linux-is-called-monolithic-kernel ...

Reverse Engineering an Apple Kext - Reconstructing the Class

Greetings! I am currently attempting to extend the functionality of the Magic Mouse. To do this, I am hoping to write a kext that intercepts events from the multitouch driver, AppleMultitouchDriver.kext, interprets them, and either dispatches new events or forwards the actual event. This approach is similar to the approach used by Doubl...

[ Nachos ] Write and test sub func

I'm trying to write sub func for nachOS but when I combines it doesn't work. Don't know the reason. Details: In ../userprog/syscall.h Add : #define SC_Sub 11 int Sub(int a, int b); In ../test/ .globl Sub .ent Sub Sub: addiu $2,$0,SC_Sub syscall j $31 .end Sub After that I write a sub.c: #include "syscall.h" int main() { ...

Call Tracing Windows Driver

I wish to be able to record, in real time, the activity of a kernel mode driver (I have the full symbols for it). It's a HID miniclass driver. I wish to record the execution of calls in this driver (stacktraces every time an IRP enters and leaves the driver). Is this possible (maybe with EWT and/or WPT)? ...

Using static data structures for DMA

I had a driver for linux kernel (2.6.18) in which I used kmalloc(sizeof(my_struct_t), GFP_ATOMIC) to allocate memory which was later used for data transfer using DMA controller of some device. Later I had to increase the size of my_struct. It became too large so that the kmalloc() code used static assertion and compiled __you_cannot_kmal...

Difference between monolithic and microkernel

what is the difference between monolithic and microkernel. ...

Flushing the page cache associated with an inode

Hi, I modified the block mapping in an inode and want to flush the page cache associated with the inode so that the new inode with new mapping will be loaded from disk. I tried below functions but it works some time and fails some other time. invalidate_mapping_pages() - for flushing non-dirty pages truncate_inode_pages() - for flushin...

Is writing to a socket an arbitrary limitation of the sendfile() syscall?

Prelude sendfile() is an extremely useful syscall for two reasons: First, it's less code than a read()/write() (or recv()/send() if you prefer that jive) loop. Second, it's faster (less syscalls, implementation may copy between devices without buffer, etc...) than the aforementioned methods. Less code. More efficient. Awesome. In U...

NASM accessing sound card directly (No OS)

I'm attempting to write a very simple OS in ASM and C. (NASM assembler) I would like to access the sound card directly, with or without drivers. If I don't need drivers, how could I access and send a sample audio file to the sound card? (An example would be nice) If I do need drivers, is there anyway to interface them and call functions ...

What could cause the dead loop, indicated by print "Dead loop on virtual device " in linux kernel?

The print comes when the 'current lock owner' of a kernel resource is current CPU. I don't know what could lead to this condition. Couldn't find much on the net. Anyone debugged this? ...

how to intercept linux signals ? (in C)

hi everyone, I need to intercept and trace signals from any binaries, like strace does it under linux. I don't need a so verbose output like the real one strace. I just want to know how it works, how can I intercept signal and how can I trace them. Thanks in advance :) ...

Start service in kernel mode (Vista)

I'd like to start service before user mode is loaded (in kernel mode). The reason is I wanna run several system applications(asm code to write data to BIOS) that are not allowed in user mode (privileges problem). That's why I got an idea: 1. Write windows service 2. Start and run it in kernel mode Is it possible? Are there any other wa...

Is there a bash script to parse the output of smaps

I need to parse the output of "proc/pid/smaps" on a linux system. Running a perl/python script on this system is not an option. I was looking to see if there's a bash script to do the same. Alternately, it would also be OK is there's a script (any script) which takes in output from /proc/pid/smaps in text format, and parses the informa...

Set video mode to 1920x1080 (HD) or higher in kernel ASM (NASM assembler)

I would like to set the video mode in a ASM kernel I'm working on to a video mode 1920x1080 or higher (or at least higher than the usual limit in VESA). Is there anyway to do that, and if so, provide sample code? I'm using NASM to code the kernel. ...

kernel stack vs user-mode application stack

Is the kernel stack a different structure to the user-mode stack that is used by applications we (programmers) write? Can you explain the differences? ...