Frequently Asked Questions about the Ring Cycle

Q: Some of the parameters to f_ops functions are pointers to kernel structures. How can the driver use those now?

A: These data structures are mapped into the driver's address space using the page tables for the duration of the call. So the driver can access the struct file*, struct inode*, etc.

Q: What about interrupts??

A: Drivers can request interrupt lines normally with request_irq. When the interrupt happens though, instead of executing the code immediately, the kernel schedules a driver thread to execute the interrupt handler. The interrupt handler is thus executed later, more like a DPC (deferred procedure call) or tasklet.

Q: What about current??

A: As all kernel programmers know, the current macro is very useful. It provides a pointer to the task_struct (PCB) for the currently running process. But the implementation involves rounding down the kernel stack pointer to find this structure, which obviously would not work in a lower privilege ring. Therefore, current is implemented as a function which calls through a call gate to a kernel function which returns it a pointer in its address space that is mapped to its task_struct. The first time this function is called the kernel sets up the mapping and this mapping is not destroyed until the driver thread exits to improve performance. Note though that this current is that of the DRIVER thread, NOT the user process. Certain features of the user process (including capabilities) are copied to the driver's task_struct though.

Q: What architectures does the Ring Cycle support?

A: The Ring Cycle currently supports x86 and will not be ported to any others. It takes advantage of segmentation and other features that only the x86 architecture supports.

Q: Is a 64-bit version available?

A: No, and it will never be. The AMD64 spec removed almost all of the segmentation features in x86 since they were rarely used.

Q: I don't want to rewrite my driver again...

A: You don't have to. All that needs to be done is you must recompile your driver against the Ring Cycle headers. It should then work without any additional modifications.

Q: I want to run this on my production system, and...

A: Shut up, you're stupid. This is a research project and the code has not been thouroughly tested, nor has it been tested on numerous hardware configurations. Running it on any kind of system that you plan to work on is not recommended.

Q: Driver xxxx doesn't work with the Ring Cycle.

A: The DAPI is not yet complete as the kernel exports many functions to modules, and drivers may attempt to do things not currently supported in the Ring Cycle architecture. In this case modifications to the Ring Cycle kernel will be necessary to make the driver work. When will this be done? Don't wait for it.

Q: This is awesome. How can I keep up with it?

A: Please join our mailing list. That's the best place for asking questions and keeping up to date with the project.