SlideShare a Scribd company logo
Foxcoon Confidential 1
Linux Driver
David Chen
Foxcoon Confidential 2
Kernel
Process
Resource
computing power
Memory
network connectivity
Kernel
是一塊可讓 CPU 直接執行的 machine code
分配系統資源給各 process
Foxcoon Confidential 3
kernel functions architecture
Foxcoon Confidential 4
kernel functions
Process Management
Creating and destroying processes
scheduler
Memory Management
The different parts of the kernel interact with the memory-management
subsystem through a set of function calls
File system
Linux supports multiple filesystem types
ex2,ex3,FAT…
Device Control
All device control operations are performed by device drivers
Networking
must be managed by the operating system
Foxcoon Confidential 5
Kernel Modules
Modules
Each piece of code that can be added to the
kernel at runtime
Each module is made up of object code
insmod and rmmod
Foxcoon Confidential 6
Classes of devices and modules
Character device
can be accessed as a stream of bytes
Usually implements at least the open, close, read, and
write system calls
Text console (/dev/console) and the serial ports
(/dev/ttyS0)
Block device
block devices are accessed by filesystem nodes in the
/dev directory
disk
Network interface
Foxcoon Confidential 7
Security Issues
Any security check in the system is enforced by kernel code
init_module checks if the invoking process is authorized to load a
module into the kernel
only the superuser can exploit the power of privileged code
Driver writers must also be careful, of course, to avoid
introducing security bugs
Buffer overrun
uninitialized memory
Any input received from user processes should be treated with
great suspicion
Foxcoon Confidential 8
Linux Version Numbering
Every software package used in a Linux system has its own
release number, and there are often interdependencies
across them
even-numbered kernel versions(2.6.x)
stable
odd-numbered kernel versions(2.7.x)
Not stable
Foxcoon Confidential 9
License Terms
General Public license version 2(GPLv2)
GPL 允許任何人散 與銷售佈 GPL 規範的產品 , 前提是必須
要讓收受者能獲得原始程式 , 並繼承同樣的權利
Foxcoon Confidential 9
License Terms
General Public license version 2(GPLv2)
GPL 允許任何人散 與銷售佈 GPL 規範的產品 , 前提是必須
要讓收受者能獲得原始程式 , 並繼承同樣的權利

More Related Content

DOCX
Security features of fedora
PPTX
Unix Operating System
PPT
Security and Linux Security
PPT
Introduction to Linux Kernel by Quontra Solutions
PPTX
WELCOME TO THE CORE OF UNIX OPERATING SYSTEM
PPTX
UNIX Operating System
PPT
Tutorial 2
Security features of fedora
Unix Operating System
Security and Linux Security
Introduction to Linux Kernel by Quontra Solutions
WELCOME TO THE CORE OF UNIX OPERATING SYSTEM
UNIX Operating System
Tutorial 2

What's hot (20)

PPTX
Introduction to Linux Kernel
PPTX
UNIX Operating System
PPT
linux software architecture
PPTX
Unix seminar
PPT
Unix lecture1
PPT
unix training | unix training videos | unix course unix online training
PPT
Basic Linux Security
PPT
Linux security-fosster-09
PPSX
linux kernel overview 2013
PPTX
kernels
PPTX
Essential security for linux servers
PPT
Linux Introduction
PPTX
File System Implementation & Linux Security
PPT
Threats, Vulnerabilities & Security measures in Linux
PDF
Linux kernel architecture
PPTX
Linux security introduction
PDF
Unix shell programming intro-part-1
PPTX
UEFI Firmware Rootkits: Myths and Reality
PPTX
Unix Introduction
PPT
Operating system vulnerability and control
Introduction to Linux Kernel
UNIX Operating System
linux software architecture
Unix seminar
Unix lecture1
unix training | unix training videos | unix course unix online training
Basic Linux Security
Linux security-fosster-09
linux kernel overview 2013
kernels
Essential security for linux servers
Linux Introduction
File System Implementation & Linux Security
Threats, Vulnerabilities & Security measures in Linux
Linux kernel architecture
Linux security introduction
Unix shell programming intro-part-1
UEFI Firmware Rootkits: Myths and Reality
Unix Introduction
Operating system vulnerability and control
Ad

Viewers also liked (20)

