trap.c (1aa77e716c6f2332f2d4664f747ff4eba731825b) | trap.c (36ef159f4408b08eae7f2af6d62bedd3f4343758) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#include <linux/mm.h> 7#include <linux/sched/signal.h> 8#include <linux/hardirq.h> --- 73 unchanged lines hidden (view full) --- 82 } else if (fault & VM_FAULT_SIGSEGV) { 83 goto out; 84 } else if (fault & VM_FAULT_SIGBUS) { 85 err = -EACCES; 86 goto out; 87 } 88 BUG(); 89 } | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#include <linux/mm.h> 7#include <linux/sched/signal.h> 8#include <linux/hardirq.h> --- 73 unchanged lines hidden (view full) --- 82 } else if (fault & VM_FAULT_SIGSEGV) { 83 goto out; 84 } else if (fault & VM_FAULT_SIGBUS) { 85 err = -EACCES; 86 goto out; 87 } 88 BUG(); 89 } |
90 if (flags & FAULT_FLAG_ALLOW_RETRY) { 91 if (fault & VM_FAULT_RETRY) { 92 flags |= FAULT_FLAG_TRIED; | 90 if (fault & VM_FAULT_RETRY) { 91 flags |= FAULT_FLAG_TRIED; |
93 | 92 |
94 goto retry; 95 } | 93 goto retry; |
96 } 97 98 pmd = pmd_off(mm, address); 99 pte = pte_offset_kernel(pmd, address); 100 } while (!pte_present(*pte)); 101 err = 0; 102 /* 103 * The below warning was added in place of --- 18 unchanged lines hidden (view full) --- 122 * (which will retry the fault, or kill us if we got oom-killed). 123 */ 124 mmap_read_unlock(mm); 125 if (!is_user) 126 goto out_nosemaphore; 127 pagefault_out_of_memory(); 128 return 0; 129} | 94 } 95 96 pmd = pmd_off(mm, address); 97 pte = pte_offset_kernel(pmd, address); 98 } while (!pte_present(*pte)); 99 err = 0; 100 /* 101 * The below warning was added in place of --- 18 unchanged lines hidden (view full) --- 120 * (which will retry the fault, or kill us if we got oom-killed). 121 */ 122 mmap_read_unlock(mm); 123 if (!is_user) 124 goto out_nosemaphore; 125 pagefault_out_of_memory(); 126 return 0; 127} |
128EXPORT_SYMBOL(handle_page_fault); |
|
130 131static void show_segv_info(struct uml_pt_regs *regs) 132{ 133 struct task_struct *tsk = current; 134 struct faultinfo *fi = UPT_FAULTINFO(regs); 135 136 if (!unhandled_signal(tsk, SIGSEGV)) 137 return; --- 175 unchanged lines hidden --- | 129 130static void show_segv_info(struct uml_pt_regs *regs) 131{ 132 struct task_struct *tsk = current; 133 struct faultinfo *fi = UPT_FAULTINFO(regs); 134 135 if (!unhandled_signal(tsk, SIGSEGV)) 136 return; --- 175 unchanged lines hidden --- |