linux-kernel

how to suspend data for multi function sd card

I have a multi function SD device which is controlled by two different driver. One driver need to suspend the other driver data transfer while sending data to underline bus driver. The suspended transfer will resume once the high priority transfer is done. SD specification supports it. Can anybody please let me know how to do that in Lin...

Linux Kernel Programming: “Unable to handle kernel NULL pointer dereference at virtual address [address]”

For a class assignment, we are writing a custom syscall which pulls certain information about the existing process tree. The syscall is working fine for the most part and gets the appropriate information. However, a few processes it, in crashes with the error message, "Unable to handle kernel NULL pointer dereference at virtual address...

How Linux Operatin g System maintains Page Table ?

Does page table per Process or per System ?. Is KERNEL maintain entire single shared page table for all process ? ...

What is the difference between DMA and memory-mapped IO?

what is the difference between DMA and memory-mapped IO? They both look similar to me. ...

Function to corrupt kernel stack

I am currently testing the kernel back tracing mechanism ( like dump_stack and frame_unwind ). I want to know whether the kernel back tracing mechanism can still give the back trace if the kernel stack got corrupted. If not, then what would be the output in that case. Please suggest me a way so that I can corrupt the kernel stack by writ...

Linux Paging and interrupt handler

Dear Sir/Madam, I am trying to implement ready boost feature in LINUX for my final year undergraduate project.I was just researching and I found out that whenever a page fault occurs the CPU sends Interrupt 14.So, I need your guidance on the foll scheme I am thinking of: I will create an interrupt handler which will be activated when an ...

how to use CryptoAPI in the linux kernel 2.6

I have been looking for some time but have not found anywhere near sufficient documentation / examples on how to use the CryptoAPI that comes with linux in the creation of syscalls / in kernel land. If anyone knows of a good source please let me know, I would like to know how to do SHA1 / MD5 and Blowfish / AES within the kernel space o...

Embedded Linux Read and Write Video from a USB port

I've got an embedded Linux project where I need to read video in through a USB port, make some modifications to that video (such as compression), and then send it back to the host via preferably the same USB port. It would also be a preferred feature if we could send commands to change things such as the video compression level from the ...

AF_UNIX in windows

Hi, I have an application that I wish to use over windows. I am using AF_UNIX family un windows. I wish to know that AF_UNIX family is available in windows. If not then is there any alternate to AF_UNIX ? Thanks Arpit ...

convert jiffies to seconds

I've got a piece of userspace code which is parsing /proc/PID/task/TID/stat to get the cpu usage. I can use HZ to get the jiffies per second but this code could move to another machine which has a different configured value. Is there any way to get the value of HZ from userspace at runtime? ...

access ARP header in socket buffer

Hello, embedded system (kernel 2.4.20). In my driver I need to access ARP header fields, including MAC addresses; unfortunately in include/linux/if_arp.h those specific fields are commented . So I've tried to define my own 'arp_hdr' structure in my code with necessary fields: struct arp_hdr { /* all the fields taken from include/li...

Creating a System Call in Linux

We just got a midterm project today for my "operating systems" course, we are requested to implement a system call (and I guess I assume we'll have to write a piece of code to call it). I understand I'll need to update the table of the system calls (can't remember the name, but no biggie), as well as create a kernel module that the tabl...

Is kernel a process?

In Linux, we always say the first process is init(pid==1). but why is not the kernel(startup) which setup the system and create init process. Is kernel a process? We know all the user space threads are rooted at init process. then what about scheduler and other kernel stuff, like memory management? Basically, what confuses me is the ...

usbserial.ko for linux kernel 2.6.29.6

I need usbserial.ko for my linux 2.6.29.6. Anyone knows where to download it and how to integrate it into my current kernel? Thanks. ...

what is the difference between memory mapped io and io mapped io

Pls explain the difference between memory mapped IO and IO mapped IO ...

how to install module onto linux kernel 2.6.29

I plan to install module usbserial.ko into my linux kernel 2.6.29, anybody knows the procedure? Thanks ...

Stripping down a kernel in linux?

I recently read a post (admittedly its a few years old) and it was advice for fast number-crunching program: "Use something like Gentoo Linux with 64 bit processors as you can compile it natively as you install. This will allow you to get the maximum punch out of the machine as you can strip the kernel right down to only what you need."...

Implementing a network pager as an alternative to disk paging. Suggestions?

Hi guys, I am working on a project where I am required to create a page fault handler that uses memory from a different computer connected via a network as opposed to redirecting page faults to the local hard disk. Our idea parts from the assumption that, with the speed of the networks nowadays, it would be advantageous to use remote mem...

Lock or Pin java process into memory

Hi, Is there a way to lock a java process into memory. Using something like mlock/mlockall it is possible to lock the memory of a process into memory, so that it doesn't get swapped out. With this approach is it possible to write a C wrapper before invoking the java process to lock the java process into memory? If so, how would the wr...

Is there any safe way to get the number of tasks currently waiting on a completion?

I have a nice kernel programming assignment involving a novel kernel locking method, and my group and I have chosen to implement it as a wrapper around a completion. However, the specification requires that we return the number of processes notified by our method, which involved returning the number of processes awoken by complete_all in...