Now, let's go back to our ch7/show_kernel_seg LKM demo program. We have provided a kernel module parameter named show_uservas(defaulting to the value 0); when set to 1, some details regarding the process context's user space are displayed as well. Here's the definition of the module parameter:
static int show_uservas;
module_param(show_uservas, int, 0660);
MODULE_PARM_DESC(show_uservas,
"Show some user space VAS details; 0 = no (default), 1 = show");
Right, on the same device (our Raspberry Pi 3 B+), let's again run our show_kernel_seg kernel module, this time requesting it to display user space details as well (via the aforementioned parameter). The following screenshot shows the complete output:
Figure 7.16 – Screenshot of our show_kernel_seg.ko LKM's output showing both kernel and user VAS details when running on a Raspberry Pi 3B+ with the stock Raspberry Pi 32-bit Linux OS
This is useful; we can...