|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/system-calls-in-deep/
课程评论:没有评论
**课程名称:System Calls in deep** **课程概述:** 本课程深入探讨Linux系统调用的底层机制,重点关注内联汇编在系统调用中的应用。学员将学习以下内容: * **内联汇编基础:** 掌握内联汇编的类型(基本型和扩展型)以及GCC汇编语法(AT&T)。 * **汇编操作数:** 学习如何使用约束字符串定义输入、输出操作数,以及理解“clobbering”的概念。 * **内联汇编在Linux内核中的应用:** 详细了解内联汇编在处理中断、I/O端口、原子操作、CPUID指令、控制寄存器、时间戳计数器等方面的广泛用途。 * **系统调用深入理解:** 探索用户空间切换到内核空间的多种方式,包括`int $0x80`、`sysenter/sysexit`以及`syscall/sysret`。 * **VDSO:** 学习虚拟动态共享对象(VDSO)的工作原理。 * **自定义系统调用:** 实操添加不接受参数和接受参数的新系统调用。 * **内核符号与符号表:** 理解内核符号及其符号表的工作机制。 * **内核模块开发:** 学习如何编写内核模块来覆盖内核符号表,以及如何编写内核模块来嗅探传递给系统调用的参数。 **示例与实践:** 课程将通过一系列实际示例来巩固学习成果,包括: * 使用内联汇编实现加、减、乘、除运算。 * 探讨用户空间是否可以禁用/启用中断,以及如何实现。 * 检查用户空间中断状态。 * 通过内联汇编在用户空间启用/禁用中断。 * 实现简单的锁定机制,以避免竞态条件(如使用`lock`前缀、`compare and exchange`指令)。 **总而言之**,本课程为希望深入理解Linux系统调用和底层硬件交互的开发者提供了一个全面的学习平台。
What will you learn from this course?Basics of Inline AssemblyTypes of Inline Assembly: Basic and ExtendedGCC Assembly Syntax: AT & TConstraint stringsInput and output operandsClobberingVarious use cases of Inline assembly in Linux kernel: Interrupts, I/O Ports, Atomic operations, CPUID, Control Registers, Timestamp counters etcDeep understanding of system calls: Various ways of switching from user space to kernel space (int $0x80, sysenter/sysexit, syscall/sysret)VDSOAdding a new system call which doesn't accept any argumentsAdding a system call which accept argumentKernel Symbols and Kernel Symbol tableWriting a kernel module which overwrite the kernel symbol tableWriting a kernel module which sniffs the parameters passed to a system callExamples covered in this course:Add two numbers in inline assemblyAdd three numbers in inline assemblySubtract, divide, multiply in inline assemblyCan we disable/enable interrupts in user spaceChecking whether interrupts are enabled and disabled in user spaceEnabling/Disabling interrupts in user spaceImplementing simple locking to avoid race conditions: Lock prefix, compare and exchange instructionsAnd many