diff options
Diffstat (limited to 'arch/arm64/mm/fault.c')
-rw-r--r-- | arch/arm64/mm/fault.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 05d2bd776c69..53d9159662fe 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/extable.h> |
22 | #include <linux/signal.h> | 22 | #include <linux/signal.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/hardirq.h> | 24 | #include <linux/hardirq.h> |
@@ -251,8 +251,7 @@ static int __do_page_fault(struct mm_struct *mm, unsigned long addr, | |||
251 | good_area: | 251 | good_area: |
252 | /* | 252 | /* |
253 | * Check that the permissions on the VMA allow for the fault which | 253 | * Check that the permissions on the VMA allow for the fault which |
254 | * occurred. If we encountered a write or exec fault, we must have | 254 | * occurred. |
255 | * appropriate permissions, otherwise we allow any permission. | ||
256 | */ | 255 | */ |
257 | if (!(vma->vm_flags & vm_flags)) { | 256 | if (!(vma->vm_flags & vm_flags)) { |
258 | fault = VM_FAULT_BADACCESS; | 257 | fault = VM_FAULT_BADACCESS; |
@@ -288,7 +287,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, | |||
288 | struct task_struct *tsk; | 287 | struct task_struct *tsk; |
289 | struct mm_struct *mm; | 288 | struct mm_struct *mm; |
290 | int fault, sig, code; | 289 | int fault, sig, code; |
291 | unsigned long vm_flags = VM_READ | VM_WRITE | VM_EXEC; | 290 | unsigned long vm_flags = VM_READ | VM_WRITE; |
292 | unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | 291 | unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; |
293 | 292 | ||
294 | if (notify_page_fault(regs, esr)) | 293 | if (notify_page_fault(regs, esr)) |