1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds * S390 version
4a53c8fabSHeiko Carstens * Copyright IBM Corp. 1999
51da177e4SLinus Torvalds * Author(s): Hartmut Penner (hp@de.ibm.com)
61da177e4SLinus Torvalds * Ulrich Weigand (uweigand@de.ibm.com)
71da177e4SLinus Torvalds *
81da177e4SLinus Torvalds * Derived from "arch/i386/mm/fault.c"
91da177e4SLinus Torvalds * Copyright (C) 1995 Linus Torvalds
101da177e4SLinus Torvalds */
111da177e4SLinus Torvalds
12052ff461SHeiko Carstens #include <linux/kernel_stat.h>
13cdd6c482SIngo Molnar #include <linux/perf_event.h>
141da177e4SLinus Torvalds #include <linux/signal.h>
151da177e4SLinus Torvalds #include <linux/sched.h>
16b17b0153SIngo Molnar #include <linux/sched/debug.h>
171da177e4SLinus Torvalds #include <linux/kernel.h>
181da177e4SLinus Torvalds #include <linux/errno.h>
191da177e4SLinus Torvalds #include <linux/string.h>
201da177e4SLinus Torvalds #include <linux/types.h>
211da177e4SLinus Torvalds #include <linux/ptrace.h>
221da177e4SLinus Torvalds #include <linux/mman.h>
231da177e4SLinus Torvalds #include <linux/mm.h>
247757591aSHeiko Carstens #include <linux/compat.h>
251da177e4SLinus Torvalds #include <linux/smp.h>
261eeb66a1SChristoph Hellwig #include <linux/kdebug.h>
271da177e4SLinus Torvalds #include <linux/init.h>
281da177e4SLinus Torvalds #include <linux/console.h>
29dcc096c5SPaul Gortmaker #include <linux/extable.h>
301da177e4SLinus Torvalds #include <linux/hardirq.h>
314ba069b8SMichael Grundy #include <linux/kprobes.h>
32be5ec363SMartin Schwidefsky #include <linux/uaccess.h>
3353492b1dSGerald Schaefer #include <linux/hugetlb.h>
34e41ba111SSven Schnelle #include <linux/kfence.h>
35d09a307fSHeiko Carstens #include <asm/asm-extable.h>
36cbb870c8SHeiko Carstens #include <asm/asm-offsets.h>
371ec2772eSMartin Schwidefsky #include <asm/diag.h>
381e133ab2SMartin Schwidefsky #include <asm/gmap.h>
39d7b250e2SHeiko Carstens #include <asm/irq.h>
406252d702SMartin Schwidefsky #include <asm/mmu_context.h>
41a0616cdeSDavid Howells #include <asm/facility.h>
42084ea4d6SVasily Gorbik #include <asm/uv.h>
43a806170eSHeiko Carstens #include "../kernel/entry.h"
441da177e4SLinus Torvalds
451da177e4SLinus Torvalds #define __FAIL_ADDR_MASK -4096L
461da177e4SLinus Torvalds
47d939474bSPeter Xu /*
48d939474bSPeter Xu * Allocate private vm_fault_reason from top. Please make sure it won't
49d939474bSPeter Xu * collide with vm_fault_reason.
50d939474bSPeter Xu */
51d939474bSPeter Xu #define VM_FAULT_BADCONTEXT ((__force vm_fault_t)0x80000000)
52d939474bSPeter Xu #define VM_FAULT_BADMAP ((__force vm_fault_t)0x40000000)
53d939474bSPeter Xu #define VM_FAULT_BADACCESS ((__force vm_fault_t)0x20000000)
54d939474bSPeter Xu #define VM_FAULT_SIGNAL ((__force vm_fault_t)0x10000000)
55d939474bSPeter Xu #define VM_FAULT_PFAULT ((__force vm_fault_t)0x8000000)
5650d7280dSMartin Schwidefsky
570aaba41bSMartin Schwidefsky enum fault_type {
580aaba41bSMartin Schwidefsky KERNEL_FAULT,
590aaba41bSMartin Schwidefsky USER_FAULT,
600aaba41bSMartin Schwidefsky GMAP_FAULT,
610aaba41bSMartin Schwidefsky };
620aaba41bSMartin Schwidefsky
63a4f32bdbSHeiko Carstens static unsigned long store_indication __read_mostly;
6492f842eaSMartin Schwidefsky
fault_init(void)65a4f32bdbSHeiko Carstens static int __init fault_init(void)
6692f842eaSMartin Schwidefsky {
67a4f32bdbSHeiko Carstens if (test_facility(75))
6892f842eaSMartin Schwidefsky store_indication = 0xc00;
69a4f32bdbSHeiko Carstens return 0;
7092f842eaSMartin Schwidefsky }
71a4f32bdbSHeiko Carstens early_initcall(fault_init);
7292f842eaSMartin Schwidefsky
731da177e4SLinus Torvalds /*
740aaba41bSMartin Schwidefsky * Find out which address space caused the exception.
751da177e4SLinus Torvalds */
get_fault_type(struct pt_regs * regs)76bf2f1eeeSMasahiro Yamada static enum fault_type get_fault_type(struct pt_regs *regs)
771da177e4SLinus Torvalds {
78457f2180SHeiko Carstens unsigned long trans_exc_code;
79457f2180SHeiko Carstens
80457f2180SHeiko Carstens trans_exc_code = regs->int_parm_long & 3;
810aaba41bSMartin Schwidefsky if (likely(trans_exc_code == 0)) {
820aaba41bSMartin Schwidefsky /* primary space exception */
8387d59863SHeiko Carstens if (user_mode(regs))
8487d59863SHeiko Carstens return USER_FAULT;
8587d59863SHeiko Carstens if (!IS_ENABLED(CONFIG_PGSTE))
8687d59863SHeiko Carstens return KERNEL_FAULT;
8787d59863SHeiko Carstens if (test_pt_regs_flag(regs, PIF_GUEST_FAULT))
880aaba41bSMartin Schwidefsky return GMAP_FAULT;
890aaba41bSMartin Schwidefsky return KERNEL_FAULT;
900aaba41bSMartin Schwidefsky }
9187d59863SHeiko Carstens if (trans_exc_code == 2)
920aaba41bSMartin Schwidefsky return USER_FAULT;
93962f0af8SGerald Schaefer if (trans_exc_code == 1) {
94962f0af8SGerald Schaefer /* access register mode, not used in the kernel */
95962f0af8SGerald Schaefer return USER_FAULT;
96962f0af8SGerald Schaefer }
970aaba41bSMartin Schwidefsky /* home space exception -> access via kernel ASCE */
980aaba41bSMartin Schwidefsky return KERNEL_FAULT;
991da177e4SLinus Torvalds }
1001da177e4SLinus Torvalds
get_fault_address(struct pt_regs * regs)101d9c2cf67SHeiko Carstens static unsigned long get_fault_address(struct pt_regs *regs)
102d9c2cf67SHeiko Carstens {
103d9c2cf67SHeiko Carstens unsigned long trans_exc_code = regs->int_parm_long;
104d9c2cf67SHeiko Carstens
105d9c2cf67SHeiko Carstens return trans_exc_code & __FAIL_ADDR_MASK;
106d9c2cf67SHeiko Carstens }
107d9c2cf67SHeiko Carstens
fault_is_write(struct pt_regs * regs)108d9c2cf67SHeiko Carstens static bool fault_is_write(struct pt_regs *regs)
109d9c2cf67SHeiko Carstens {
110d9c2cf67SHeiko Carstens unsigned long trans_exc_code = regs->int_parm_long;
111d9c2cf67SHeiko Carstens
112d9c2cf67SHeiko Carstens return (trans_exc_code & store_indication) == 0x400;
113d9c2cf67SHeiko Carstens }
114d9c2cf67SHeiko Carstens
bad_address(void * p)1153b7df342SHeiko Carstens static int bad_address(void *p)
1163b7df342SHeiko Carstens {
1173b7df342SHeiko Carstens unsigned long dummy;
1183b7df342SHeiko Carstens
11925f12ae4SChristoph Hellwig return get_kernel_nofault(dummy, (unsigned long *)p);
1203b7df342SHeiko Carstens }
1213b7df342SHeiko Carstens
dump_pagetable(unsigned long asce,unsigned long address)1223b7df342SHeiko Carstens static void dump_pagetable(unsigned long asce, unsigned long address)
1233b7df342SHeiko Carstens {
124fe7b2747SHeiko Carstens unsigned long *table = __va(asce & _ASCE_ORIGIN);
1253b7df342SHeiko Carstens
1263b7df342SHeiko Carstens pr_alert("AS:%016lx ", asce);
1273b7df342SHeiko Carstens switch (asce & _ASCE_TYPE_MASK) {
1283b7df342SHeiko Carstens case _ASCE_TYPE_REGION1:
129f1c1174fSHeiko Carstens table += (address & _REGION1_INDEX) >> _REGION1_SHIFT;
1303b7df342SHeiko Carstens if (bad_address(table))
1313b7df342SHeiko Carstens goto bad;
1323b7df342SHeiko Carstens pr_cont("R1:%016lx ", *table);
1333b7df342SHeiko Carstens if (*table & _REGION_ENTRY_INVALID)
1343b7df342SHeiko Carstens goto out;
135d2f2949aSHeiko Carstens table = __va(*table & _REGION_ENTRY_ORIGIN);
1362c7749b9SJoe Perches fallthrough;
1373b7df342SHeiko Carstens case _ASCE_TYPE_REGION2:
138f1c1174fSHeiko Carstens table += (address & _REGION2_INDEX) >> _REGION2_SHIFT;
1393b7df342SHeiko Carstens if (bad_address(table))
1403b7df342SHeiko Carstens goto bad;
1413b7df342SHeiko Carstens pr_cont("R2:%016lx ", *table);
1423b7df342SHeiko Carstens if (*table & _REGION_ENTRY_INVALID)
1433b7df342SHeiko Carstens goto out;
144d2f2949aSHeiko Carstens table = __va(*table & _REGION_ENTRY_ORIGIN);
1452c7749b9SJoe Perches fallthrough;
1463b7df342SHeiko Carstens case _ASCE_TYPE_REGION3:
147f1c1174fSHeiko Carstens table += (address & _REGION3_INDEX) >> _REGION3_SHIFT;
1483b7df342SHeiko Carstens if (bad_address(table))
1493b7df342SHeiko Carstens goto bad;
1503b7df342SHeiko Carstens pr_cont("R3:%016lx ", *table);
1513b7df342SHeiko Carstens if (*table & (_REGION_ENTRY_INVALID | _REGION3_ENTRY_LARGE))
1523b7df342SHeiko Carstens goto out;
153d2f2949aSHeiko Carstens table = __va(*table & _REGION_ENTRY_ORIGIN);
1542c7749b9SJoe Perches fallthrough;
1553b7df342SHeiko Carstens case _ASCE_TYPE_SEGMENT:
156f1c1174fSHeiko Carstens table += (address & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
1573b7df342SHeiko Carstens if (bad_address(table))
1583b7df342SHeiko Carstens goto bad;
15991c0837eSJoe Perches pr_cont("S:%016lx ", *table);
1603b7df342SHeiko Carstens if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE))
1613b7df342SHeiko Carstens goto out;
162d2f2949aSHeiko Carstens table = __va(*table & _SEGMENT_ENTRY_ORIGIN);
1633b7df342SHeiko Carstens }
164f1c1174fSHeiko Carstens table += (address & _PAGE_INDEX) >> _PAGE_SHIFT;
1653b7df342SHeiko Carstens if (bad_address(table))
1663b7df342SHeiko Carstens goto bad;
1673b7df342SHeiko Carstens pr_cont("P:%016lx ", *table);
1683b7df342SHeiko Carstens out:
1693b7df342SHeiko Carstens pr_cont("\n");
1703b7df342SHeiko Carstens return;
1713b7df342SHeiko Carstens bad:
1723b7df342SHeiko Carstens pr_cont("BAD\n");
1733b7df342SHeiko Carstens }
1743b7df342SHeiko Carstens
dump_fault_info(struct pt_regs * regs)1753b7df342SHeiko Carstens static void dump_fault_info(struct pt_regs *regs)
1763b7df342SHeiko Carstens {
1773b7df342SHeiko Carstens unsigned long asce;
1783b7df342SHeiko Carstens
1795d7eccecSHeiko Carstens pr_alert("Failing address: %016lx TEID: %016lx\n",
1805d7eccecSHeiko Carstens regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
1813b7df342SHeiko Carstens pr_alert("Fault in ");
1823b7df342SHeiko Carstens switch (regs->int_parm_long & 3) {
1833b7df342SHeiko Carstens case 3:
1843b7df342SHeiko Carstens pr_cont("home space ");
1853b7df342SHeiko Carstens break;
1863b7df342SHeiko Carstens case 2:
1873b7df342SHeiko Carstens pr_cont("secondary space ");
1883b7df342SHeiko Carstens break;
1893b7df342SHeiko Carstens case 1:
1903b7df342SHeiko Carstens pr_cont("access register ");
1913b7df342SHeiko Carstens break;
1923b7df342SHeiko Carstens case 0:
1933b7df342SHeiko Carstens pr_cont("primary space ");
1943b7df342SHeiko Carstens break;
1953b7df342SHeiko Carstens }
1963b7df342SHeiko Carstens pr_cont("mode while using ");
1970aaba41bSMartin Schwidefsky switch (get_fault_type(regs)) {
1980aaba41bSMartin Schwidefsky case USER_FAULT:
1993b7df342SHeiko Carstens asce = S390_lowcore.user_asce;
2003b7df342SHeiko Carstens pr_cont("user ");
2010aaba41bSMartin Schwidefsky break;
2020aaba41bSMartin Schwidefsky case GMAP_FAULT:
2030aaba41bSMartin Schwidefsky asce = ((struct gmap *) S390_lowcore.gmap)->asce;
2040aaba41bSMartin Schwidefsky pr_cont("gmap ");
2050aaba41bSMartin Schwidefsky break;
2060aaba41bSMartin Schwidefsky case KERNEL_FAULT:
2070aaba41bSMartin Schwidefsky asce = S390_lowcore.kernel_asce;
2080aaba41bSMartin Schwidefsky pr_cont("kernel ");
2090aaba41bSMartin Schwidefsky break;
210bf2f1eeeSMasahiro Yamada default:
211bf2f1eeeSMasahiro Yamada unreachable();
2123b7df342SHeiko Carstens }
2133b7df342SHeiko Carstens pr_cont("ASCE.\n");
2143b7df342SHeiko Carstens dump_pagetable(asce, regs->int_parm_long & __FAIL_ADDR_MASK);
2153b7df342SHeiko Carstens }
2163b7df342SHeiko Carstens
2175d7eccecSHeiko Carstens int show_unhandled_signals = 1;
2185d7eccecSHeiko Carstens
report_user_fault(struct pt_regs * regs,long signr,int is_mm_fault)2195d7eccecSHeiko Carstens void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault)
220ab3c68eeSHeiko Carstens {
221ab3c68eeSHeiko Carstens if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
222ab3c68eeSHeiko Carstens return;
223ab3c68eeSHeiko Carstens if (!unhandled_signal(current, signr))
224ab3c68eeSHeiko Carstens return;
225ab3c68eeSHeiko Carstens if (!printk_ratelimit())
226ab3c68eeSHeiko Carstens return;
227413d4047SHeiko Carstens printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d ",
228413d4047SHeiko Carstens regs->int_code & 0xffff, regs->int_code >> 17);
2299cb1ccecSHeiko Carstens print_vma_addr(KERN_CONT "in ", regs->psw.addr);
230aa33c8cbSMartin Schwidefsky printk(KERN_CONT "\n");
2315d7eccecSHeiko Carstens if (is_mm_fault)
2323b7df342SHeiko Carstens dump_fault_info(regs);
233ab3c68eeSHeiko Carstens show_regs(regs);
234ab3c68eeSHeiko Carstens }
235ab3c68eeSHeiko Carstens
2361da177e4SLinus Torvalds /*
2371da177e4SLinus Torvalds * Send SIGSEGV to task. This is an external routine
2381da177e4SLinus Torvalds * to keep the stack usage of do_page_fault small.
2391da177e4SLinus Torvalds */
do_sigsegv(struct pt_regs * regs,int si_code)240aa33c8cbSMartin Schwidefsky static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
2411da177e4SLinus Torvalds {
2425d7eccecSHeiko Carstens report_user_fault(regs, SIGSEGV, 1);
2439507a5d0SEric W. Biederman force_sig_fault(SIGSEGV, si_code,
2442e1661d2SEric W. Biederman (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK));
2451da177e4SLinus Torvalds }
2461da177e4SLinus Torvalds
do_no_context(struct pt_regs * regs,vm_fault_t fault)247d9c2cf67SHeiko Carstens static noinline void do_no_context(struct pt_regs *regs, vm_fault_t fault)
24810c1031fSMartin Schwidefsky {
249d9c2cf67SHeiko Carstens enum fault_type fault_type;
250d9c2cf67SHeiko Carstens unsigned long address;
251d9c2cf67SHeiko Carstens bool is_write;
252d9c2cf67SHeiko Carstens
25346fee16fSHeiko Carstens if (fixup_exception(regs))
25410c1031fSMartin Schwidefsky return;
255d9c2cf67SHeiko Carstens fault_type = get_fault_type(regs);
256d9c2cf67SHeiko Carstens if ((fault_type == KERNEL_FAULT) && (fault == VM_FAULT_BADCONTEXT)) {
257d9c2cf67SHeiko Carstens address = get_fault_address(regs);
258d9c2cf67SHeiko Carstens is_write = fault_is_write(regs);
259d9c2cf67SHeiko Carstens if (kfence_handle_page_fault(address, is_write, regs))
260d9c2cf67SHeiko Carstens return;
261d9c2cf67SHeiko Carstens }
26210c1031fSMartin Schwidefsky /*
26310c1031fSMartin Schwidefsky * Oops. The kernel tried to access some bad page. We'll have to
26410c1031fSMartin Schwidefsky * terminate things with extreme prejudice.
26510c1031fSMartin Schwidefsky */
266d9c2cf67SHeiko Carstens if (fault_type == KERNEL_FAULT)
26710c1031fSMartin Schwidefsky printk(KERN_ALERT "Unable to handle kernel pointer dereference"
2683b7df342SHeiko Carstens " in virtual kernel address space\n");
26910c1031fSMartin Schwidefsky else
27010c1031fSMartin Schwidefsky printk(KERN_ALERT "Unable to handle kernel paging request"
2713b7df342SHeiko Carstens " in virtual user address space\n");
2723b7df342SHeiko Carstens dump_fault_info(regs);
273aa33c8cbSMartin Schwidefsky die(regs, "Oops");
27410c1031fSMartin Schwidefsky }
27510c1031fSMartin Schwidefsky
do_low_address(struct pt_regs * regs)276aa33c8cbSMartin Schwidefsky static noinline void do_low_address(struct pt_regs *regs)
27710c1031fSMartin Schwidefsky {
27810c1031fSMartin Schwidefsky /* Low-address protection hit in kernel mode means
27910c1031fSMartin Schwidefsky NULL pointer write access in kernel mode. */
28010c1031fSMartin Schwidefsky if (regs->psw.mask & PSW_MASK_PSTATE) {
28110c1031fSMartin Schwidefsky /* Low-address protection hit in user mode 'cannot happen'. */
282aa33c8cbSMartin Schwidefsky die (regs, "Low-address protection");
28310c1031fSMartin Schwidefsky }
28410c1031fSMartin Schwidefsky
285d9c2cf67SHeiko Carstens do_no_context(regs, VM_FAULT_BADACCESS);
28610c1031fSMartin Schwidefsky }
28710c1031fSMartin Schwidefsky
do_sigbus(struct pt_regs * regs)288aa33c8cbSMartin Schwidefsky static noinline void do_sigbus(struct pt_regs *regs)
28910c1031fSMartin Schwidefsky {
29010c1031fSMartin Schwidefsky /*
29110c1031fSMartin Schwidefsky * Send a sigbus, regardless of whether we were in kernel
29210c1031fSMartin Schwidefsky * or user mode.
29310c1031fSMartin Schwidefsky */
2949507a5d0SEric W. Biederman force_sig_fault(SIGBUS, BUS_ADRERR,
2952e1661d2SEric W. Biederman (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK));
29610c1031fSMartin Schwidefsky }
29710c1031fSMartin Schwidefsky
do_fault_error(struct pt_regs * regs,vm_fault_t fault)298bf2ce385SHeiko Carstens static noinline void do_fault_error(struct pt_regs *regs, vm_fault_t fault)
29950d7280dSMartin Schwidefsky {
30050d7280dSMartin Schwidefsky int si_code;
30150d7280dSMartin Schwidefsky
30250d7280dSMartin Schwidefsky switch (fault) {
30350d7280dSMartin Schwidefsky case VM_FAULT_BADACCESS:
30450d7280dSMartin Schwidefsky case VM_FAULT_BADMAP:
30550d7280dSMartin Schwidefsky /* Bad memory access. Check if it is kernel or user space. */
3067d256175SHeiko Carstens if (user_mode(regs)) {
30750d7280dSMartin Schwidefsky /* User mode accesses just cause a SIGSEGV */
30850d7280dSMartin Schwidefsky si_code = (fault == VM_FAULT_BADMAP) ?
30950d7280dSMartin Schwidefsky SEGV_MAPERR : SEGV_ACCERR;
310aa33c8cbSMartin Schwidefsky do_sigsegv(regs, si_code);
31157d7f939SMartin Schwidefsky break;
31250d7280dSMartin Schwidefsky }
3132c7749b9SJoe Perches fallthrough;
31450d7280dSMartin Schwidefsky case VM_FAULT_BADCONTEXT:
31524eb3a82SDominik Dingel case VM_FAULT_PFAULT:
316d9c2cf67SHeiko Carstens do_no_context(regs, fault);
31750d7280dSMartin Schwidefsky break;
318f2c76e3bSHeiko Carstens case VM_FAULT_SIGNAL:
319f2c76e3bSHeiko Carstens if (!user_mode(regs))
320d9c2cf67SHeiko Carstens do_no_context(regs, fault);
321f2c76e3bSHeiko Carstens break;
32250d7280dSMartin Schwidefsky default: /* fault & VM_FAULT_ERROR */
32399583181SHeiko Carstens if (fault & VM_FAULT_OOM) {
3247d256175SHeiko Carstens if (!user_mode(regs))
325d9c2cf67SHeiko Carstens do_no_context(regs, fault);
32699583181SHeiko Carstens else
32750d7280dSMartin Schwidefsky pagefault_out_of_memory();
32833692f27SLinus Torvalds } else if (fault & VM_FAULT_SIGSEGV) {
32933692f27SLinus Torvalds /* Kernel mode? Handle exceptions or die */
33033692f27SLinus Torvalds if (!user_mode(regs))
331d9c2cf67SHeiko Carstens do_no_context(regs, fault);
33233692f27SLinus Torvalds else
33333692f27SLinus Torvalds do_sigsegv(regs, SEGV_MAPERR);
334*73a9260bSGerald Schaefer } else if (fault & (VM_FAULT_SIGBUS | VM_FAULT_HWPOISON)) {
33550d7280dSMartin Schwidefsky /* Kernel mode? Handle exceptions or die */
3367d256175SHeiko Carstens if (!user_mode(regs))
337d9c2cf67SHeiko Carstens do_no_context(regs, fault);
33836bf9680SMartin Schwidefsky else
339aa33c8cbSMartin Schwidefsky do_sigbus(regs);
340*73a9260bSGerald Schaefer } else {
341*73a9260bSGerald Schaefer pr_emerg("Unexpected fault flags: %08x\n", fault);
34250d7280dSMartin Schwidefsky BUG();
343*73a9260bSGerald Schaefer }
34450d7280dSMartin Schwidefsky break;
34550d7280dSMartin Schwidefsky }
34650d7280dSMartin Schwidefsky }
34750d7280dSMartin Schwidefsky
3481da177e4SLinus Torvalds /*
3491da177e4SLinus Torvalds * This routine handles page faults. It determines the address,
3501da177e4SLinus Torvalds * and the problem, and then passes it off to one of the appropriate
3511da177e4SLinus Torvalds * routines.
3521da177e4SLinus Torvalds *
35350d7280dSMartin Schwidefsky * interruption code (int_code):
3547904aaa8SHeiko Carstens * 04 Protection -> Write-Protection (suppression)
3551da177e4SLinus Torvalds * 10 Segment translation -> Not present (nullification)
3561da177e4SLinus Torvalds * 11 Page translation -> Not present (nullification)
3571da177e4SLinus Torvalds * 3b Region third trans. -> Not present (nullification)
3581da177e4SLinus Torvalds */
do_exception(struct pt_regs * regs,int access)35950a7ca3cSSouptick Joarder static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
3601da177e4SLinus Torvalds {
36124eb3a82SDominik Dingel struct gmap *gmap;
3621da177e4SLinus Torvalds struct task_struct *tsk;
3631da177e4SLinus Torvalds struct mm_struct *mm;
3641da177e4SLinus Torvalds struct vm_area_struct *vma;
3650aaba41bSMartin Schwidefsky enum fault_type type;
3661da177e4SLinus Torvalds unsigned long address;
36733ce6140SHeiko Carstens unsigned int flags;
36850a7ca3cSSouptick Joarder vm_fault_t fault;
369e41ba111SSven Schnelle bool is_write;
37010c1031fSMartin Schwidefsky
37139efd4ecSMartin Schwidefsky tsk = current;
37239efd4ecSMartin Schwidefsky /*
37339efd4ecSMartin Schwidefsky * The instruction that caused the program check has
37439efd4ecSMartin Schwidefsky * been nullified. Don't signal single step via SIGTRAP.
37539efd4ecSMartin Schwidefsky */
37656e62a73SSven Schnelle clear_thread_flag(TIF_PER_TRAP);
37739efd4ecSMartin Schwidefsky
378b98cca44SAnshuman Khandual if (kprobe_page_fault(regs, 14))
37950d7280dSMartin Schwidefsky return 0;
3801da177e4SLinus Torvalds
3811da177e4SLinus Torvalds mm = tsk->mm;
382d9c2cf67SHeiko Carstens address = get_fault_address(regs);
383d9c2cf67SHeiko Carstens is_write = fault_is_write(regs);
3841da177e4SLinus Torvalds
3851da177e4SLinus Torvalds /*
3861da177e4SLinus Torvalds * Verify that the fault happened in user space, that
3871da177e4SLinus Torvalds * we are not in an interrupt and that there is a
3881da177e4SLinus Torvalds * user context.
3891da177e4SLinus Torvalds */
39050d7280dSMartin Schwidefsky fault = VM_FAULT_BADCONTEXT;
3910aaba41bSMartin Schwidefsky type = get_fault_type(regs);
3920aaba41bSMartin Schwidefsky switch (type) {
3930aaba41bSMartin Schwidefsky case KERNEL_FAULT:
39450d7280dSMartin Schwidefsky goto out;
3950aaba41bSMartin Schwidefsky case USER_FAULT:
3960aaba41bSMartin Schwidefsky case GMAP_FAULT:
3970aaba41bSMartin Schwidefsky if (faulthandler_disabled() || !mm)
3980aaba41bSMartin Schwidefsky goto out;
3990aaba41bSMartin Schwidefsky break;
4000aaba41bSMartin Schwidefsky }
4011da177e4SLinus Torvalds
402a8b0ca17SPeter Zijlstra perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
403dde16072SPeter Xu flags = FAULT_FLAG_DEFAULT;
404759496baSJohannes Weiner if (user_mode(regs))
405759496baSJohannes Weiner flags |= FAULT_FLAG_USER;
40641ac42f1SGerald Schaefer if (is_write)
40741ac42f1SGerald Schaefer access = VM_WRITE;
40841ac42f1SGerald Schaefer if (access == VM_WRITE)
40933ce6140SHeiko Carstens flags |= FAULT_FLAG_WRITE;
410e06f47a1SHeiko Carstens if (!(flags & FAULT_FLAG_USER))
411e06f47a1SHeiko Carstens goto lock_mmap;
412e06f47a1SHeiko Carstens vma = lock_vma_under_rcu(mm, address);
413e06f47a1SHeiko Carstens if (!vma)
414e06f47a1SHeiko Carstens goto lock_mmap;
415e06f47a1SHeiko Carstens if (!(vma->vm_flags & access)) {
416e06f47a1SHeiko Carstens vma_end_read(vma);
417e06f47a1SHeiko Carstens goto lock_mmap;
418e06f47a1SHeiko Carstens }
419e06f47a1SHeiko Carstens fault = handle_mm_fault(vma, address, flags | FAULT_FLAG_VMA_LOCK, regs);
4204089eef0SSuren Baghdasaryan if (!(fault & (VM_FAULT_RETRY | VM_FAULT_COMPLETED)))
421e06f47a1SHeiko Carstens vma_end_read(vma);
422e06f47a1SHeiko Carstens if (!(fault & VM_FAULT_RETRY)) {
423e06f47a1SHeiko Carstens count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
4247686762dSSven Schnelle if (likely(!(fault & VM_FAULT_ERROR)))
4257686762dSSven Schnelle fault = 0;
426e06f47a1SHeiko Carstens goto out;
427e06f47a1SHeiko Carstens }
428e06f47a1SHeiko Carstens count_vm_vma_lock_event(VMA_LOCK_RETRY);
429e06f47a1SHeiko Carstens /* Quick path to respond to signals */
430e06f47a1SHeiko Carstens if (fault_signal_pending(fault, regs)) {
431e06f47a1SHeiko Carstens fault = VM_FAULT_SIGNAL;
432e06f47a1SHeiko Carstens goto out;
433e06f47a1SHeiko Carstens }
434e06f47a1SHeiko Carstens lock_mmap:
435d8ed45c5SMichel Lespinasse mmap_read_lock(mm);
4361da177e4SLinus Torvalds
4370aaba41bSMartin Schwidefsky gmap = NULL;
4380aaba41bSMartin Schwidefsky if (IS_ENABLED(CONFIG_PGSTE) && type == GMAP_FAULT) {
4390aaba41bSMartin Schwidefsky gmap = (struct gmap *) S390_lowcore.gmap;
440527e30b4SMartin Schwidefsky current->thread.gmap_addr = address;
4414be130a0SMartin Schwidefsky current->thread.gmap_write_flag = !!(flags & FAULT_FLAG_WRITE);
4424a494439SDavid Hildenbrand current->thread.gmap_int_code = regs->int_code & 0xffff;
443527e30b4SMartin Schwidefsky address = __gmap_translate(gmap, address);
444e5992f2eSMartin Schwidefsky if (address == -EFAULT) {
445e5992f2eSMartin Schwidefsky fault = VM_FAULT_BADMAP;
446e5992f2eSMartin Schwidefsky goto out_up;
447e5992f2eSMartin Schwidefsky }
44824eb3a82SDominik Dingel if (gmap->pfault_enabled)
44924eb3a82SDominik Dingel flags |= FAULT_FLAG_RETRY_NOWAIT;
450e5992f2eSMartin Schwidefsky }
451e5992f2eSMartin Schwidefsky
452e5992f2eSMartin Schwidefsky retry:
45350d7280dSMartin Schwidefsky fault = VM_FAULT_BADMAP;
4541da177e4SLinus Torvalds vma = find_vma(mm, address);
4551da177e4SLinus Torvalds if (!vma)
45650d7280dSMartin Schwidefsky goto out_up;
457c1821c2eSGerald Schaefer
45850d7280dSMartin Schwidefsky if (unlikely(vma->vm_start > address)) {
4591da177e4SLinus Torvalds if (!(vma->vm_flags & VM_GROWSDOWN))
46050d7280dSMartin Schwidefsky goto out_up;
4618d7071afSLinus Torvalds vma = expand_stack(mm, address);
4628d7071afSLinus Torvalds if (!vma)
4638d7071afSLinus Torvalds goto out;
46450d7280dSMartin Schwidefsky }
46550d7280dSMartin Schwidefsky
4661da177e4SLinus Torvalds /*
4671da177e4SLinus Torvalds * Ok, we have a good vm_area for this memory access, so
4681da177e4SLinus Torvalds * we can handle it..
4691da177e4SLinus Torvalds */
47050d7280dSMartin Schwidefsky fault = VM_FAULT_BADACCESS;
4711ab947deSMartin Schwidefsky if (unlikely(!(vma->vm_flags & access)))
47250d7280dSMartin Schwidefsky goto out_up;
4731da177e4SLinus Torvalds
4741da177e4SLinus Torvalds /*
4751da177e4SLinus Torvalds * If for any reason at all we couldn't handle the fault,
4761da177e4SLinus Torvalds * make sure we exit gracefully rather than endlessly redo
4771da177e4SLinus Torvalds * the fault.
4781da177e4SLinus Torvalds */
47935e45f3eSPeter Xu fault = handle_mm_fault(vma, address, flags, regs);
4804ef87322SPeter Xu if (fault_signal_pending(fault, regs)) {
481f2c76e3bSHeiko Carstens fault = VM_FAULT_SIGNAL;
482306d6c49SClaudio Imbrenda if (flags & FAULT_FLAG_RETRY_NOWAIT)
483306d6c49SClaudio Imbrenda goto out_up;
484f2c76e3bSHeiko Carstens goto out;
485f2c76e3bSHeiko Carstens }
486d9272525SPeter Xu
487d9272525SPeter Xu /* The fault is fully completed (including releasing mmap lock) */
488d9272525SPeter Xu if (fault & VM_FAULT_COMPLETED) {
489d9272525SPeter Xu if (gmap) {
490d9272525SPeter Xu mmap_read_lock(mm);
491d9272525SPeter Xu goto out_gmap;
492d9272525SPeter Xu }
493d9272525SPeter Xu fault = 0;
494d9272525SPeter Xu goto out;
495d9272525SPeter Xu }
496d9272525SPeter Xu
49750d7280dSMartin Schwidefsky if (unlikely(fault & VM_FAULT_ERROR))
49850d7280dSMartin Schwidefsky goto out_up;
49950d7280dSMartin Schwidefsky
50033ce6140SHeiko Carstens if (fault & VM_FAULT_RETRY) {
5010aaba41bSMartin Schwidefsky if (IS_ENABLED(CONFIG_PGSTE) && gmap &&
5020aaba41bSMartin Schwidefsky (flags & FAULT_FLAG_RETRY_NOWAIT)) {
50336ef159fSQi Zheng /*
50436ef159fSQi Zheng * FAULT_FLAG_RETRY_NOWAIT has been set, mmap_lock has
50536ef159fSQi Zheng * not been released
50636ef159fSQi Zheng */
50724eb3a82SDominik Dingel current->thread.gmap_pfault = 1;
50824eb3a82SDominik Dingel fault = VM_FAULT_PFAULT;
50924eb3a82SDominik Dingel goto out_up;
51024eb3a82SDominik Dingel }
5114064b982SPeter Xu flags &= ~FAULT_FLAG_RETRY_NOWAIT;
51245cac65bSShaohua Li flags |= FAULT_FLAG_TRIED;
513d8ed45c5SMichel Lespinasse mmap_read_lock(mm);
51433ce6140SHeiko Carstens goto retry;
51533ce6140SHeiko Carstens }
516d9272525SPeter Xu out_gmap:
5170aaba41bSMartin Schwidefsky if (IS_ENABLED(CONFIG_PGSTE) && gmap) {
518527e30b4SMartin Schwidefsky address = __gmap_link(gmap, current->thread.gmap_addr,
519527e30b4SMartin Schwidefsky address);
520527e30b4SMartin Schwidefsky if (address == -EFAULT) {
521527e30b4SMartin Schwidefsky fault = VM_FAULT_BADMAP;
522527e30b4SMartin Schwidefsky goto out_up;
523527e30b4SMartin Schwidefsky }
524527e30b4SMartin Schwidefsky if (address == -ENOMEM) {
525527e30b4SMartin Schwidefsky fault = VM_FAULT_OOM;
526527e30b4SMartin Schwidefsky goto out_up;
527527e30b4SMartin Schwidefsky }
528527e30b4SMartin Schwidefsky }
52950d7280dSMartin Schwidefsky fault = 0;
53050d7280dSMartin Schwidefsky out_up:
531d8ed45c5SMichel Lespinasse mmap_read_unlock(mm);
53250d7280dSMartin Schwidefsky out:
53350d7280dSMartin Schwidefsky return fault;
5341da177e4SLinus Torvalds }
5351da177e4SLinus Torvalds
do_protection_exception(struct pt_regs * regs)5367a5388deSHeiko Carstens void do_protection_exception(struct pt_regs *regs)
5371da177e4SLinus Torvalds {
538aa33c8cbSMartin Schwidefsky unsigned long trans_exc_code;
53950a7ca3cSSouptick Joarder int access;
54050a7ca3cSSouptick Joarder vm_fault_t fault;
54161365e13SMartin Schwidefsky
542aa33c8cbSMartin Schwidefsky trans_exc_code = regs->int_parm_long;
543f752ac4dSMartin Schwidefsky /*
544f752ac4dSMartin Schwidefsky * Protection exceptions are suppressing, decrement psw address.
545f752ac4dSMartin Schwidefsky * The exception to this rule are aborted transactions, for these
546f752ac4dSMartin Schwidefsky * the PSW already points to the correct location.
547f752ac4dSMartin Schwidefsky */
548f752ac4dSMartin Schwidefsky if (!(regs->int_code & 0x200))
549aa33c8cbSMartin Schwidefsky regs->psw.addr = __rewind_psw(regs->psw, regs->int_code >> 16);
55010c1031fSMartin Schwidefsky /*
55110c1031fSMartin Schwidefsky * Check for low-address protection. This needs to be treated
55210c1031fSMartin Schwidefsky * as a special case because the translation exception code
55310c1031fSMartin Schwidefsky * field is not guaranteed to contain valid data in this case.
55410c1031fSMartin Schwidefsky */
55561365e13SMartin Schwidefsky if (unlikely(!(trans_exc_code & 4))) {
556aa33c8cbSMartin Schwidefsky do_low_address(regs);
55710c1031fSMartin Schwidefsky return;
55810c1031fSMartin Schwidefsky }
55957d7f939SMartin Schwidefsky if (unlikely(MACHINE_HAS_NX && (trans_exc_code & 0x80))) {
56057d7f939SMartin Schwidefsky regs->int_parm_long = (trans_exc_code & ~PAGE_MASK) |
56157d7f939SMartin Schwidefsky (regs->psw.addr & PAGE_MASK);
56257d7f939SMartin Schwidefsky access = VM_EXEC;
56357d7f939SMartin Schwidefsky fault = VM_FAULT_BADACCESS;
56457d7f939SMartin Schwidefsky } else {
56557d7f939SMartin Schwidefsky access = VM_WRITE;
56657d7f939SMartin Schwidefsky fault = do_exception(regs, access);
56757d7f939SMartin Schwidefsky }
56850d7280dSMartin Schwidefsky if (unlikely(fault))
569bf2ce385SHeiko Carstens do_fault_error(regs, fault);
5701da177e4SLinus Torvalds }
5717a5388deSHeiko Carstens NOKPROBE_SYMBOL(do_protection_exception);
5721da177e4SLinus Torvalds
do_dat_exception(struct pt_regs * regs)5737a5388deSHeiko Carstens void do_dat_exception(struct pt_regs *regs)
5741da177e4SLinus Torvalds {
57550a7ca3cSSouptick Joarder int access;
57650a7ca3cSSouptick Joarder vm_fault_t fault;
57750d7280dSMartin Schwidefsky
5786cb4d9a2SAnshuman Khandual access = VM_ACCESS_FLAGS;
579aa33c8cbSMartin Schwidefsky fault = do_exception(regs, access);
58050d7280dSMartin Schwidefsky if (unlikely(fault))
581bf2ce385SHeiko Carstens do_fault_error(regs, fault);
5821da177e4SLinus Torvalds }
5837a5388deSHeiko Carstens NOKPROBE_SYMBOL(do_dat_exception);
5841da177e4SLinus Torvalds
585084ea4d6SVasily Gorbik #if IS_ENABLED(CONFIG_PGSTE)
58617a363dcSHeiko Carstens
do_secure_storage_access(struct pt_regs * regs)587084ea4d6SVasily Gorbik void do_secure_storage_access(struct pt_regs *regs)
588084ea4d6SVasily Gorbik {
589084ea4d6SVasily Gorbik unsigned long addr = regs->int_parm_long & __FAIL_ADDR_MASK;
590084ea4d6SVasily Gorbik struct vm_area_struct *vma;
591084ea4d6SVasily Gorbik struct mm_struct *mm;
592084ea4d6SVasily Gorbik struct page *page;
593b108f7f0SClaudio Imbrenda struct gmap *gmap;
594084ea4d6SVasily Gorbik int rc;
595084ea4d6SVasily Gorbik
59685b18d7bSJanosch Frank /*
59785b18d7bSJanosch Frank * bit 61 tells us if the address is valid, if it's not we
59885b18d7bSJanosch Frank * have a major problem and should stop the kernel or send a
59985b18d7bSJanosch Frank * SIGSEGV to the process. Unfortunately bit 61 is not
60085b18d7bSJanosch Frank * reliable without the misc UV feature so we need to check
60185b18d7bSJanosch Frank * for that as well.
60285b18d7bSJanosch Frank */
60359a88140SSteffen Eiden if (uv_has_feature(BIT_UV_FEAT_MISC) &&
60485b18d7bSJanosch Frank !test_bit_inv(61, ®s->int_parm_long)) {
60585b18d7bSJanosch Frank /*
60685b18d7bSJanosch Frank * When this happens, userspace did something that it
60785b18d7bSJanosch Frank * was not supposed to do, e.g. branching into secure
60885b18d7bSJanosch Frank * memory. Trigger a segmentation fault.
60985b18d7bSJanosch Frank */
61085b18d7bSJanosch Frank if (user_mode(regs)) {
61185b18d7bSJanosch Frank send_sig(SIGSEGV, current, 0);
61285b18d7bSJanosch Frank return;
61385b18d7bSJanosch Frank }
61485b18d7bSJanosch Frank
61585b18d7bSJanosch Frank /*
61685b18d7bSJanosch Frank * The kernel should never run into this case and we
61785b18d7bSJanosch Frank * have no way out of this situation.
61885b18d7bSJanosch Frank */
61985b18d7bSJanosch Frank panic("Unexpected PGM 0x3d with TEID bit 61=0");
62085b18d7bSJanosch Frank }
62185b18d7bSJanosch Frank
622084ea4d6SVasily Gorbik switch (get_fault_type(regs)) {
623b108f7f0SClaudio Imbrenda case GMAP_FAULT:
624b108f7f0SClaudio Imbrenda mm = current->mm;
625b108f7f0SClaudio Imbrenda gmap = (struct gmap *)S390_lowcore.gmap;
626b108f7f0SClaudio Imbrenda mmap_read_lock(mm);
627b108f7f0SClaudio Imbrenda addr = __gmap_translate(gmap, addr);
628b108f7f0SClaudio Imbrenda mmap_read_unlock(mm);
629b108f7f0SClaudio Imbrenda if (IS_ERR_VALUE(addr)) {
630bf2ce385SHeiko Carstens do_fault_error(regs, VM_FAULT_BADMAP);
631b108f7f0SClaudio Imbrenda break;
632b108f7f0SClaudio Imbrenda }
633b108f7f0SClaudio Imbrenda fallthrough;
634084ea4d6SVasily Gorbik case USER_FAULT:
635084ea4d6SVasily Gorbik mm = current->mm;
636d8ed45c5SMichel Lespinasse mmap_read_lock(mm);
637084ea4d6SVasily Gorbik vma = find_vma(mm, addr);
638084ea4d6SVasily Gorbik if (!vma) {
639d8ed45c5SMichel Lespinasse mmap_read_unlock(mm);
640bf2ce385SHeiko Carstens do_fault_error(regs, VM_FAULT_BADMAP);
641084ea4d6SVasily Gorbik break;
642084ea4d6SVasily Gorbik }
643084ea4d6SVasily Gorbik page = follow_page(vma, addr, FOLL_WRITE | FOLL_GET);
644084ea4d6SVasily Gorbik if (IS_ERR_OR_NULL(page)) {
645d8ed45c5SMichel Lespinasse mmap_read_unlock(mm);
646084ea4d6SVasily Gorbik break;
647084ea4d6SVasily Gorbik }
648084ea4d6SVasily Gorbik if (arch_make_page_accessible(page))
649084ea4d6SVasily Gorbik send_sig(SIGSEGV, current, 0);
650084ea4d6SVasily Gorbik put_page(page);
651d8ed45c5SMichel Lespinasse mmap_read_unlock(mm);
652084ea4d6SVasily Gorbik break;
653084ea4d6SVasily Gorbik case KERNEL_FAULT:
654084ea4d6SVasily Gorbik page = phys_to_page(addr);
655cd1adf1bSLinus Torvalds if (unlikely(!try_get_page(page)))
656084ea4d6SVasily Gorbik break;
657084ea4d6SVasily Gorbik rc = arch_make_page_accessible(page);
658084ea4d6SVasily Gorbik put_page(page);
659084ea4d6SVasily Gorbik if (rc)
660084ea4d6SVasily Gorbik BUG();
661084ea4d6SVasily Gorbik break;
662084ea4d6SVasily Gorbik default:
663bf2ce385SHeiko Carstens do_fault_error(regs, VM_FAULT_BADMAP);
664084ea4d6SVasily Gorbik WARN_ON_ONCE(1);
665084ea4d6SVasily Gorbik }
666084ea4d6SVasily Gorbik }
667084ea4d6SVasily Gorbik NOKPROBE_SYMBOL(do_secure_storage_access);
668084ea4d6SVasily Gorbik
do_non_secure_storage_access(struct pt_regs * regs)669084ea4d6SVasily Gorbik void do_non_secure_storage_access(struct pt_regs *regs)
670084ea4d6SVasily Gorbik {
671084ea4d6SVasily Gorbik unsigned long gaddr = regs->int_parm_long & __FAIL_ADDR_MASK;
672084ea4d6SVasily Gorbik struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
673084ea4d6SVasily Gorbik
674084ea4d6SVasily Gorbik if (get_fault_type(regs) != GMAP_FAULT) {
675bf2ce385SHeiko Carstens do_fault_error(regs, VM_FAULT_BADMAP);
676084ea4d6SVasily Gorbik WARN_ON_ONCE(1);
677084ea4d6SVasily Gorbik return;
678084ea4d6SVasily Gorbik }
679084ea4d6SVasily Gorbik
680084ea4d6SVasily Gorbik if (gmap_convert_to_secure(gmap, gaddr) == -EINVAL)
681084ea4d6SVasily Gorbik send_sig(SIGSEGV, current, 0);
682084ea4d6SVasily Gorbik }
683084ea4d6SVasily Gorbik NOKPROBE_SYMBOL(do_non_secure_storage_access);
684084ea4d6SVasily Gorbik
do_secure_storage_violation(struct pt_regs * regs)685cd4d3d5fSJanosch Frank void do_secure_storage_violation(struct pt_regs *regs)
686cd4d3d5fSJanosch Frank {
687a52c2584SClaudio Imbrenda unsigned long gaddr = regs->int_parm_long & __FAIL_ADDR_MASK;
688a52c2584SClaudio Imbrenda struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
689a52c2584SClaudio Imbrenda
690a52c2584SClaudio Imbrenda /*
691a52c2584SClaudio Imbrenda * If the VM has been rebooted, its address space might still contain
692a52c2584SClaudio Imbrenda * secure pages from the previous boot.
693a52c2584SClaudio Imbrenda * Clear the page so it can be reused.
694a52c2584SClaudio Imbrenda */
695a52c2584SClaudio Imbrenda if (!gmap_destroy_page(gmap, gaddr))
696a52c2584SClaudio Imbrenda return;
697cd4d3d5fSJanosch Frank /*
698cd4d3d5fSJanosch Frank * Either KVM messed up the secure guest mapping or the same
699cd4d3d5fSJanosch Frank * page is mapped into multiple secure guests.
700cd4d3d5fSJanosch Frank *
701cd4d3d5fSJanosch Frank * This exception is only triggered when a guest 2 is running
702cd4d3d5fSJanosch Frank * and can therefore never occur in kernel context.
703cd4d3d5fSJanosch Frank */
704cd4d3d5fSJanosch Frank printk_ratelimited(KERN_WARNING
705cd4d3d5fSJanosch Frank "Secure storage violation in task: %s, pid %d\n",
706cd4d3d5fSJanosch Frank current->comm, current->pid);
707cd4d3d5fSJanosch Frank send_sig(SIGSEGV, current, 0);
708cd4d3d5fSJanosch Frank }
709cd4d3d5fSJanosch Frank
71017a363dcSHeiko Carstens #endif /* CONFIG_PGSTE */
711