Linux Device Driver Development Chris Lydick Spring 2007
Slide 2CIS e (π*i) TU 10:30 Intro to Device Drivers Lydick PSYCH 012 MWF 11:30 My Motivation Lydick EECE 92181 MWF 9:30 Reverse Engineering Lydick LAB 0 F 2:30p Demonstrations Lydick Class Schedule
Slide 3Textbook List J. Corbet, A Rubini, G Kroah-Hartman. Linux Device Drivers, third Ed. Accessible for download on the web! http://lwn.net/Kernel/LDD3/
Slide 4Operating Systems 101 I've not had Operating Systems… but rather… Role of Device Drivers Mechanism versus Approach Black Box Semi/unclear interface (gadget) - > Well characterized interface (Linux API)
Slide 5Operating Systems 102 Uses C Language Gets muddled rapidly (bunches of macros, code) Need to have a feeling of ... simultaneousness, race conditions interferes, conceded work common prohibition part and client space recollections ****pointers, structures, … (parcels to consider)
Slide 6Operating Systems 103 Textbook has given heaps of "skeletons" and demos (Wheew!) My testbed: Fedora Core 4, 2.6.11 (book asked for 2.6.10) Should we begin with… . Hi World?
Slide 10Operating Systems 104 OK, simple… So what. Before burrowing further, consider 3 sorts of gadget drivers Character Devices (stream of bytes) Block Devices (record frameworks) Network Interfaces (duh.)
Slide 11Operating Systems 105 Char gadgets: Scull (Simple Character Utility for Loading Localities)… testbed for Char gadgets. Scull0..3 : worldwide/tireless memory Scullpipe0..3 : FIFO funnels show dispute Scullpriv : private information for each comfort
Slide 12Operating Systems Lab Exercises Scull0 exhibit Scullpipe0 show Scullpriv show Short (Temperature Sensor) Shortprint exhibition
Slide 14Operating Systems… Final Other Areas of Interest: Snull (organize interface skeleton) USB-Skeleton (that is correct.) PCI-Skeleton (alright.) Sample Disk Driver (cool.) TTY Drivers, DMA and Memory Mapping, and so on
Slide 15Motivation My Thesis: Supercomputing Cluster in 031 Rathbone: USB Connectivity: driver timeouts/floods in OpenBSD Communicated with Chris Pascoe (OpenBSD Developer)
Slide 16Motivation Acer Labs M5632 Bridge Cable Worked fine utilizing the standard USB 1.0 Driver Issues emerged with the USB 2.0 (EHCI) driver [diff file] "Mishandled" the part profiling structure to check at runtime for portion stack floods. We're changing to Linux (no issues), however it's great to know how to delve into drivers… correct? Additionally, isn't Linux expected to be superior to Windoze?
Slide 17Reverse Engineering 101 Reverse Engineering: Getting something to work by watching it work when effectively stacked. Generally happens inside Windows (sorry, we can't make tracks in an opposite direction from Microsoft!)
Slide 18Reverse Engineering 102 USB Devices (URB): USB Analyzer/Sniffer (Snoopy, USB Monitor,..) Acts also to Ethereal/sys/gadgets/pci0000:00/000:00:02.0/usb2/PCI Bus Hardware Sniffers… (significantly more hard to investigate!)
Slide 20Conclusions GET THE BOOK! It's exceptionally useful and is an incredible reference! Cases are accessible for download Book is openly accessible (wget it before it's gone!) Next stride: USB!
SPONSORS
SPONSORS
SPONSORS