Simple char driver. for Linux. my_first.c: headers. my_first.c: file structure. Calcolatori Elettronici e Sistemi Operativi.

Size: px
Start display at page:

Download "Simple char driver. for Linux. my_first.c: headers. my_first.c: file structure. Calcolatori Elettronici e Sistemi Operativi."

Transcription

1 Calcolatori Elettronici e Sistemi Operativi Simple char driver Simple char driver for Linux Code organization my_first.c driver code: Headers Macro definitions Device structure definition Globals and module parameters Procmem interface (functions and structure) Chardev interface (functions and structure) Module initialization and cleanup Module authorship and license Makefile Building instructions my_first.c: file structure my_first.c: headers Headers Macro definitions Device structure definition Globals and module parameters Procmem interface (funcs and struct) #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/errno.h> #include <linux/slab.h> #include <linux/types.h> #include <asm/uaccess.h> #include <linux/fcntl.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/cdev.h> Chardev interface (functions and structure) Module initialization and cleanup Module authorship and license

2 my_first.c: macro definitions my_first.c: device structure definition #define MY_FIRST_NR_DEVS 1 #define MY_FIRST_DEFAULT_SIZE (10*1024) #define IOCTL_DEV_ID 0x8A device id #define IOCTL_RESET _IO(IOCTL_DEV_ID, 0) #define IOCTL_GETSIZE _IOR(IOCTL_DEV_ID, 1, int) #define IOCTL_SETSIZE _IOW(IOCTL_DEV_ID, 2, int) build identifiers for ioctl requests struct myfirst_descr struct cdev cdev; char device structure struct mutex mutex; synchronization unsigned long size; size of vector data unsigned long ndata; actual bytes in data char *data; ; _IO(IOCTL_DEV_ID, 0) _IOR(IOCTL_DEV_ID, 1, int) _IOW(IOCTL_DEV_ID, 2, int) request id: 0 - no data passed request id: 1 - data from driver to user space (read) request id: 2 - data from user space to driver (write) size data cdev dir dir 0: none 1: write 2: read size size: size of data to read/write type type: driver id function nr. nr: id of the ioctl request ioctl request format ops struct myfirst_descr my_first.c: globals and module parameters parameters int nr_devs = MY_FIRST_NR_DEVS; int dev_size = MY_FIRST_DEFAULT_SIZE; module_param (nr_devs, int, S_IRUGO); module_param (dev_size, int, S_IRUGO); globals struct myfirst_descr *devices; int major; int first_minor; int first_dev; int registered_devs; S_IRUGO : read permission for all dev 0 dev 1 dev 2 dev 3 dev 4 devices size data cdev ops struct myfirst_descr Module init: - require a major number - allocate the needed memory for all registered devices - register char devices int init my_first_init_module(void) Only one module load at a time For an already loaded module, init function is not called (loading is aborted) Init function is allowed to be not reentrant Reentrant code: protect global (and local ) variable access protect calls to non reentrant functions do not modify code

3 int init my_first_init_module(void) int init my_first_init_module(void) int result, i; dev_t dev = 0; int err, devno; require a major number result = alloc_chrdev_region(&dev, first_minor, nr_devs, "my_first"); if (result < 0) printk(kern_warning "my_first: can't get major\n"); err = result; goto fail_alloc_chrdev_region; return 0; OK return 0; OK rollback return err; FAIL unregister_chrdev_region (first_dev, nr_devs); fail_alloc_chrdev_region: return err; FAIL release major number int init my_first_init_module(void) int result, i; dev_t dev = 0; int err, devno; require a major number result = alloc_chrdev_region(&dev, first_minor, nr_devs, "my_first"); if (result < 0) printk(kern_warning "my_first: can't get major\n"); err = result; goto fail_alloc_chrdev_region; first_dev = dev; major = MAJOR(dev); allocate memory registered_devs = nr_devs; for (i = 0; i < nr_devs; i++) devices[i].data = kmalloc(dev_size, GFP_KERNEL); if (!devices[i].data) registered_devs = i; memset (devices[i].data, 0, dev_size); devices[i].size = dev_size; devices[i].ndata = 0; mutex_init(&devices[i].mutex); cdev_init(&devices[i].cdev, &my_first_funcs); devices[i].cdev.owner = THIS_MODULE; allocate memory for i-th device stop at the first failure initialize structure prepare device registration devices = kmalloc(nr_devs * sizeof(struct myfirst_descr), GFP_KERNEL); if (!devices) err = -ENOMEM; goto fail_alloc; memset(devices, 0, nr_devs * sizeof(struct myfirst_descr)); devno = MKDEV(major, first_minor + i); err = cdev_add(&devices[i].cdev, devno, 1); device is live now device registration

4 if (err) registration failed kfree(devices[i].data); registered_devs = i; printk(kern_notice "Error %d adding my_first%d", err, i); if (registered_devs == 0) err = -ENOMEM; goto fail_alloc_buffers; proc_create_data("driver/my_first", name 0, mode (0:default) NULL, parent dir &proc_fops, NULL client data ); return 0; OK fail_alloc_buffers: kfree(devices); fail_alloc: unregister_chrdev_region(first_dev, nr_devs); fail_alloc_chrdev_region: return err; FAIL Error management Just after device registration devices device 0 device 1 device 2 device 3 device 4 Array allocated by driver (maj,min) data cdev ops struct myfirst_descr file_operations llseek read write Cleanup: - free the registered major number - free memory - unregister cleanup function is not called if initial registering failed void exit my_first_cleanup_module(void) int i; remove_proc_entry("driver/my_first", NULL); for (i = 0; i < registered_devs; i++) cdev_del(&devices[i].cdev); kfree(devices[i].data); kfree(devices); unregister_chrdev_region(first_dev, nr_devs); free memory unregister device release major number module_init(my_first_init_module); module_exit(my_first_cleanup_module); Set initialization and cleanup functions