PPT
linux device driver
PDF
Linux device driver
PPTX
Linux Device Driver Training
PPTX
Linux Device Driver Training-TutorialsDaddy
PDF
Peek into linux_device_driver_kit
PDF
Linux Device Driver parallelism using SMP and Kernel Pre-emption
PPTX
PPSX
The osi model layers
PPTX
Osi layer
PPTX
OSI layer
PPTX
Osi layer
PPTX
Osi layer dan fungsinya
PPTX
Osi layer ( DAVENTA S )
ODP
OSI LAYERS
PPTX
PDF
Software Advice IndustryView: The Future of Fleets in a Post-Driver World
PDF
SEJARAH OSI LAYER & FUNGSI LAYER APLIKASI
PPT
linux device driver
Linux device driver
Linux Device Driver Training
Linux Device Driver Training-TutorialsDaddy
Peek into linux_device_driver_kit
Linux Device Driver parallelism using SMP and Kernel Pre-emption
The osi model layers
Osi layer
OSI layer
Osi layer
Osi layer dan fungsinya
Osi layer ( DAVENTA S )
OSI LAYERS
Software Advice IndustryView: The Future of Fleets in a Post-Driver World
SEJARAH OSI LAYER & FUNGSI LAYER APLIKASI
Ad

Similar to Linux Device Driver Introduction (20)

PPT
KERNAL ARCHITECTURE
PPT
Device drivers tsp
PPT
Mca ii os u-5 unix linux file system
PPTX
Unix and shell programming | Unix File System | Unix File Permission | Blocks
DOCX
Architecture-of-Linux-operating-system.docx
PPTX
managing kernal module from egineering sunject operating system
PPT
Ch1 linux basics
PPTX
Linux security
PPTX
Introduction to Unix
PPT
Unix fundamentals
PPT
Linux architecture
PDF
Walking around linux kernel
PPT
Linux Device Driver,LDD,
PDF
thesis sample
PPT
Ch20 OS
 
PPT
PDF
Ubuntu OS Presentation
PPTX
Linux Device Driver’s
PPT
KERNAL ARCHITECTURE
Device drivers tsp
Mca ii os u-5 unix linux file system
Unix and shell programming | Unix File System | Unix File Permission | Blocks
Architecture-of-Linux-operating-system.docx
managing kernal module from egineering sunject operating system
Ch1 linux basics
Linux security
Introduction to Unix
Unix fundamentals
Linux architecture
Walking around linux kernel
Linux Device Driver,LDD,
thesis sample
Ch20 OS
 
Ubuntu OS Presentation
Linux Device Driver’s

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Introduction to Building Materials
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Lesson notes of climatology university.
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
1_English_Language_Set_2.pdf probationary
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Introduction to Building Materials
Final Presentation General Medicine 03-08-2024.pptx
Computing-Curriculum for Schools in Ghana
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Indian roads congress 037 - 2012 Flexible pavement
Lesson notes of climatology university.
Orientation - ARALprogram of Deped to the Parents.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Weekly quiz Compilation Jan -July 25.pdf
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
1_English_Language_Set_2.pdf probationary
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Final Presentation General Medicine 03-08-2024.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Complications of Minimal Access Surgery at WLH
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Unit 4 Skeletal System.ppt.pptxopresentatiom

Linux Device Driver Introduction

  • 1. Foxcoon Confidential 1 Linux Driver David Chen
  • 2. Foxcoon Confidential 2 Kernel Process Resource computing power Memory network connectivity Kernel 是一塊可讓 CPU 直接執行的 machine code 分配系統資源給各 process
  • 3. Foxcoon Confidential 3 kernel functions architecture
  • 4. Foxcoon Confidential 4 kernel functions Process Management Creating and destroying processes scheduler Memory Management The different parts of the kernel interact with the memory-management subsystem through a set of function calls File system Linux supports multiple filesystem types ex2,ex3,FAT… Device Control All device control operations are performed by device drivers Networking must be managed by the operating system
  • 5. Foxcoon Confidential 5 Kernel Modules Modules Each piece of code that can be added to the kernel at runtime Each module is made up of object code insmod and rmmod
  • 6. Foxcoon Confidential 6 Classes of devices and modules Character device can be accessed as a stream of bytes Usually implements at least the open, close, read, and write system calls Text console (/dev/console) and the serial ports (/dev/ttyS0) Block device block devices are accessed by filesystem nodes in the /dev directory disk Network interface
  • 7. Foxcoon Confidential 7 Security Issues Any security check in the system is enforced by kernel code init_module checks if the invoking process is authorized to load a module into the kernel only the superuser can exploit the power of privileged code Driver writers must also be careful, of course, to avoid introducing security bugs Buffer overrun uninitialized memory Any input received from user processes should be treated with great suspicion
  • 8. Foxcoon Confidential 8 Linux Version Numbering Every software package used in a Linux system has its own release number, and there are often interdependencies across them even-numbered kernel versions(2.6.x) stable odd-numbered kernel versions(2.7.x) Not stable
  • 9. Foxcoon Confidential 9 License Terms General Public license version 2(GPLv2) GPL 允許任何人散 與銷售佈 GPL 規範的產品 , 前提是必須 要讓收受者能獲得原始程式 , 並繼承同樣的權利
  • 10. Foxcoon Confidential 9 License Terms General Public license version 2(GPLv2) GPL 允許任何人散 與銷售佈 GPL 規範的產品 , 前提是必須 要讓收受者能獲得原始程式 , 並繼承同樣的權利