Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scull

Simple Character Utility for Loading Localities — a character device driver that acts as a kernel-side data buffer.

Testing the driver

The driver can be compiled and tested; it retains any data you write to it until you overwrite it with new data. The device acts like a data buffer whose length is limited only by the amount of real RAM available. You can try using cp, dd, and input/output redirection to test out the driver.

The free command can be used to see how the amount of free memory shrinks and expands according to how much data is written into scull.

To get more confident with reading and writing one quantum at a time, you can add a printk at an appropriate point in the driver and watch what happens while an application reads or writes large chunks of data. Alternatively, use the strace utility to monitor the system calls issued by a program, together with their return values. Tracing a cp or an ls -l > /dev/scull0 shows quantized reads and writes.

Build

make

Userspace tests

Build the first syscall-level test with make tests, then follow tests/README.md to run it against a loaded /dev/scullN device.

Status

The module targets Linux 7.1 and now includes the base scull devices, FIFO devices (/dev/scullp*), and access-control devices (/dev/scullsingle, /dev/sculluid, and /dev/scullwuid).

About

Simple Character Utility for Loading Localities — a character device driver that acts as a kernel-side data buffer, for tracing, testing and debugging in the kernel space

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages