Chapter2.Exploration Toolkit


Chapter 2. Exploration Toolkit

In this chapter

  • 2.1 Common Kernel Datatypes 30

  • 2.2 Assembly 38

  • 2.3 Assembly Language Example 46

  • 2.4 Inline Assembly 55

  • 2.5 Quirky C Language Usage 62

  • 2.6 A Quick Tour of Kernel Exploration Tools 65

  • 2.7 Kernel Speak: Listening to Kernel Messages 67

  • 2.8 Miscellaneous Quirks 68

  • Summary 71

  • Project: Hellomod 72

  • Exercises 76

This chapter overviews common Linux coding constructs and describes a number of methods to interface with the kernel. We start by looking at common Linux datatypes used for efficient storage and retrieval of information, coding methods, and basic assembly language. This provides a foundation for the more detailed kernel analysis in the later chapters. We then describe how Linux compiles and links the source code into executable code. This is useful for understanding cross-platform code and nicely introduces the GNU toolset. This is followed by an outline of a number of methods to gather information from the Linux kernel. We range from analyzing source and executable code to inserting debugging statements within the Linux kernel. This chapter closes with a "grab bag" of observations and comments on other regularly encountered Linux conventions.[1]

[1] We do not yet delve into the kernel internals. At this point, we summarize the tools and concepts necessary to navigate through the kernel code. If you are a more experienced kernel hacker, you can skip this section and jump right into the kernel internals, which begins in Chapter 3, "Processes: The Principal Model of Execution."




The Linux Kernel Primer. A Top-Down Approach for x86 and PowerPC Architectures
The Linux Kernel Primer. A Top-Down Approach for x86 and PowerPC Architectures
ISBN: 131181637
EAN: N/A
Year: 2005
Pages: 134

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net