kernel-programming

Is there a way to figure out what is using a Linux kernel module?

If I load a kernel module and list the loaded modules with lsmod, I can get the "use count" of the module (number of other modules with a reference to the module). Is there a way to figure out what is using a module, though? The issue is that a module I am developing insists its use count is 1 and thus I cannot use rmmod to unload it, b...

What is a good barebones linux distro for beginner kernel development?

In my Operating Systems class we are looking to modify a Linux kernel with some simple system calls of our own in C. What would be a good distro suited for this purpose? We don't need any frills, no GUI, a vanilla kernel, etc. The more basic the better. ...

Getting the process id of a current process without unistd.h

I'm working on a deadlock detection algorithm and I'm only given kernel level libraries, i.e. #include <linux/somelibrary> and nothing else. Are there kernel-level facilities that will allow me to get the pid of the current process similar to getpid() of unistd.h? ...

Is there an advantage of the operating system understanding the characteristics of how a thread may be used?

Is there an advantage of the operating system understanding the characteristics of how a thread may be used? For example, what if there were a way in Java when creating a new thread to indicate that it would be used for intensive CPU calculations vs will block for I/O. Wouldn't thread scheduling improve if this were a capability? ...

Kernel Scheduling for 1024 CPUs

Azul Systems has an appliance that supports thousands of cache coherent CPUs. I would love insight into what changes would need to occur to an operating system in order to schedule thousands of simultaneously running threads. ...

Any experience with SANOS operating system kernel?

I was browsing for an open source kernel when I ran across SANOS which feels like something worth keeping alive as open source. To bring it up to modern standards, the following enhancements need to occur: Support for Multiple CPUs/Cores Add IPv6 (currently only supports IPv4) Ability to run 8192 concurrent threads Ability to support ...

What Java application is available to stress-test a virtual machine?

I am interested in ways to stress-test as well as benchmark the SANOS operating system kernel. ...

how to dump (print) an OSDictionary to the console / log?

I would like to inspect the contents of an OSDictionary from my kext. is there a convenient way to print the contents to system.log or similar? (ala CFShow()) ? thx->adv, |K< ...

Building a custom BSD version that supports only Java

What is the process I should use to accomplish the goal of building a version of FreeBSD that is capable of running a Java VM but not capable of any other functionality including, but not limited to: Running any process other than the Java VM Disabling any/all shell access When the Java VM exits, the OS shuts down I need to support J...

Running Ruby without a traditional operating system?

In the world of Java, BEA (now Oracle) has created LiquidVM which doesn't require an OS. Likewise, there are a variety of open source projects including SANOS, JNODE OS, Project Guest VM, JavaOS, etc. Is there an equivalent being created for Ruby? ...

Writing a kernel mode profiler for processes in python.

I would like seek some guidance in writing a "process profiler" which runs in kernel mode. I am asking for a kernel mode profiler is because I run loads of applications and I do not want my profiler to be swapped out. When I said "process profiler" I mean to something that would monitor resource usage by the process. including usage of ...

splitting a full filename into parts

I am creating a function that will split a full unix filename(like /home/earlz/test.bin) into its individual parts. I have got a function, and it works for the first two parts perfect, but after that it produces erroneous output... strlcpy_char will copy a string using term as the terminator, as well as 0. If it is terminated with term...

Mac driver development

I am thinking about migrating a Windows driver into MAC OS X. Now I am just starting to look around to see what is available and there is a lot about objective C and cocoa. Seems that the language and the cocoa framework are high level APIs, am I right to assume that? I have strong C++ skills and I use them for kernel development, can I...

FireLog: proper installation...

I have installed the firewiresdk26 on my dev mac... and in the Tools/ directory is FireLog. I have run the FireLog 2.0.0.pkg installer on my dev mac, but the payload it deploys is installed in my /System/Library tree, as opposed to my /Developer/SDKs tree. so when I try to include the header iokit/firewire/FireLog.h it does not get found...

How do I know which OSBundleLibrary to include when using XCode?

Hi guys, It seems that I am doing something wrong or the linker is not very good in xcode (I imagine is the first situation :) ) but I found that I need to manually add the OSBundleLibrary references on the plist. The problem is that sometimes I don't know which bundles should I include, for example, I am building a kernel extension an...

a question regarding NTFS filter driver

hi, does anyone have an article regarding writing filter drivers for the NTFS ? another question - when im writing a filter driver for NTFS, can I just pass down my IRP using IoSkipCurrentIrpStackLocation(...) and IoCallDriver(...) when I get MajorFunction I dont want to take care of ? ofcourse the call to IoCallDriver will include a ...

Windows Process Descriptor

There is a Flink and Blink (Forward Link and Backward Link) for a double-linked list of processes. There is a process identifier. All of this is packed in a struct that is referenced to as PEPROCESS or _KPROCESS. But where are those and what are the other elements in this structure? Or, if the answer is neither short nor simple, where ...

DbgPrint in Memory Dump?

I have a driver that directly avoids the BSoD and turns the screen of Windows Vista into black with few colourful dots and stripes. I am finding a memory dump on the system afterwards and DbgView is wonderfully showing me a stack trace (stating that this might be a garbled stack and some parts might be incorrect). Pity is, the commands f...

[linux kernel] get _complete_ process name from pid

hi, I am in a kernel module and I want to have the whole process name from a given pid. exactly: I want the line which is hold in /proc/PID/cmdline. The problem is that task_struct->comm[] is only 15 bytes long and doesn't handle if a program changes his argv[] manually or via setproctitle(3)... any ideas? :) ...

Linux kernel modules - security risk?

How much of a security risk are linux kernel modules? I remember reading that it was possible if someone got access, that all they had to do was load a rootkit module. Is this correct? Is there any way to protect against this? What parts of the kernel are actually exposed through the module interface, and what functions do programmers h...