I am wondering if there is a relevant part in the kernel source when a
segmentation fault occurs in an application.
For example, killing the application with the kill command will run the kernel/signal.c source. https://github.com/torvalds/linux/blob/master/kernel/signal.c
The goal is to execute the printk() function from the relevant kernel source when a
segmentation fault occurs.