How does the Linux kernel distinguish between a page fault caused by a bad user pointer vs a kernel bug when both occur in Ring 0? – unix.stackexchange.com

Bhushitha Hashan
I understand that when a page fault occurs in user space (Ring 3), the fault handler can read the saved CS register from pt_regs to confirm CPL=3, then send SIGSEGV to the process and keep the kernel ...