5 ssize_t my_first_read(struct file *file, ssize_t my_first_write(struct file *file, loff_t my_first_llseek(struct file *file, long my_first_ioctl(struct file *file, int my_first_open(struct inode *inode, int my_first_release(struct inode *inode, functions to implement #define ioctl unlocked_ioctl struct file_operations my_first_funcs =.owner = THIS_MODULE,.open = my_first_open,.release = my_first_release,.read = my_first_read,.write = my_first_write,.llseek = my_first_llseek,.ioctl = my_first_ioctl, ; #define ioctl unlocked_ioctl struct file_operations my_first_funcs =.owner = THIS_MODULE,.open = my_first_open,.release = my_first_release,.read = my_first_read, ; function pointers Kernel calls open Device opened struct myfirst_descr struct myfirst_descr struct inode i_cdev struct file (maj,min) data cdev ops file_operations llseek read write struct inode i_cdev struct file (maj,min) data cdev ops file_operations llseek read write private_data private_data f_op f_op Arguments (from kernel) struct file argument will be used by next function calls (read, write, etc.) Arguments (from kernel) struct file argument will be used by next function calls (read, write, etc.)

6 Device open: - check for device-specific errors (such as hardware problems) - initialize the device on first open - update the f_op pointer, if necessary - allocate and fill data structure to be put in private_data int my_first_open(struct inode *inode, struct file *file) struct myfirst_descr *dev; dev = container_of(inode->i_cdev, struct myfirst_descr, cdev); file->private_data = dev; return 0; pointer container type container field Device close: - free data allocated in private_data - shut down the hw device on last close int my_first_release(struct inode *inode, struct file *file) return 0; Read: - put data into the user space referred by buffer - update offset ssize_t my_first_read(struct file *file, char user *buffer, size_t count, loff_t *offset) ssize_t ret; if (mutex_lock_interruptible(&d->mutex)) return -ERESTARTSYS; mutex_unlock(&d->mutex); return ret; info on device Do not overlap with other interface functions Fill the user buffer with data in d->data release exclusive access user space pointer (don't defer) enforce exclusive access to device if (*offset < d->ndata) if (*offset + count > d->ndata) count = d->ndata - *offset; if (copy_to_user(buffer, d->data+*offset, count)) ret = -EFAULT; else *offset += count; ret = count; else ret = 0; mutex_unlock(&d->mutex); return ret; update offset pointer return size of data actually read release exclusive access copy (safe) from kernel space to user space Write: - read data from the user space referred by buffer - update offset ssize_t my_first_write(struct file *file, const char user *buffer, size_t count, loff_t *offset) ssize_t ret; if (mutex_lock_interruptible(&d->mutex)) return -ERESTARTSYS; mutex_unlock(&d->mutex); return ret; info on device Do not overlap with other interface functions Fill the buffer d->data with data in user buffer release exclusive access user space pointer (don't defer) enforce exclusive access to device

7 if (*offset < d->size) if (*offset + count > d->size) count = d->size - *offset; if (copy_from_user(d->data+*offset, buffer, count)) ret = -EFAULT; else *offset += count; d->ndata = *offset; ret = count; else ret = 0; mutex_unlock(&d->mutex); return ret; update offset pointer return size of data actually written release exclusive access copy (safe) from user space to kernel space llseek: - update file->f_pos loff_t my_first_llseek(struct file *file, loff_t offset, int origin) loff_t newpos; if (mutex_lock_interruptible(&d->mutex)) return -ERESTARTSYS; switch (origin) case 0: SEEK_SET newpos = offset; case 1: SEEK_CUR newpos = file->f_pos + offset; case 2: SEEK_END newpos = d->ndata + offset; default : invalid newpos = -EINVAL; if (newpos < 0) newpos = -EINVAL; else file->f_pos = newpos; mutex_unlock(&d->mutex); return newpos; ioctl() long my_first_ioctl(struct file *file, unsigned int cmd, unsigned long arg) int err = 0, retval = 0; verify device id if (_IOC_TYPE(cmd)!= IOCTL_DEV_ID) return -ENOTTY; Macros to decode the ioctl request: _IOC_TYPE(req) _IOC_NR(req) _IOC_DIR(req) _IOC_SIZE(req) extract the driver id extract the request number extract data direction (read, write, or none) extract the data size of req.

8 ioctl() long my_first_ioctl(struct file *file, unsigned int cmd, unsigned long arg) int err = 0, retval = 0; verify device id if (_IOC_TYPE(cmd)!= IOCTL_DEV_ID) return -ENOTTY; if (mutex_lock_interruptible(&d->mutex)) return -ERESTARTSYS; user argument accessibility if (_IOC_DIR(cmd) & _IOC_READ) err =!access_ok(verify_write, (void user *)arg, _IOC_SIZE(cmd)); request is a read (data from kernel to user): check if the user buffer is writable ioctl() long my_first_ioctl(struct file *file, unsigned int cmd, unsigned long arg) int err = 0, retval = 0; verify device id if (_IOC_TYPE(cmd)!= IOCTL_DEV_ID) return -ENOTTY; if (mutex_lock_interruptible(&d->mutex)) return -ERESTARTSYS; user argument accessibility if (_IOC_DIR(cmd) & _IOC_READ) err =!access_ok(verify_write, (void user *)arg, _IOC_SIZE(cmd)); else if (_IOC_DIR(cmd) & _IOC_WRITE) err =!access_ok(verify_read, (void user *)arg, _IOC_SIZE(cmd)); request is a write (data from user to kernel): check if the user buffer is readable my_first.c: procmem interface if (err) retval = -EFAULT; else switch (cmd) case IOCTL_RESET: d->ndata = 0; case IOCTL_GETSIZE: retval = put_user(d->ndata, (int user *)arg); case IOCTL_SETSIZE: allow changes only to superuser if (!capable(cap_sys_admin)) retval = -EPERM; else retval = get_user(d->ndata, (int user *)arg); default : retval = -ENOTTY; mutex_unlock (&d->mutex); return retval; put_user: work on scalar put_user: unsafe, work on scalar get_user: work on scalar get_user: unsafe, work on scalar int read_procmem(struct file *file, int open_procmem(struct inode *inode, int release_procmem(struct inode *inode, const struct file_operations proc_fops =.open = open_procmem,.release = release_procmem,.read = read_procmem,.llseek = default_llseek, ; function pointers functions to implement

9 my_first.c: procmem interface my_first.c: procmem interface int open_procmem(struct inode *inode, struct file *file) return 0; int release_procmem(struct inode *inode, struct file *file) return 0; const struct file_operations proc_fops =.open = open_procmem,.release = release_procmem,.read = read_procmem,.llseek = default_llseek, ; int read_procmem(struct file *file, char user *buffer, size_t count, loff_t *offset) const char *h = "Hello!\n"; const int len = strlen(h); int datalen; datalen = len - *offset + 1; if (datalen > count) datalen = count; if (copy_to_user(buffer, h + *offset, datalen)) return -EFAULT; *offset += datalen; return datalen; my_first.c: module authorship and license my_first.c: exported symbols (example) MODULE_AUTHOR("Calcolatori Elettronici e Sistemi Operativi (uniud)"); MODULE_DESCRIPTION("Example"); MODULE_VERSION("1.0"); MODULE_LICENSE("Dual BSD/GPL"); int my_first_symbol_1(void)return 1; int my_first_symbol_2(void)return 2; EXPORT_SYMBOL (my_first_symbol_1); EXPORT_SYMBOL_GPL (my_first_symbol_2); Export symbols (for other modules)

10 Makefile Simple char driver # If KERNELRELEASE is defined, we've been invoked from the # kernel build system and can use its language. ifneq ($(KERNELRELEASE),) obj-m := my_first.o # Otherwise we were called directly from the command # line; invoke the kernel build system. else KERNELDIR?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules clean: -@rm my_first.ko *.o.*.o.cmd.*.ko.cmd *.mod.c modules.order Module.symvers -@rm -r.tmp_versions endif Tabulations (mandatory) Tabulation (mandatory) Makefile # insmod./my_first.ko # lsmod # cat /proc/devices grep my_first # mknod mydev c # ls /sys/module/my_first/parameters/ # cat /sys/module/my_first/parameters/dev_size # cat /sys/module/my_first/parameters/nr_devs # cat /proc/kallsyms grep my_first # echo Test string > mydev # cat mydev # rmmod my_first Test Build with: # insmod./my_first.ko nr_devs=2 # cat /proc/devices grep my_first # mknod mydev2 c # rmmod my_first make KERNELDIR=<path of kernel sources> ARCH=<target arch> CROSS_COMPILE=<prefix of cross compiler> Try to use both devices Use the major number from this command on the next one Exercise Write a char driver (mymem) to access kernel memory Read: return data in memory Memory range accessed: ARM: 0xC xC MIPS: 0x x Examples: ARM Read at file offset 0x100: return data starting at address 0xC MIPS Read at file offset 0x200: return data starting at address 0x Write: not implemented (return 0) Seek: valid if the new position is in the allowed range Test: Verify that commands: dd if=mymem of=file1 bs=1 count=128 skip= dd if=/dev/mem of=file2 bs=1 count=128 skip= Produce the same output (i.e., file1 and file2 are identical) (mymem is the device associated to this driver)

REVISION HISTORY NUMBER DATE DESCRIPTION NAME

REVISION HISTORY NUMBER DATE DESCRIPTION NAME i ii REVISION HISTORY NUMBER DATE DESCRIPTION NAME iii Contents 1 The structure of a Linux kernel module 1 1.1 Install XV6...................................................... 1 1.2 Compile and load a

More information

Interrupt handling. Interrupt handling. Deferred work. Interrupt handling. Remove an interrupt handler. 1. Link a struct work to a function

Interrupt handling. Interrupt handling. Deferred work. Interrupt handling. Remove an interrupt handler. 1. Link a struct work to a function Interrupt handling Interrupt handling error = request_irq(irq_number, interrupt_service_routine, flags, module_name, (void*)dataptr); error: == 0 OK!= 0 FAILED interrupt_service_routine: irqreturn_t interrupt_service_routine(int

More information

Linux Device Driver in Action (LDDiA)

Linux Device Driver in Action (LDDiA) Linux Device Driver in Action (LDDiA) Duy-Ky Nguyen 2015-04-30 1. On Memory Any unit under user control must have a controller board (CB) with a controller unit (CU) and several devices (Dev.x) doing what

More information

Introduction Reading Writing scull. Linux Device Drivers - char driver

Introduction Reading Writing scull. Linux Device Drivers - char driver Overview 1 2 3 4 Major, minor File Operations The file Structure The inode structure Registraction simplest driver, suitable for most simple devices, follow the book. Jernej Figure: Vičič. (Simple Character

More information

Virtual File System (VFS) Implementation in Linux. Tushar B. Kute,

Virtual File System (VFS) Implementation in Linux. Tushar B. Kute, Virtual File System (VFS) Implementation in Linux Tushar B. Kute, http://tusharkute.com Virtual File System The Linux kernel implements the concept of Virtual File System (VFS, originally Virtual Filesystem

More information

Linux drivers - Exercise

Linux drivers - Exercise Embedded Realtime Software Linux drivers - Exercise Scope Keywords Prerequisites Contact Learn how to implement a device driver for the Linux OS. Linux, driver Linux basic knowledges Roberto Bucher, roberto.bucher@supsi.ch

More information

Designing and developing device drivers. Coding drivers

Designing and developing device drivers. Coding drivers Designing and developing device drivers Coding drivers Registering a driver 2 calls to register a driver defined in int register_chrdev_region(dev_t first, unsigned int count, char *name);

More information

Linux Device Drivers

Linux Device Drivers Linux Device Drivers Modules A piece of code that can be added to the kernel at runtime is called a module A device driver is one kind of module Each module is made up of object code that can be dynamically

More information

Kernel Modules. Kartik Gopalan

Kernel Modules. Kartik Gopalan Kernel Modules Kartik Gopalan Kernel Modules Allow code to be added to the kernel, dynamically Only those modules that are needed are loaded. Unload when no longer required - frees up memory and other

More information

Linux Device Drivers. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Interrupts

Linux Device Drivers. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Interrupts Linux Device Drivers Dr. Wolfgang Koch Friedrich Schiller University Jena Department of Mathematics and Computer Science Jena, Germany wolfgang.koch@uni-jena.de Linux Device Drivers 1. Introduction 2.

More information

Loadable Kernel Module

Loadable Kernel Module Instituto Superior de Engenharia do Porto Mestrado em Engenharia Eletrotécnica e de Computadores Arquitetura de Computadores Loadable Kernel Module The objective of this lesson is to analyze, compile and

More information

Linux Kernel Modules & Device Drivers April 9, 2012

Linux Kernel Modules & Device Drivers April 9, 2012 Linux Kernel Modules & Device Drivers April 9, 2012 Pacific University 1 Resources Linux Device Drivers,3rd Edition, Corbet, Rubini, Kroah- Hartman; O'Reilly kernel 2.6.10 we will use 3.1.9 The current

More information

Finish up OS topics Group plans

Finish up OS topics Group plans Finish up OS topics Group plans Today Finish up and review Linux device driver stuff Walk example again See how it all goes together Discuss talking to MMIO RTOS (on board) Deferred interrupts Discussion

More information

USB. Development of a USB device driver working on Linux and Control Interface. Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi

USB. Development of a USB device driver working on Linux and Control Interface. Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi Linux USB Development of a USB device driver working on Linux and Control Interface Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi Recently, it s becoming more popular to utilize Linux for controlling

More information

7.4 Simple example of Linux drivers

7.4 Simple example of Linux drivers 407 7.4 Simple example of Linux drivers In the previous section, we introduce a simple Hello module driver, it is just some information from the serial port output, the board did not correspond to the

More information

Character Device Drivers One Module - Multiple Devices

Character Device Drivers One Module - Multiple Devices Review from previous classes Three Types: Block, Character, and Network Interface Device Drivers MAJOR & MINOR numbers assigned register_chrdev_region(), alloc_chrdev_region(), unregister_chrdev_region()

More information

Step Motor. Step Motor Device Driver. Step Motor. Step Motor (2) Step Motor. Step Motor. source. open loop,

Step Motor. Step Motor Device Driver. Step Motor. Step Motor (2) Step Motor. Step Motor. source. open loop, Step Motor Device Driver Step Motor Step Motor Step Motor source Embedded System Lab. II Embedded System Lab. II 2 Step Motor (2) open loop, : : Pulse, Pulse,, -, +5%, step,, Step Motor Step Motor ( ),

More information

Linux Device Drivers. 3. Char Drivers cont. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5.

Linux Device Drivers. 3. Char Drivers cont. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Linux Device Drivers Dr. Wolfgang Koch Friedrich Schiller University Jena Department of Mathematics and Computer Science Jena, Germany wolfgang.koch@uni-jena.de Linux Device Drivers 1. Introduction 2.

More information

CS5460/6460: Operating Systems. Lecture 24: Device drivers. Anton Burtsev April, 2014

CS5460/6460: Operating Systems. Lecture 24: Device drivers. Anton Burtsev April, 2014 CS5460/6460: Operating Systems Lecture 24: Device drivers Anton Burtsev April, 2014 Device drivers Conceptually Implement interface to hardware Expose some high-level interface to the kernel or applications

More information

Character Device Drivers

Character Device Drivers Character Device Drivers 張大緯 CSIE, NCKU The information on the slides are from Linux Device Drivers, Third Edition, by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman. Copyright 2005 O Reilly

More information

/dev/hello_world: A Simple Introduction to Device Drivers under Linux

/dev/hello_world: A Simple Introduction to Device Drivers under Linux Published on Linux DevCenter (http://www.linuxdevcenter.com/) See this if you're having trouble printing code examples /dev/hello_world: A Simple Introduction to Device Drivers under Linux by Valerie Henson

More information

Linux Device Drivers IOCTL. March 15, 2018

Linux Device Drivers IOCTL. March 15, 2018 March 15, 2018 Overview Introduction ioctl system call. ioctl short for: Input Output ConTroL, shared interface for devices, Description of ioctl devices are presented with files, input and output devices,

More information

The device driver (DD) implements these user functions, which translate system calls into device-specific operations that act on real hardware

The device driver (DD) implements these user functions, which translate system calls into device-specific operations that act on real hardware Introduction (Linux Device Drivers, 3rd Edition (www.makelinux.net/ldd3)) Device Drivers -> DD They are a well defined programming interface between the applications and the actual hardware They hide completely

More information

Device Drivers. CS449 Fall 2017

Device Drivers. CS449 Fall 2017 Device Drivers CS449 Fall 2017 Software Layers User-level I/O so7ware & libraries Device-independent OS so7ware Device drivers Interrupt handlers User OperaEng system (kernel) Hardware Device Drivers User

More information

Linux Kernel Module Programming. Tushar B. Kute,

Linux Kernel Module Programming. Tushar B. Kute, Linux Kernel Module Programming Tushar B. Kute, http://tusharkute.com Kernel Modules Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand. Kernel modules offers an easy

More information

NPTEL Course Jan K. Gopinath Indian Institute of Science

NPTEL Course Jan K. Gopinath Indian Institute of Science Storage Systems NPTEL Course Jan 2012 (Lecture 17) K. Gopinath Indian Institute of Science Accessing Devices/Device Driver Many ways to access devices under linux Non-block based devices ( char ) - stream

More information

What is a Linux Device Driver? Kevin Dankwardt, Ph.D. VP Technology Open Source Careers

What is a Linux Device Driver? Kevin Dankwardt, Ph.D. VP Technology Open Source Careers What is a Linux Device Driver? Kevin Dankwardt, Ph.D. VP Technology Open Source Careers kdankwardt@oscareers.com What does a driver do? Provides a more convenient interface to user-space for the hardware.

More information

ASE++ : Linux Kernel Programming

ASE++ : Linux Kernel Programming ASE++ : Linux Kernel Programming Giuseppe Lipari (giuseppe.lipari@univ-lille.fr) April 8, 2018 Contents 1 Introduction 1 2 Setting up the environment 2 3 Writing a kernel module 5 4 Other useful information

More information

Linux Loadable Kernel Modules (LKM)

Linux Loadable Kernel Modules (LKM) Device Driver Linux Loadable Kernel Modules (LKM) A way dynamically ADD code to the Linux kernel LKM is usually used for dynamically add device drivers filesystem drivers system calls network drivers executable

More information

Unix (Linux) Device Drivers

Unix (Linux) Device Drivers Unix (Linux) Device Drivers Kernel module that handles the interaction with an specific hardware device, hiding its operational details behind a common interface Three basic categories Character Block

More information

CS 378 (Spring 2003)

CS 378 (Spring 2003) Department of Computer Sciences THE UNIVERSITY OF TEXAS AT AUSTIN CS 378 (Spring 2003) Linux Kernel Programming Yongguang Zhang (ygz@cs.utexas.edu) Copyright 2003, Yongguang Zhang This Lecture Device Driver

More information

NPTEL Course Jan K. Gopinath Indian Institute of Science

NPTEL Course Jan K. Gopinath Indian Institute of Science Storage Systems NPTEL Course Jan 2012 (Lecture 18) K. Gopinath Indian Institute of Science Spinlocks & Semaphores Shared data betw different parts of code in kernel most common: access to data structures

More information

SuSE Labs / Novell.

SuSE Labs / Novell. Write a real Linux driver Greg Kroah-Hartman SuSE Labs / Novell http://www.kroah.com/usb.tar.gz gregkh@suse.de greg@kroah.com Agenda Intro to kernel modules sysfs basics USB basics Driver to device binding

More information

Introduction to Linux Device Drivers Recreating Life One Driver At a Time

Introduction to Linux Device Drivers Recreating Life One Driver At a Time Introduction to Linux Device Drivers Recreating Life One Driver At a Time Muli Ben-Yehuda mulix@mulix.org IBM Haifa Research Labs, Haifa Linux Club Linux Device Drivers, Technion, Jan 2004 p.1/42 why write

More information

Operating systems for embedded systems

Operating systems for embedded systems Operating systems for embedded systems Embedded operating systems How do they differ from desktop operating systems? Programming model Process-based Event-based How is concurrency handled? How are resource

More information

Operating systems for embedded systems. Embedded Operating Systems

Operating systems for embedded systems. Embedded Operating Systems Operating systems for embedded systems Embedded operating systems How do they differ from desktop operating systems? Programming model Process-based Event-based How is concurrency handled? How are resource

More information

Concurrency Aspects of Project 2

Concurrency Aspects of Project 2 Locking Concurrency Aspects of Project 2 Multiple producers, one consumer Multiple users can issue system calls at the same time Need to protect all shared data Examples Passengers may appear on a floor

More information

Scrivere device driver su Linux. Better Embedded 2012 Andrea Righi

Scrivere device driver su Linux. Better Embedded 2012 Andrea Righi Scrivere device driver su Linux Agenda Overview Kernel-space vs user-space programming Hello, world! kernel module Writing a character device driver Example(s) Q/A Overview What's a kernel? The kernel

More information

CPSC 8220 FINAL EXAM, SPRING 2016

CPSC 8220 FINAL EXAM, SPRING 2016 CPSC 8220 FINAL EXAM, SPRING 2016 NAME: Questions are short answer and multiple choice. For each of the multiple choice questions, put a CIRCLE around the letter of the ONE correct answer. Make sure that

More information

FAME Operatinf Systems - Modules

FAME Operatinf Systems - Modules FAME Operatinf Systems - Modules 2012 David Picard Contributions: Arnaud Revel, Mickaël Maillard picard@ensea.fr Introduction Linux is not a monolithic pile of code anymore Possibility to add/remove functionalities

More information

PMON Module An Example of Writing Kernel Module Code for Debian 2.6 on Genesi Pegasos II

PMON Module An Example of Writing Kernel Module Code for Debian 2.6 on Genesi Pegasos II Freescale Semiconductor Application Note AN2744 Rev. 1, 12/2004 PMON Module An Example of Writing Kernel Module Code for Debian 2.6 on Genesi Pegasos II by Maurie Ommerman CPD Applications Freescale Semiconductor,

More information

Software Layers. Device Drivers 4/15/2013. User

Software Layers. Device Drivers 4/15/2013. User Software Layers Device Drivers User-level I/O software & libraries Device-independent OS software Device drivers Interrupt handlers Hardware User Operating system (kernel) Abstraction via the OS Device

More information

Abstraction via the OS. Device Drivers. Software Layers. Device Drivers. Types of Devices. Mechanism vs. Policy. Jonathan Misurda

Abstraction via the OS. Device Drivers. Software Layers. Device Drivers. Types of Devices. Mechanism vs. Policy. Jonathan Misurda Abstraction via the OS Device Drivers Jonathan Misurda jmisurda@cs.pitt.edu Software Layers level I/O software & libraries Device independent OS software Device drivers Interrupt handlers Hardware Operating

More information

BLOCK DEVICES. Philipp Dollst

BLOCK DEVICES. Philipp Dollst BLOCK DEVICES Philipp Dollst BASICS A block driver provides access to devices that transfer randomly accessible data in fixed-size blocks disk drives, primarily. The Linux kernel sees block devices a being

More information

Loadable Kernel Modules

Loadable Kernel Modules Loadable Kernel Modules Kevin Dankwardt, Ph.D. kevin.dankwardt@gmail.com Topics 1. Why loadable kernel modules? 2. Using Modules 3. Writing modules 4. Compiling & Installing Modules 5. Example : Simple

More information

Operating Systems II BS degree in Computer Engineering Sapienza University of Rome Lecturer: Francesco Quaglia. Topics: 1.

Operating Systems II BS degree in Computer Engineering Sapienza University of Rome Lecturer: Francesco Quaglia. Topics: 1. Operating Systems II BS degree in Computer Engineering Sapienza University of Rome Lecturer: Francesco Quaglia Topics: 1. LINUX modules Modules basics A LINUX module is a software component which can be

More information

MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT

MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT MP3: VIRTUAL MEMORY PAGE FAULT MEASUREMENT University of Illinois at Urbana-Champaign Department of Computer Science CS423 Fall 2011 Keun Soo Yim GOAL A Linux kernel module to profile VM system events

More information

Itron Riva Kernel Module Building

Itron Riva Kernel Module Building Itron Riva Kernel Module Building Table of Contents Introduction... 2 Creating the Project Directory... 2 Creating the Makefile... 3 Creating main.c... 5 Building The Kernel Module... 6 1 Introduction

More information

Advanced Operating Systems #13

Advanced Operating Systems #13 http://www.pf.is.s.u-tokyo.ac.jp/class.html Advanced Operating Systems #13 Shinpei Kato Associate Professor Department of Computer Science Graduate School of Information Science and Technology

More information

Linux Kernel Development (LKD)

Linux Kernel Development (LKD) Linux Kernel Development (LKD) Session 1 Loadable Kernel Modules (LKM) Paulo Baltarejo Sousa pbs@isep.ipp.pt 2017 PBS LKD: S1 1 / 66 Disclaimer Material and Slides Some of the material/slides are adapted

More information

Design and Implementation of an Asymmetric Multiprocessor Environment Within an SMP System. Roberto Mijat, ARM Santa Clara, October 2, 2007

Design and Implementation of an Asymmetric Multiprocessor Environment Within an SMP System. Roberto Mijat, ARM Santa Clara, October 2, 2007 Design and Implementation of an Asymmetric Multiprocessor Environment Within an SMP System Roberto Mijat, ARM Santa Clara, October 2, 2007 1 Agenda Design Principle ARM11 MPCore TM overview System s considerations

More information

Linux Kernel Development (LKD)

Linux Kernel Development (LKD) Linux Kernel Development (LKD) Session 2 CISTER Framework: Laboratory 2 Paulo Baltarejo Sousa pbs@isep.ipp.pt 2017 1 Introduction The goal of the CISTER framework is to create a set of tools that help

More information

Instructions for setting up to compile and run OSGPS code under Linux

Instructions for setting up to compile and run OSGPS code under Linux Instructions for setting up to compile and run OSGPS code under Linux A. The latest and greatest OSGPS software is available on SorceForge. If you are not already monitoring this, you need to be. To set

More information

Device Drivers Demystified ESC 117. Doug Abbott, Principal Consultant Intellimetrix. Why device drivers? What s a device driver?

Device Drivers Demystified ESC 117. Doug Abbott, Principal Consultant Intellimetrix. Why device drivers? What s a device driver? ESC 117, Principal Consultant Intellimetrix Outline Introduction Why device drivers? What s a device driver? Abstract model of device driver OS agnostic What makes drivers seem complicated? Independently

More information

UNIX System Calls. Sys Calls versus Library Func

UNIX System Calls. Sys Calls versus Library Func UNIX System Calls Entry points to the kernel Provide services to the processes One feature that cannot be changed Definitions are in C For most system calls a function with the same name exists in the

More information

CS 423 Operating System Design: Introduction to Linux Kernel Programming (MP1 Q&A)

CS 423 Operating System Design: Introduction to Linux Kernel Programming (MP1 Q&A) CS 423 Operating System Design: Introduction to Linux Kernel Programming (MP1 Q&A) Professor Adam Bates Fall 2018 Learning Objectives: Talk about the relevant skills required in MP1 Announcements: MP1

More information

Android 多核心嵌入式多媒體系統設計與實作

Android 多核心嵌入式多媒體系統設計與實作 Android 多核心嵌入式多媒體系統設計與實作 Linux Device Driver 架構簡介 賴槿峰 (Chin-Feng Lai) Assistant Professor, institute of CSIE, National Ilan University Sep 29 th 2011 2011 MMN Lab. All Rights Reserved 2011 1 資訊軟體技術人才培訓

More information

Lecture 3. Introduction to Unix Systems Programming: Unix File I/O System Calls

Lecture 3. Introduction to Unix Systems Programming: Unix File I/O System Calls Lecture 3 Introduction to Unix Systems Programming: Unix File I/O System Calls 1 Unix File I/O 2 Unix System Calls System calls are low level functions the operating system makes available to applications

More information

Linux Device Driver. Analog/Digital Signal Interfacing

Linux Device Driver. Analog/Digital Signal Interfacing Linux Device Driver Analog/Digital Signal Interfacing User Program & Kernel Interface Loadable Kernel Module(LKM) A new kernel module can be added on the fly (while OS is still running) LKMs are often

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

Driving Me Nuts Device Classes

Driving Me Nuts Device Classes Driving Me Nuts Device Classes More necessary insructions for making your new device driver play nice in the 2.6 kernel. by Greg Kroah-Hartman In the last Driving Me Nuts column [see LJ, June 2003], we

More information

[6 marks] All parts of this question assume the following C statement. Parts (b) through (e) assume a variable called ptrs.

[6 marks] All parts of this question assume the following C statement. Parts (b) through (e) assume a variable called ptrs. Question 1. All parts of this question assume the following C statement. Parts (b) through (e) assume a variable called ptrs. char data[256] = "Hop Pop We like to hop."; Part (a) Is the following statement

More information

Kernel. Kernel = computer program that connects the user applications to the system hardware Handles:

Kernel. Kernel = computer program that connects the user applications to the system hardware Handles: Kernel programming Kernel Kernel = computer program that connects the user applications to the system hardware Handles: Memory management CPU scheduling (Process and task management) Disk management User

More information

Linux Device Drivers Interrupt Requests

Linux Device Drivers Interrupt Requests Overview 1 2 3 Installation of an interrupt handler Interface /proc 4 5 6 7 primitive devices can be managed only with I/O regions, most devices require a more complicated approach, devices cooperate with

More information

Driving Me Nuts Writing a Simple USB Driver

Driving Me Nuts Writing a Simple USB Driver Driving Me Nuts Writing a Simple USB Driver Give your Linux box a multicolored light you can see from across the room, and learn how to write a simple driver for the next piece of hardware you want to

More information

Introduction to Device Drivers Part-1

Introduction to Device Drivers Part-1 Introduction to Device Drivers Part-1 Introduction to Device Drivers-1 Objectives GNU/Linux Learn how to access the hardware similar to the sysfs method but faster Understand the basic techniques of how

More information

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level

More information

CMPS 105 Systems Programming. Prof. Darrell Long E2.371

CMPS 105 Systems Programming. Prof. Darrell Long E2.371 + CMPS 105 Systems Programming Prof. Darrell Long E2.371 darrell@ucsc.edu + Chapter 3: File I/O 2 + File I/O 3 n What attributes do files need? n Data storage n Byte stream n Named n Non-volatile n Shared

More information

University of Texas at Arlington. CSE Spring 2018 Operating Systems Project 4a - The /Proc File Systems and mmap. Instructor: Jia Rao

University of Texas at Arlington. CSE Spring 2018 Operating Systems Project 4a - The /Proc File Systems and mmap. Instructor: Jia Rao University of Texas at Arlington CSE 3320 - Spring 2018 Operating Systems Project 4a - The /Proc File Systems and mmap Instructor: Jia Rao Introduction Points Possible: 100 Handed out: Apr. 20, 2018 Due

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight HW2 Due Thursday, July 19 th Midterm on Monday, July 23 th 10:50-11:50 in TBD (And regular exercises in between) POSIX

More information

File I/0. Advanced Programming in the UNIX Environment

File I/0. Advanced Programming in the UNIX Environment File I/0 Advanced Programming in the UNIX Environment File Descriptors Created and managed by the UNIX kernel. Created using open or creat system call. Used to refer to an open file UNIX System shells

More information

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University File I/O Hyo-bong Son (proshb@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Unix Files A Unix file is a sequence of m bytes: B 0, B 1,..., B k,..., B m-1 All I/O

More information

Final Step #7. Memory mapping For Sunday 15/05 23h59

Final Step #7. Memory mapping For Sunday 15/05 23h59 Final Step #7 Memory mapping For Sunday 15/05 23h59 Remove the packet content print in the rx_handler rx_handler shall not print the first X bytes of the packet anymore nor any per-packet message This

More information

Programming the GPMC driver

Programming the GPMC driver Embedded Systems with Linux Programming the GPMC driver Manuel Domínguez-Pumar Embedded Systems with Linux series Volume 3: Manuel Domínguez Pumar Electronic Engineering Department Technical University

More information

Files and Directories Filesystems from a user s perspective

Files and Directories Filesystems from a user s perspective Files and Directories Filesystems from a user s perspective Unix Filesystems Seminar Alexander Holupirek Database and Information Systems Group Department of Computer & Information Science University of

More information

TPMC821-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. INTERBUS Master G4 PMC. Version 1.4. Issue 1.

TPMC821-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. INTERBUS Master G4 PMC. Version 1.4. Issue 1. The Embedded I/O Company TPMC821-SW-42 VxWorks Device Driver INTERBUS Master G4 PMC Version 1.4 User Manual Issue 1.2 January 2004 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone:

More information

OS COMPONENTS OVERVIEW OF UNIX FILE I/O. CS124 Operating Systems Fall , Lecture 2

OS COMPONENTS OVERVIEW OF UNIX FILE I/O. CS124 Operating Systems Fall , Lecture 2 OS COMPONENTS OVERVIEW OF UNIX FILE I/O CS124 Operating Systems Fall 2017-2018, Lecture 2 2 Operating System Components (1) Common components of operating systems: Users: Want to solve problems by using

More information

Introduction to Operating Systems. Device Drivers. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati

Introduction to Operating Systems. Device Drivers. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati Introduction to Operating Systems Device Drivers John Franco Dept. of Electrical Engineering and Computing Systems University of Cincinnati Basic Computer Architecture CPU Main Memory System Bus Channel

More information

pthreads CS449 Fall 2017

pthreads CS449 Fall 2017 pthreads CS449 Fall 2017 POSIX Portable Operating System Interface Standard interface between OS and program UNIX-derived OSes mostly follow POSIX Linux, macos, Android, etc. Windows requires separate

More information

Kprobes Presentation Overview

Kprobes Presentation Overview Kprobes Presentation Overview This talk is about how using the Linux kprobe kernel debugging API, may be used to subvert the kernels integrity by manipulating jprobes and kretprobes to patch the kernel.

More information

Workspace for '5-linux' Page 1 (row 1, column 1)

Workspace for '5-linux' Page 1 (row 1, column 1) Workspace for '5-linux' Page 1 (row 1, column 1) Workspace for '5-linux' Page 2 (row 2, column 1) ECEN 449 Microprocessor System Design Introduction to Linux 1 Objectives of this Lecture Unit Learn basics

More information

2 Setting up the RDMA Framework for Development

2 Setting up the RDMA Framework for Development Spring Term 2015 ADVANCED COMPUTER NETWORKS Project P1: Introduction to RDMA Programming Assigned on: 16 April 2015 Due by: 29 April 2015, 23:59 1 Introduction The goal of this project is to give an introduction

More information

CARRIER-SW-82. Linux Device Driver. IPAC Carrier Version 2.2.x. User Manual. Issue November 2017

CARRIER-SW-82. Linux Device Driver. IPAC Carrier Version 2.2.x. User Manual. Issue November 2017 The Embedded I/O Company CARRIER-SW-82 Linux Device Driver IPAC Carrier Version 2.2.x User Manual Issue 2.2.0 November 2017 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek, Germany Phone: +49 (0)

More information

Writing drivers for the Linux Crypto subsystem

Writing drivers for the Linux Crypto subsystem May 18, 2014 Marek Vasut Software engineer at DENX S.E. since 2011 Embedded and Real-Time Systems Services, Linux kernel and driver development, U-Boot development, consulting, training. Versatile Linux

More information

Lecture files in /home/hwang/cs375/lecture05 on csserver.

Lecture files in /home/hwang/cs375/lecture05 on csserver. Lecture 5 Lecture files in /home/hwang/cs375/lecture05 on csserver. cp -r /home/hwang/cs375/lecture05. scp -r user@csserver.evansville.edu:/home/hwang/cs375/lecture05. Project 1 posted, due next Thursday

More information

Preview. System Call. System Call. System Call. System Call. Library Functions 9/20/2018. System Call

Preview. System Call. System Call. System Call. System Call. Library Functions 9/20/2018. System Call Preview File Descriptors for a Process for Managing Files write read open close lseek A system call is a request for the operating system to do something on behalf of the user's program. The system calls

More information

Auto-Pipe Software Block Interface v2. Interface. Contents. Auto-Pipe Types. From Auto-Pipe Wiki

Auto-Pipe Software Block Interface v2. Interface. Contents. Auto-Pipe Types. From Auto-Pipe Wiki Auto-Pipe Software Block Interface v2 From Auto-Pipe Wiki Contents 1 Interface 1.1 Auto-Pipe Types 1.2 AutoPipe Functions 1.3 Block Structure 1.4 Block Functions 2 Signaling 2.1 Stop Signal (type 0) 2.2

More information

Outline. OS Interface to Devices. System Input/Output. CSCI 4061 Introduction to Operating Systems. System I/O and Files. Instructor: Abhishek Chandra

Outline. OS Interface to Devices. System Input/Output. CSCI 4061 Introduction to Operating Systems. System I/O and Files. Instructor: Abhishek Chandra Outline CSCI 6 Introduction to Operating Systems System I/O and Files File I/O operations File Descriptors and redirection Pipes and FIFOs Instructor: Abhishek Chandra 2 System Input/Output Hardware devices:

More information

N720 OpenLinux Software User Guide Version 1.2

N720 OpenLinux Software User Guide Version 1.2 N720 Hardware User Guide () N720 OpenLinux Software User Guide Version 1.2 Copyright Copyright 2017 Neoway Technology Co., Ltd. All rights reserved. No part of this document may be reproduced or transmitted

More information

File System Definition: file. File management: File attributes: Name: Type: Location: Size: Protection: Time, date and user identification:

File System Definition: file. File management: File attributes: Name: Type: Location: Size: Protection: Time, date and user identification: File System Definition: Computer can store the information on different storage media such as magnetic disk, tapes, etc. and for convenience to use the operating system provides the uniform logical view

More information

CS 453: Operating Systems Programming Project 5 (100 points) Linux Device Driver

CS 453: Operating Systems Programming Project 5 (100 points) Linux Device Driver CS 453: Operating Systems Programming Project 5 (100 points) Linux Device Driver 1 Setup In this assignment, we will write a simple character driver called booga. Please do a git pull --rebase in your

More information

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Prof. Peng Li TA: Andrew Targhetta (Lab exercise created by A Targhetta and P Gratz) Laboratory

More information

13th ANNUAL WORKSHOP 2017 VERBS KERNEL ABI. Liran Liss, Matan Barak. Mellanox Technologies LTD. [March 27th, 2017 ]

13th ANNUAL WORKSHOP 2017 VERBS KERNEL ABI. Liran Liss, Matan Barak. Mellanox Technologies LTD. [March 27th, 2017 ] 13th ANNUAL WORKSHOP 2017 VERBS KERNEL ABI Liran Liss, Matan Barak Mellanox Technologies LTD [March 27th, 2017 ] AGENDA System calls and ABI The RDMA ABI challenge Usually abstract HW details But RDMA

More information

전공핵심실습 1: 운영체제론 Chapter 6. Inter-process Communication (IPC)

전공핵심실습 1: 운영체제론 Chapter 6. Inter-process Communication (IPC) 1 전공핵심실습 1: 운영체제론 Chapter 6. Inter-process Communication (IPC) Sungkyunkwan University Dongkun Shin Contents 2 Linux Kernel IPC Pipe FIFO System V IPC Semaphore Message Queue Shared Memory Tizen Platform

More information

Dissecting a 17-year-old kernel bug

Dissecting a 17-year-old kernel bug Dissecting a 17-year-old kernel bug Vitaly Nikolenko bevx 2018 - Hong Kong https://www.beyondsecurity.com/bevxcon/ Agenda Vulnerability analysis CVE-2018-6554^ - memory leak CVE-2018-6555^ - privilege

More information

/* $Id: HGSMIBase.cpp $ */ * VirtualBox Video driver, common code - HGSMI initialisation and helper * functions. */

/* $Id: HGSMIBase.cpp $ */ * VirtualBox Video driver, common code - HGSMI initialisation and helper * functions. */ HGSMIBase.c /* $Id: HGSMIBase.cpp $ /** @file * VirtualBox Video driver, common code - HGSMI initialisation and helper * functions. /* * Copyright (C) 2006-2016 Oracle Corporation * * This file is part

More information

RF-IDs in the Kernel -- Episode III: I want to File Away

RF-IDs in the Kernel -- Episode III: I want to File Away What s on the menu Software Comprehension and Maintenance June 2005 RF-IDs in the Kernel -- Episode III: I want to File Away Achilleas Anagnostopoulos (archie@istlab.dmst.aueb.gr) Department of Management

More information

The Note/1 Driver Design

The Note/1 Driver Design Nathan Lay Kelly Hirai 6/14/06 Device Drivers The Note/1 Driver Design Introduction The Music Quest Note/1 midi engine is a small midi controller that communicates over the parallel port. It features two

More information

Scripting Linux system calls with Lua. Lua Workshop 2018 Pedro Tammela CUJO AI

Scripting Linux system calls with Lua. Lua Workshop 2018 Pedro Tammela CUJO AI Scripting Linux system calls with Lua Pedro Tammela CUJO AI Scripting system calls Customizing system calls at the kernel level Why bother? Through scripts, users can adapt the operating system behavior

More information