kernel

What are the best practices for building a front panel interface?

I have been asked to package an application in appliance form factor and would like to understand best practices around building a front panel interface. I am looking for guidance around: Design of the UI and menu system Making this type of code portable to multiple types of hardware Having a Java application send status information to...

Search for kernel source code of HID.c v 2.6.27.14

Dear All I am looking for linux kernel source code for hid module hid.c for kernel version 2.6.27.14 Thanks & regards, madni madni[AT]gmail[DOT]com ...

What kind of Mac driver should I need to build in order to intercept the file system?

In the Windows world I can create a file system filter (upper or lower) in order to hook my driver to action when a file is changed (for example auditing or creating virtual drives). Do you know which is the similar model in a Mac? the I/O Kit talks about driver development but does not specify the storage model or file system. Is ther...

"Lock on the Kernel Object" on windows can make the entire system unresponsive?

There's this WIN32 process, which someone says: The servide takes a lock on the kernel object and does not release. After a while the machine becomes irresponsive and has to restarted. Restanting only the service won't fix the issue. According to my knowledge applications were not supposed to be able to crash the entire sys...

What parts of Linux kernel can I read for fun?

Programming isn't my main job, though I enjoy it and sometimes get paid for it. For many years now I've been hearing about Linux and my friends have shown to me many *nixes (or *nici?), though I stick with Mac OS. Do you think there are any parts of the Linux kernel that I could enjoy looking at, that would help me understand what's the...

The same driver for multiple network cards -- performance bottleneck?

I'm using driver e1000e for multiple Intel network cards (Intel EXPI9402PT, based on 82571EB chip). The problem is that when I'm trying to utilize maximum speed (1GB) on more than one interface, speed on each interface starts to drop down. I have my own driver in kernel space designed to just sent given packets. It just allocs packets b...

How to include math.h #include <math.h> on kernel source file??

I am trying to include math.h in my Linux kernel module. If I use, #include '/usr/include/math.h' It give me theses errors: error: features.h: No such file or directory error: bits/huge_val.h: No such file or directory error: bits/mathdef.h: No such file or directory error: bits/mathcalls.h: No such file or directory Why is this? ...

Linux executable/binary file format

As all linux distributions use the same linux kernel, is there any difference between their executable binary files? If yes, what are the main differences? Or does that mean we can build a universal linux executable file? ...

How does GDB find the symbol of a function when backtracing in MIPS Linux?

I'm trying to implement a function to backtrace a crashed user space process in kernel. Since, I'm working in Kernel, I don't have the luxury of any libraries and provided backtrace function doesn't support MIPS architecture. I'm just wondering if I can emulate what GDB does. The version of the kernel is 2.6.21. ...

How to build twice the same Linux Kernel sources and get the the same checksum

I'm searching if it's possible to build twice the same Linux Kernel (same sources, same environment, same options, same compiler) and get the the same checksum. Anybody knows how to do? ...

How does Windows protect transition into kernel mode

How does Windows protect against a user-mode thread from arbitrarily transitioning the cpu to kernel-mode? I understand these things are true: User-mode threads DO actually transition to kernel-mode when a system call is made through NTDLL. The transition to kernel-mode is done through processor-specific instructions. So what is spe...

unlocked_ioctl vs normal ioctl

In my driver's file_operations structure, I have: struct file_operations Fops = { read: device_read, write: device_write, unlocked_ioctl: device_ioctl, ... }; I.e. there is no ioctl field used. Is this sufficient to avoid Big Kernel Lock and enter into device_ioctl() without any synchronization? Or do I have to change i...

__udivdi3 undefined. Howto find code?

Compiling a kernel module on 32-Bit Linux kernel results in "__udivdi3" [mymodule.ko] undefined! "__umoddi3" [mymodule.ko] undefined! Everything is fine on 64-bit systems. As far as I know, the reason for this is that 64-bit integer division and modulo are not supported inside a 32-bit Linux kernel. How to I find the code issueing th...

What kind of C is an operating system written in?

It makes sense that something like an operating system would be written in C. But how much of it, and what kind of C? I mean, in C, if you needed some heap memory, you would call malloc. But, does an OS even have a heap? As far as I know, malloc asks the operating system for memory and then adds it to a linked list, or binary tree, or so...

problems communicating with driver from user mode

I have a driver I've written, and I created a symbolic name to it. The symbolic name is ... L"\\DosDevices\\somename" ... and when I try to access the device object using CreateFile from usermode, I always get error code 3 (Path not found). I tried using CreateFile with the following paths ... L"\\\\.\\somename" L"\\Device\\somenam...

bsod every time a handle to a driver is created

hello, im writing a driver and I have a problem everytime I try to open a handle to my driver using CreateFile, I get bsod (Access Violation) It's important to mention that my driver loads successfuly and I dont get any errors does someone knows how to handle it ? Thanks in advance! ...

Designing a Linux-based system for transferability of ownership/admin rights without total trust

Inspired by a much more specific question on ServerFault. We all have to trust a huge number of people for the security and integrity of the systems we use every day. Here I'm thinking of all the authors of all the code running on your server or PC, and everyone involved in designing and building the hardware. This is mitigated by reput...

How does blocking mode in unix/linux sockets works?

Does blocking mode put that particular task in a "Process Wait" state, as i think non-blocking sockets needs a "busy-wait" or "spin-lock" implementation, explicitly from the user. Or blocking mode sockets are nothing but implicit-implementations of busy-wait by the kernel. In locking mechanisms like semaphores/mutexes/monitors a lock is...

How does a "kill" work? And especically how does a "kill" work on blocked proces?

Who in the kernel is responsible for killing a process. What if a "kill" comes, and the process is in the blocked state. Does the kill waits until the process comes to running state to clean himself. If someone can answer more in terms of kernel, like when a SIGINT from the kill command is generated, what all is invoked by the kernel...

How could I detect when a directory is mounted with inotify?

I'm using Linux Inotify to detect FS events on my program. How could I be notified when a device is mounted on a monitored directory? ...