]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/mm: Dump fault info in case of low address protection fault
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 25 Mar 2025 07:57:10 +0000 (08:57 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 31 Mar 2025 10:20:39 +0000 (12:20 +0200)
In case of an unexpected low address protection fault in user mode dump
fault info to make debugging a bit easier. At least the teid is valid,
while dumping the page table is racy, since no lock is held.
But it might still give some hints.

Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/fault.c

index 31a763e05287f7ceeeccf54676d2762cf8abfc27..da84ff6770decaa197fc28e4332c7d81cd686197 100644 (file)
@@ -376,6 +376,7 @@ void do_protection_exception(struct pt_regs *regs)
        if (unlikely(!teid.b61)) {
                if (user_mode(regs)) {
                        /* Low-address protection in user mode: cannot happen */
+                       dump_fault_info(regs);
                        die(regs, "Low-address protection");
                }
                /*