Linux Kernel Debugging: Leverage open source tools and advanced techniques to debug Linux kernel or module issues

0
(0)

Linux Kernel Debugging: Leverage open source tools and advanced techniques to debug Linux kernel or module issues
 

  • Author:Kaiwan N Billimoria
  • Length: 571 pages
  • Edition: 1
  • Publisher: Packt Publishing
  • Publication Date: 2022-08-09
  • ISBN-10: 1801075034
  • ISBN-13: 9781801075039
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Debug Linux kernel modules and the kernel itself by mastering powerful open source tools and advanced kernel debugging techniques

    Key Features

    • Learn how to use a variety of kernel and module debug tools and techniques with the help of examples
    • Understand how to expertly interpret a kernel oops and identify the underlying defects
    • Includes easy-to-look up tables and simplified explanations of complex kernel-level defects

    Book Description

    The Linux kernel is at the very core of arguably the world’s best production-quality OS. Debugging it, though, can be a complex endeavor. Linux Kernel Debugging is a thorough guide to advanced kernel debugging.

    This book covers a range of debugging techniques in detail, starting with instrumentation-based debugging techniques, the kernel’s powerful Kprobes framework, printk, and friends. The book features two whole chapters devoted to the tools and techniques for debugging memory-related bugs. It also prepares you to interpret the underlying issue when the Linux kernel throws an oops. As you advance through the chapters, you’ll be able to demystify concurrency by learning what data races are and how to handle them, including the use of modern features like Kernel Concurrency Sanitizer (KCSAN). You’ll also discover how to overcome some thorny issues related to debugging and performance through detailed kernel-level tracing and learn to wield the power of Ftrace and its frontends. What’s more? The book shows you how to deal with kernel hangs and panic, leverage the venerable GDB tool within the kernel, and much more.

    By the time you complete reading this debugging kernel book, you’ll have at your disposal, a whole range of powerful debug tools and techniques, along with a keen sense as to when to use which.

    What you will learn

    • Instrumentation-based printk and the powerful dynamic debug framework
    • Use Kprobes statically and dynamically to trap into kernel or module functions
    • Catch kernel memory defects with KASAN, UBSAN, SLUB debug, and kmemleak
    • Precisely identify the source location of kernel and module bugs
    • Understand data races and use KCSAN to catch evasive concurrency defects
    • Leverage Ftrace and trace-cmd to trace the kernel flow in great detail
    • Write a custom kernel panic handler using the WD and hangcheck timer
    • Learn to use KGDB to single-step and debug kernel or module source code

    Who This Book Is For

    This book is for Linux kernel developers, module or driver authors, and testers interested in debugging and enhancing their Linux systems at the level of the kernel. System administrators who want to understand and debug the internal infrastructure of their Linux kernels will also find this book useful. A good hold of C programming and the Linux command line is necessary. Some experience with module or kernel development will be beneficial too.

    中文:

    书名:Linux内核调试:利用开源工具和高级技术来调试Linux内核或模块问题

    通过掌握强大的开源工具和高级内核调试技术,调试Linux内核模块和内核本身

    主要特点

    • 通过示例了解如何使用各种内核和模块调试工具和技术
    • 了解如何熟练地解释内核OOPS并识别潜在的缺陷
    • 包括易于查找的表格和复杂内核级缺陷的简化解释

    图书描述

    Linux内核是可以说是世界上最好的生产质量操作系统的核心。然而,调试它可能是一项复杂的工作。Linux内核调试是高级内核调试的全面指南。

    本书详细介绍了一系列调试技术,从基于工具的调试技术、内核强大的KProbe框架、print tk和Friends开始。这本书有两个完整的章节,专门介绍调试内存相关错误的工具和技术。它还为您解释Linux内核抛出OOPS时的潜在问题做好准备。随着章节的推进,您将能够通过了解什么是数据竞争以及如何处理它们来揭开并发性的神秘面纱,包括使用像内核并发消毒器(KCSAN)这样的现代功能。您还将了解如何通过详细的内核级跟踪来克服与调试和性能相关的一些棘手问题,并学习如何使用Ftrace及其前端的强大功能。还有什么?这本书向你展示了如何处理内核挂起和死机,如何利用内核中古老的gdb工具,以及更多。

    当您读完这本调试内核书籍时,您将拥有一系列强大的调试工具和技术,并敏锐地意识到何时应该使用哪种工具和技术。

    你将学到什么

    • 基于工具的打印和功能强大的动态调试框架
    • 静态和动态地使用KProbe来捕获内核或模块函数
    • Catch kernel memory defects with KASAN, UBSAN, SLUB debug, and kmemleak
    • 准确识别内核和模块错误的来源位置
    • 了解数据竞争并使用KCSAN捕获可规避的并发缺陷
    • 利用ftrace和trace-cmd更详细地跟踪内核流
    • 使用WD和挂起检查计时器编写自定义内核死机处理程序
    • 学习使用KGDB单步执行和调试内核或模块源代码

    Who This Book Is For

    本书面向Linux内核开发人员、模块或驱动程序作者,以及对在内核级别调试和增强Linux系统感兴趣的测试人员。想要了解和调试其Linux内核的内部基础设施的系统管理员也会发现这本书很有用。掌握好C编程和Linux命令行是必要的。有一些模块或内核开发的经验也会很有帮助。

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册