Technical requirements
I assume that you have gone through Online Chapter, Kernel Workspace Setup, and have appropriately prepared a guest Virtual Machine (VM) running Ubuntu 22.04 LTS (or a later stable release) and installed all the required packages. If not, I recommend you to do this first.
Also, if you haven’t yet, do clone this book’s GitHub repository for the code (found here: https://github.com/PacktPublishing/Linux-Kernel-Programming_2E); let’s work on it in a hands-on fashion.
I assume that you are familiar with basic virtual memory concepts, the user-mode process Virtual Address Space (VAS) layout of segments (mappings), the stack, and so on. Nevertheless, we devote a few pages to explaining these basics (in the Understanding the basics of the process VAS section that soon follows).