kernel

What does ObjectName(parameter) refer in the structure OBJECT_ATTRIBUTE?

hi all, I found this structure called OBJECT_ATTRIBUTE in one of the nt dll functions..I was curious to know about that structure and I went through its documentation(msdn)...In the OBJECT_ATTRIBUTE structure there is a parameter called PUNICODE_STRING objectName...As per the msdn documentation..it says that the objectName "the name...

Not able to include ntifs.h in win32 project

I tried to use the function called NTCreateFile. When I compiled it gave me an error saying "_NTCreateFile identifier not found". I inlcuded the header winternl.h. So next I tried to use ZwCreatFile, as per MSDN I included ntifs.h, but I am not able to include that header. It says "not able to open/find the directory". I am using V@2008...

how to identify process in kernel read func without using current->pid

my lecture wants us to build module where we need to identify each read process and where the same read process called twice on the same writer massage we should insert him to an queue who's we wake up when all readers have read I achieved this goal by by using list of pid's and boolean read/not_read inside each node but he decided to ...

How to R/W hard disk when CPU is in Protect Mode?

I am doing some OS experiment. Until now, all my code utilized the real mode BIOS interrupt to manipulate hard disk and floppy. But once my code enabled the Protect Mode of the CPU, all the real mode BIOS interrupt service routine won't be available. How could I R/W the hard disk and floppy? I have a feeling that I need to do some hardwa...

I am not able to inlcude NTDDk header!

hello all,I am trying to include the header but its unreconized..Do I need to change any project settings..help me please!! ...

Mac OSX: Passing a file from user process to kernel module.

Hello, I need to pass a link to file from a user process to the OSX kernel driver. By link i mean anything that uniquely identifies a file on the local filesystem. I need that link to do I/O on that file in kernel. The most obvious solution seems to pass a file name and use a VFS vnode lookup. However i noticed, that Apple Disk Images h...

caching data packets.

Not sure if this is the right place to ask, but here goes.... I implemented a UDP client/server using normal sockets in linux. (Assuming there is nothing on the network side between these 2 hosts that interferes with the packet in any way, but just pass it on as is) Does the kernel do any kind of caching/optimization of these UDP pack...

how to add language support to android

hello i hope someone put me on the right direction with my problem i want to work on supporting my language, specially the writing on android we use Arabic characters with little modification ( like parsi, urdu etc).. i was hoping android has fully supported Arabic , then i would make changes to work with my language. but even 2.2 dos...

Reliability of UDP on localhost

I know that UDP is inherently unreliable, but when connecting to localhost I would expect the kernel handles the connection differently since everything can be handled internally. So in this special case, is UDP considered a reliable protocol, or will the kernel still potentially junk some packets if buffers are overrun? ...

Simultaneous launch of Multiple Kernels using CUDA for a GPU

Is it possible to launch two kernels that do independent tasks, simultaneously. For example if I have this Cuda code // host and device initialization ....... ....... // launch kernel1 myMethod1 <<<.... >>> (params); // launch kernel2 myMethod2 <<<.....>>> (params); Assuming that these kernels are independent, is there a facility to...

core at which function is running

hi, consider a kernel tasklet scheduled and executing the tasklet function. Is there a way to know which core the tasklet is running ? I mean is there a function / variable to know at which core the tasklet is running at. Architecture is arm. Thanks! ...

How can I work out what events are being waited for with WinDBG in a kernel debug session

I'm a complete WinDbg newbie and I've been trying to debug a WindowsXP problem that a customer has sent me where our software and some third party software prevent windows from logging off. I've reproduced the problem and have verified that only when our software and the customers software are both installed (although not necessarily ru...

How to load kernel into memory, from an ISO.

Hello fellow nerds! At compile-time I link my Assembly bootstrap together with my kernel, into an *.img file, which I then convert into an *.iso image using MagicISO. I then boot from this *.iso image. But the problem is that I want to read the second sector of the file (the kernel) into memory at 0x1000. But I only know how to do so, wi...

How to call usermode from Windows kernel?

Hello, I'd like to call my app from my driver when an interesting event happens in the Windows kernel. I need to be able to pass at least 4 bytes of data back to user mode. How to achieve this? These events might happen quite, but not too, often, so I don't want to build a queue system and use IOCTLs. I was thinking of something like t...

What does "soft/hard nofile" mean on Linux

When I tried to install a software on RedHat EL5, I got the error that the expected value of soft/hard nofile is 4096 while the default is 1024. I managed to increase the number, but I don't know what the parameters are. Are they refering to soft link and hard link? The way I change it is: A) modify the /etc/security/limits.conf user s...

Suggest user-mode filesystem filter framework plz

I need a user-mode filesystem filter (not virtual filesystem). One of such frameworks is http://eldos.com/cbflt/, but it has some bugs and I need an alternative. Suggest similar frameworks. ...

How to force Mac to into dirty shutdown state on every power off?

As Far as I can tell no one has actually solved this debacle. How do you get a mac mini to power on every time the UPS it is connected to restores power? It is easy enough to have the UPS communicate that power is about to turn off so have the mac run the command halt -u, or shutdown -h -u, etc, and many solutions such as powerchute from...

how to get page size

I was asked this question in an interview Plz tell me the answer :- You have no documentation of the kernel. You only knows that you kernel supports paging. How will you find that page size ? There is no flag or macro you have that can tell you about page size. I was given the hint as you can use Time to get the answer. I still have no...

module_init and init_module of linux

I have been trying to port few linux drivers and realized that there is substantial difference between kernel version 2.4 and 2.6 of linux. In the 2.4 version of kernel, the module programming was as below - #define MODULE #include <linux/module.h> #include <linux/kernel.h> int init_module(void) { printk(KERN_INFO "Hi \n"); re...

Accessing any memory locations under Linux 2.6.x

Hey All, I'm using Slackware 12.2 on an x86 machine. I'm trying to debug/figure out things by dumping specific parts of memory. Unfortunately my knowledge on the Linux kernel is quite limited to what I need for programming/pentesting. So here's my question: Is there a way to access any point in memory? I tried doing this with a char p...