fault_64.c (5ad18b2e60b75c7297a998dea702451d33a052ed) | fault_64.c (b98cca444d287a63dd96df04af7fb9793567599e) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. 4 * 5 * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net) 6 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) 7 */ 8 --- 24 unchanged lines hidden (view full) --- 33#include <asm/asi.h> 34#include <asm/lsu.h> 35#include <asm/sections.h> 36#include <asm/mmu_context.h> 37#include <asm/setup.h> 38 39int show_unhandled_signals = 1; 40 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. 4 * 5 * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net) 6 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) 7 */ 8 --- 24 unchanged lines hidden (view full) --- 33#include <asm/asi.h> 34#include <asm/lsu.h> 35#include <asm/sections.h> 36#include <asm/mmu_context.h> 37#include <asm/setup.h> 38 39int show_unhandled_signals = 1; 40 |
41static inline __kprobes int notify_page_fault(struct pt_regs *regs) 42{ 43 int ret = 0; 44 45 /* kprobe_running() needs smp_processor_id() */ 46 if (kprobes_built_in() && !user_mode(regs)) { 47 preempt_disable(); 48 if (kprobe_running() && kprobe_fault_handler(regs, 0)) 49 ret = 1; 50 preempt_enable(); 51 } 52 return ret; 53} 54 | |
55static void __kprobes unhandled_fault(unsigned long address, 56 struct task_struct *tsk, 57 struct pt_regs *regs) 58{ 59 if ((unsigned long) address < PAGE_SIZE) { 60 printk(KERN_ALERT "Unable to handle kernel NULL " 61 "pointer dereference\n"); 62 } else { --- 217 unchanged lines hidden (view full) --- 280 unsigned int insn = 0; 281 int si_code, fault_code; 282 vm_fault_t fault; 283 unsigned long address, mm_rss; 284 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; 285 286 fault_code = get_thread_fault_code(); 287 | 41static void __kprobes unhandled_fault(unsigned long address, 42 struct task_struct *tsk, 43 struct pt_regs *regs) 44{ 45 if ((unsigned long) address < PAGE_SIZE) { 46 printk(KERN_ALERT "Unable to handle kernel NULL " 47 "pointer dereference\n"); 48 } else { --- 217 unchanged lines hidden (view full) --- 266 unsigned int insn = 0; 267 int si_code, fault_code; 268 vm_fault_t fault; 269 unsigned long address, mm_rss; 270 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; 271 272 fault_code = get_thread_fault_code(); 273 |
288 if (notify_page_fault(regs)) | 274 if (kprobe_page_fault(regs, 0)) |
289 goto exit_exception; 290 291 si_code = SEGV_MAPERR; 292 address = current_thread_info()->fault_address; 293 294 if ((fault_code & FAULT_CODE_ITLB) && 295 (fault_code & FAULT_CODE_DTLB)) 296 BUG(); --- 244 unchanged lines hidden --- | 275 goto exit_exception; 276 277 si_code = SEGV_MAPERR; 278 address = current_thread_info()->fault_address; 279 280 if ((fault_code & FAULT_CODE_ITLB) && 281 (fault_code & FAULT_CODE_DTLB)) 282 BUG(); --- 244 unchanged lines hidden --- |