kernel

Linux kernel /proc FIFO/pipe

I'm currently trying to create a kernel module that will produce data based on kernel events and push them to a file. After reading that this is bad (and I agree), I decided it would make more sense to have the data in a /proc file that a user program could pull from when necessary. However, this idea led to all sorts of problems, part...

how do you diagnose a kernel oops?

Given a linux kernel oops, how do you go about diagnosing the problem? In the output I can see a stack trace which seems to give some clues. Are there any tools that would help find the problem? What basic procedures do you follow to track it down? Unable to handle kernel paging request for data at address 0x33343a31 Faulting instru...

Finding out why a process is spending time in the kernel in win32

I'm compiling a vc8 C++ project in a WinXp VmWare session. It's a hell of a lot slower than gcc3.2 in a RedHat VmWare session, so I'm looking at Task Manager. It's saying a very large percentage of my compile process is spent in the kernel. That doesn't sounds right to me. Is there an equivalent of strace for Win32? At least somethin...

What is __gxx_personality_v0 for?

This is a second-hand question from an OS development site, but it made me curious since I couldn't find a decent explanation anywhere. When compiling and linking a free-standing C++ program using gcc, sometimes a linker error like this occurs: out/kernel.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' This is appar...

Linux Kernel Programming: "Unable to handle kernel NULL pointer dereference"

I'm writting a Linux module (Kernel Programming), and I`m getting: "Unable to handle kernel NULL pointer dereference" What does it mean? ...

How to UDP Broadcast from Linux Kernel?

I'm developing a experimental Linux Kernel module, so... How to UDP Broadcast from Linux Kernel? ...

How to arrange a Makefile to compile a kernel module with multiple .c files?

How to arrange a Makefile to compile a kernel module with multiple .c files? Here is my current Makefile. It was auto generated by KDevelop TARGET = nlb-driver OBJS = nlb-driver.o MDIR = drivers/misc EXTRA_CFLAGS = -DEXPORT_SYMTAB CURRENT = $(shell uname -r) KDIR = /lib/modules/$(CURRENT)/build PWD = $(shell pwd) DEST = /lib/modules/$...

Windows process structure: How to store user information?

Hi, I want to store some information in the EPROCESS structure of the process in windows NT kernel. My aim is that when winlogon is called I want to assign a unique value to the next process based on which user logs in. But I do not know where to store this unique ID. I have tried and succeeded in modifying some information (like the t...

Queues in the Linux Kernel

I've been searching for information for a common kernel implementation of queues, that is, first-in-first-out data structures. I thought there may be one since it's likely something that's common to use, and there's a standard for linked lists (in the form of the list_head structure). Is there some standard queue implementation I can't...

How to write Linux driver module call/use another driver module?

I'm developing a Linux driver loadable module and I have to use another device in my driver.(kind of driver stacked on another driver) How do I call/use another driver in my driver? I think they are both in the kernel so there might be a way that can use another driver directly. ...

How good is the linux kernel in the new Quad Core processors running multithreading application

Hello, Is there anyone here with experience in the linux thread scheduler running multithreading applications in the new Quad core processors?. If there is someone like that can you please write here your experience about how is the performance of the kernel managing the different threads, Have you experienced any thread starving or the...

Multithreading and Interrupts

I'm doing some work on the input buffers for my kernel, and I had some questions. On Dual Core machines, I know that more than one "process" can be running simultaneously. What I don't know is how the OS and the individual programs work to protect collisions in data. There are two things I'd like to know on this topic: (1) Where do int...

How does one submit a potential patch to the Linux kernel?

We have some software which relied on certain behavior from an another (very commonly used) application that has now changed, rendering our current implementation workable, but less than optimal. We believe that this change may have affected a number of other applications, particularly in the performance monitoring arena, and we have fo...

Forcing driver to device match

I have a piece of usb hardware, for which I know the driver. However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ? ...

Is it safe to wake_up_interruptible() from within a tasklet?

I have a kernel module that provides data to a userland process through read(). That process blocks on read until data becomes available. I achieve this through a wait_event_interruptible() in the read method. Data comes from an interrupt handler, which sucks it into memory, then schedules a tasklet to process it. The original code sche...

How does an Amazon EC2 instance select its kernel ?

I have an Amazon EC2 instance using the Amazon-supplied Fedora 8 64-bit AMI, which I would like to upgrade to Fedora 10. I tried doing this by running "yum update" to upgrade the kernel and all packages. This seemed to work fine and I see that I now have the fc10 kernel installed, and all of my installed packages have also been updated...

What are some minimal requirements of a device in order to make it possible to write a device driver for it?

I started lately reading some articles about the kernel space and especially about device drivers. So I was wondering are there some minimal requirements for a device in order to make it easy to write a device driver for it? ...

compiling multiple files in netfilter

How can I compile multiple files (files calling functions in other files) in kernel module? ...

linking multiple files kernel module programming

I am just writing a test file and then i am trying to call a function inside my kernel. Can somebody tell if i am making a mistake in my makefile or my code?? I wanted to call my int d = add(2, 4); function but the program does not seem to link test.c file with sourceadd2.c. /* sourceadd2.c */ define KERNEL define MODULE include "t...

learning to program Windows drivers

what would you recommend for a resource on learning to program drivers. i am working my way through Programming the Microsoft Windows Driver Model, but i was wondering if any of the examples are vista compatible. additionally, the book is more of a reference of the kernel functions so far. is their a resource that will take the beginner ...