fault.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. /*
  2. * PowerPC version
  3. * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  4. *
  5. * Derived from "arch/i386/mm/fault.c"
  6. * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
  7. *
  8. * Modified by Cort Dougan and Paul Mackerras.
  9. *
  10. * Modified for PPC64 by Dave Engebretsen (engebret@ibm.com)
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License
  14. * as published by the Free Software Foundation; either version
  15. * 2 of the License, or (at your option) any later version.
  16. */
  17. #include <linux/signal.h>
  18. #include <linux/sched.h>
  19. #include <linux/sched/task_stack.h>
  20. #include <linux/kernel.h>
  21. #include <linux/errno.h>
  22. #include <linux/string.h>
  23. #include <linux/types.h>
  24. #include <linux/ptrace.h>
  25. #include <linux/mman.h>
  26. #include <linux/mm.h>
  27. #include <linux/interrupt.h>
  28. #include <linux/highmem.h>
  29. #include <linux/extable.h>
  30. #include <linux/kprobes.h>
  31. #include <linux/kdebug.h>
  32. #include <linux/perf_event.h>
  33. #include <linux/ratelimit.h>
  34. #include <linux/context_tracking.h>
  35. #include <linux/hugetlb.h>
  36. #include <linux/uaccess.h>
  37. #include <asm/firmware.h>
  38. #include <asm/page.h>
  39. #include <asm/pgtable.h>
  40. #include <asm/mmu.h>
  41. #include <asm/mmu_context.h>
  42. #include <asm/tlbflush.h>
  43. #include <asm/siginfo.h>
  44. #include <asm/debug.h>
  45. static inline bool notify_page_fault(struct pt_regs *regs)
  46. {
  47. bool ret = false;
  48. #ifdef CONFIG_KPROBES
  49. /* kprobe_running() needs smp_processor_id() */
  50. if (!user_mode(regs)) {
  51. preempt_disable();
  52. if (kprobe_running() && kprobe_fault_handler(regs, 11))
  53. ret = true;
  54. preempt_enable();
  55. }
  56. #endif /* CONFIG_KPROBES */
  57. if (unlikely(debugger_fault_handler(regs)))
  58. ret = true;
  59. return ret;
  60. }
  61. /*
  62. * Check whether the instruction at regs->nip is a store using
  63. * an update addressing form which will update r1.
  64. */
  65. static bool store_updates_sp(struct pt_regs *regs)
  66. {
  67. unsigned int inst;
  68. if (get_user(inst, (unsigned int __user *)regs->nip))
  69. return false;
  70. /* check for 1 in the rA field */
  71. if (((inst >> 16) & 0x1f) != 1)
  72. return false;
  73. /* check major opcode */
  74. switch (inst >> 26) {
  75. case 37: /* stwu */
  76. case 39: /* stbu */
  77. case 45: /* sthu */
  78. case 53: /* stfsu */
  79. case 55: /* stfdu */
  80. return true;
  81. case 62: /* std or stdu */
  82. return (inst & 3) == 1;
  83. case 31:
  84. /* check minor opcode */
  85. switch ((inst >> 1) & 0x3ff) {
  86. case 181: /* stdux */
  87. case 183: /* stwux */
  88. case 247: /* stbux */
  89. case 439: /* sthux */
  90. case 695: /* stfsux */
  91. case 759: /* stfdux */
  92. return true;
  93. }
  94. }
  95. return false;
  96. }
  97. /*
  98. * do_page_fault error handling helpers
  99. */
  100. static int
  101. __bad_area_nosemaphore(struct pt_regs *regs, unsigned long address, int si_code,
  102. int pkey)
  103. {
  104. /*
  105. * If we are in kernel mode, bail out with a SEGV, this will
  106. * be caught by the assembly which will restore the non-volatile
  107. * registers before calling bad_page_fault()
  108. */
  109. if (!user_mode(regs))
  110. return SIGSEGV;
  111. _exception_pkey(SIGSEGV, regs, si_code, address, pkey);
  112. return 0;
  113. }
  114. static noinline int bad_area_nosemaphore(struct pt_regs *regs, unsigned long address)
  115. {
  116. return __bad_area_nosemaphore(regs, address, SEGV_MAPERR, 0);
  117. }
  118. static int __bad_area(struct pt_regs *regs, unsigned long address, int si_code,
  119. int pkey)
  120. {
  121. struct mm_struct *mm = current->mm;
  122. /*
  123. * Something tried to access memory that isn't in our memory map..
  124. * Fix it, but check if it's kernel or user first..
  125. */
  126. up_read(&mm->mmap_sem);
  127. return __bad_area_nosemaphore(regs, address, si_code, pkey);
  128. }
  129. static noinline int bad_area(struct pt_regs *regs, unsigned long address)
  130. {
  131. return __bad_area(regs, address, SEGV_MAPERR, 0);
  132. }
  133. static int bad_key_fault_exception(struct pt_regs *regs, unsigned long address,
  134. int pkey)
  135. {
  136. return __bad_area_nosemaphore(regs, address, SEGV_PKUERR, pkey);
  137. }
  138. static noinline int bad_access(struct pt_regs *regs, unsigned long address)
  139. {
  140. return __bad_area(regs, address, SEGV_ACCERR, 0);
  141. }
  142. static int do_sigbus(struct pt_regs *regs, unsigned long address,
  143. unsigned int fault)
  144. {
  145. siginfo_t info;
  146. unsigned int lsb = 0;
  147. if (!user_mode(regs))
  148. return SIGBUS;
  149. current->thread.trap_nr = BUS_ADRERR;
  150. clear_siginfo(&info);
  151. info.si_signo = SIGBUS;
  152. info.si_errno = 0;
  153. info.si_code = BUS_ADRERR;
  154. info.si_addr = (void __user *)address;
  155. #ifdef CONFIG_MEMORY_FAILURE
  156. if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
  157. pr_err("MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n",
  158. current->comm, current->pid, address);
  159. info.si_code = BUS_MCEERR_AR;
  160. }
  161. if (fault & VM_FAULT_HWPOISON_LARGE)
  162. lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
  163. if (fault & VM_FAULT_HWPOISON)
  164. lsb = PAGE_SHIFT;
  165. #endif
  166. info.si_addr_lsb = lsb;
  167. force_sig_info(SIGBUS, &info, current);
  168. return 0;
  169. }
  170. static int mm_fault_error(struct pt_regs *regs, unsigned long addr, int fault)
  171. {
  172. /*
  173. * Kernel page fault interrupted by SIGKILL. We have no reason to
  174. * continue processing.
  175. */
  176. if (fatal_signal_pending(current) && !user_mode(regs))
  177. return SIGKILL;
  178. /* Out of memory */
  179. if (fault & VM_FAULT_OOM) {
  180. /*
  181. * We ran out of memory, or some other thing happened to us that
  182. * made us unable to handle the page fault gracefully.
  183. */
  184. if (!user_mode(regs))
  185. return SIGSEGV;
  186. pagefault_out_of_memory();
  187. } else {
  188. if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
  189. VM_FAULT_HWPOISON_LARGE))
  190. return do_sigbus(regs, addr, fault);
  191. else if (fault & VM_FAULT_SIGSEGV)
  192. return bad_area_nosemaphore(regs, addr);
  193. else
  194. BUG();
  195. }
  196. return 0;
  197. }
  198. /* Is this a bad kernel fault ? */
  199. static bool bad_kernel_fault(bool is_exec, unsigned long error_code,
  200. unsigned long address)
  201. {
  202. if (is_exec && (error_code & (DSISR_NOEXEC_OR_G | DSISR_KEYFAULT))) {
  203. printk_ratelimited(KERN_CRIT "kernel tried to execute"
  204. " exec-protected page (%lx) -"
  205. "exploit attempt? (uid: %d)\n",
  206. address, from_kuid(&init_user_ns,
  207. current_uid()));
  208. }
  209. return is_exec || (address >= TASK_SIZE);
  210. }
  211. static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,
  212. struct vm_area_struct *vma,
  213. bool store_update_sp)
  214. {
  215. /*
  216. * N.B. The POWER/Open ABI allows programs to access up to
  217. * 288 bytes below the stack pointer.
  218. * The kernel signal delivery code writes up to about 1.5kB
  219. * below the stack pointer (r1) before decrementing it.
  220. * The exec code can write slightly over 640kB to the stack
  221. * before setting the user r1. Thus we allow the stack to
  222. * expand to 1MB without further checks.
  223. */
  224. if (address + 0x100000 < vma->vm_end) {
  225. /* get user regs even if this fault is in kernel mode */
  226. struct pt_regs *uregs = current->thread.regs;
  227. if (uregs == NULL)
  228. return true;
  229. /*
  230. * A user-mode access to an address a long way below
  231. * the stack pointer is only valid if the instruction
  232. * is one which would update the stack pointer to the
  233. * address accessed if the instruction completed,
  234. * i.e. either stwu rs,n(r1) or stwux rs,r1,rb
  235. * (or the byte, halfword, float or double forms).
  236. *
  237. * If we don't check this then any write to the area
  238. * between the last mapped region and the stack will
  239. * expand the stack rather than segfaulting.
  240. */
  241. if (address + 2048 < uregs->gpr[1] && !store_update_sp)
  242. return true;
  243. }
  244. return false;
  245. }
  246. static bool access_error(bool is_write, bool is_exec,
  247. struct vm_area_struct *vma)
  248. {
  249. /*
  250. * Allow execution from readable areas if the MMU does not
  251. * provide separate controls over reading and executing.
  252. *
  253. * Note: That code used to not be enabled for 4xx/BookE.
  254. * It is now as I/D cache coherency for these is done at
  255. * set_pte_at() time and I see no reason why the test
  256. * below wouldn't be valid on those processors. This -may-
  257. * break programs compiled with a really old ABI though.
  258. */
  259. if (is_exec) {
  260. return !(vma->vm_flags & VM_EXEC) &&
  261. (cpu_has_feature(CPU_FTR_NOEXECUTE) ||
  262. !(vma->vm_flags & (VM_READ | VM_WRITE)));
  263. }
  264. if (is_write) {
  265. if (unlikely(!(vma->vm_flags & VM_WRITE)))
  266. return true;
  267. return false;
  268. }
  269. if (unlikely(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))))
  270. return true;
  271. /*
  272. * We should ideally do the vma pkey access check here. But in the
  273. * fault path, handle_mm_fault() also does the same check. To avoid
  274. * these multiple checks, we skip it here and handle access error due
  275. * to pkeys later.
  276. */
  277. return false;
  278. }
  279. #ifdef CONFIG_PPC_SMLPAR
  280. static inline void cmo_account_page_fault(void)
  281. {
  282. if (firmware_has_feature(FW_FEATURE_CMO)) {
  283. u32 page_ins;
  284. preempt_disable();
  285. page_ins = be32_to_cpu(get_lppaca()->page_ins);
  286. page_ins += 1 << PAGE_FACTOR;
  287. get_lppaca()->page_ins = cpu_to_be32(page_ins);
  288. preempt_enable();
  289. }
  290. }
  291. #else
  292. static inline void cmo_account_page_fault(void) { }
  293. #endif /* CONFIG_PPC_SMLPAR */
  294. #ifdef CONFIG_PPC_STD_MMU
  295. static void sanity_check_fault(bool is_write, unsigned long error_code)
  296. {
  297. /*
  298. * For hash translation mode, we should never get a
  299. * PROTFAULT. Any update to pte to reduce access will result in us
  300. * removing the hash page table entry, thus resulting in a DSISR_NOHPTE
  301. * fault instead of DSISR_PROTFAULT.
  302. *
  303. * A pte update to relax the access will not result in a hash page table
  304. * entry invalidate and hence can result in DSISR_PROTFAULT.
  305. * ptep_set_access_flags() doesn't do a hpte flush. This is why we have
  306. * the special !is_write in the below conditional.
  307. *
  308. * For platforms that doesn't supports coherent icache and do support
  309. * per page noexec bit, we do setup things such that we do the
  310. * sync between D/I cache via fault. But that is handled via low level
  311. * hash fault code (hash_page_do_lazy_icache()) and we should not reach
  312. * here in such case.
  313. *
  314. * For wrong access that can result in PROTFAULT, the above vma->vm_flags
  315. * check should handle those and hence we should fall to the bad_area
  316. * handling correctly.
  317. *
  318. * For embedded with per page exec support that doesn't support coherent
  319. * icache we do get PROTFAULT and we handle that D/I cache sync in
  320. * set_pte_at while taking the noexec/prot fault. Hence this is WARN_ON
  321. * is conditional for server MMU.
  322. *
  323. * For radix, we can get prot fault for autonuma case, because radix
  324. * page table will have them marked noaccess for user.
  325. */
  326. if (!radix_enabled() && !is_write)
  327. WARN_ON_ONCE(error_code & DSISR_PROTFAULT);
  328. }
  329. #else
  330. static void sanity_check_fault(bool is_write, unsigned long error_code) { }
  331. #endif /* CONFIG_PPC_STD_MMU */
  332. /*
  333. * Define the correct "is_write" bit in error_code based
  334. * on the processor family
  335. */
  336. #if (defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
  337. #define page_fault_is_write(__err) ((__err) & ESR_DST)
  338. #define page_fault_is_bad(__err) (0)
  339. #else
  340. #define page_fault_is_write(__err) ((__err) & DSISR_ISSTORE)
  341. #if defined(CONFIG_PPC_8xx)
  342. #define page_fault_is_bad(__err) ((__err) & DSISR_NOEXEC_OR_G)
  343. #elif defined(CONFIG_PPC64)
  344. #define page_fault_is_bad(__err) ((__err) & DSISR_BAD_FAULT_64S)
  345. #else
  346. #define page_fault_is_bad(__err) ((__err) & DSISR_BAD_FAULT_32S)
  347. #endif
  348. #endif
  349. /*
  350. * For 600- and 800-family processors, the error_code parameter is DSISR
  351. * for a data fault, SRR1 for an instruction fault. For 400-family processors
  352. * the error_code parameter is ESR for a data fault, 0 for an instruction
  353. * fault.
  354. * For 64-bit processors, the error_code parameter is
  355. * - DSISR for a non-SLB data access fault,
  356. * - SRR1 & 0x08000000 for a non-SLB instruction access fault
  357. * - 0 any SLB fault.
  358. *
  359. * The return value is 0 if the fault was handled, or the signal
  360. * number if this is a kernel fault that can't be handled here.
  361. */
  362. static int __do_page_fault(struct pt_regs *regs, unsigned long address,
  363. unsigned long error_code)
  364. {
  365. struct vm_area_struct * vma;
  366. struct mm_struct *mm = current->mm;
  367. unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
  368. int is_exec = TRAP(regs) == 0x400;
  369. int is_user = user_mode(regs);
  370. int is_write = page_fault_is_write(error_code);
  371. int fault, major = 0;
  372. bool store_update_sp = false;
  373. if (notify_page_fault(regs))
  374. return 0;
  375. if (unlikely(page_fault_is_bad(error_code))) {
  376. if (is_user) {
  377. _exception(SIGBUS, regs, BUS_OBJERR, address);
  378. return 0;
  379. }
  380. return SIGBUS;
  381. }
  382. /* Additional sanity check(s) */
  383. sanity_check_fault(is_write, error_code);
  384. /*
  385. * The kernel should never take an execute fault nor should it
  386. * take a page fault to a kernel address.
  387. */
  388. if (unlikely(!is_user && bad_kernel_fault(is_exec, error_code, address)))
  389. return SIGSEGV;
  390. /*
  391. * If we're in an interrupt, have no user context or are running
  392. * in a region with pagefaults disabled then we must not take the fault
  393. */
  394. if (unlikely(faulthandler_disabled() || !mm)) {
  395. if (is_user)
  396. printk_ratelimited(KERN_ERR "Page fault in user mode"
  397. " with faulthandler_disabled()=%d"
  398. " mm=%p\n",
  399. faulthandler_disabled(), mm);
  400. return bad_area_nosemaphore(regs, address);
  401. }
  402. /* We restore the interrupt state now */
  403. if (!arch_irq_disabled_regs(regs))
  404. local_irq_enable();
  405. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
  406. if (error_code & DSISR_KEYFAULT)
  407. return bad_key_fault_exception(regs, address,
  408. get_mm_addr_key(mm, address));
  409. /*
  410. * We want to do this outside mmap_sem, because reading code around nip
  411. * can result in fault, which will cause a deadlock when called with
  412. * mmap_sem held
  413. */
  414. if (is_write && is_user)
  415. store_update_sp = store_updates_sp(regs);
  416. if (is_user)
  417. flags |= FAULT_FLAG_USER;
  418. if (is_write)
  419. flags |= FAULT_FLAG_WRITE;
  420. if (is_exec)
  421. flags |= FAULT_FLAG_INSTRUCTION;
  422. /* When running in the kernel we expect faults to occur only to
  423. * addresses in user space. All other faults represent errors in the
  424. * kernel and should generate an OOPS. Unfortunately, in the case of an
  425. * erroneous fault occurring in a code path which already holds mmap_sem
  426. * we will deadlock attempting to validate the fault against the
  427. * address space. Luckily the kernel only validly references user
  428. * space from well defined areas of code, which are listed in the
  429. * exceptions table.
  430. *
  431. * As the vast majority of faults will be valid we will only perform
  432. * the source reference check when there is a possibility of a deadlock.
  433. * Attempt to lock the address space, if we cannot we then validate the
  434. * source. If this is invalid we can skip the address space check,
  435. * thus avoiding the deadlock.
  436. */
  437. if (unlikely(!down_read_trylock(&mm->mmap_sem))) {
  438. if (!is_user && !search_exception_tables(regs->nip))
  439. return bad_area_nosemaphore(regs, address);
  440. retry:
  441. down_read(&mm->mmap_sem);
  442. } else {
  443. /*
  444. * The above down_read_trylock() might have succeeded in
  445. * which case we'll have missed the might_sleep() from
  446. * down_read():
  447. */
  448. might_sleep();
  449. }
  450. vma = find_vma(mm, address);
  451. if (unlikely(!vma))
  452. return bad_area(regs, address);
  453. if (likely(vma->vm_start <= address))
  454. goto good_area;
  455. if (unlikely(!(vma->vm_flags & VM_GROWSDOWN)))
  456. return bad_area(regs, address);
  457. /* The stack is being expanded, check if it's valid */
  458. if (unlikely(bad_stack_expansion(regs, address, vma, store_update_sp)))
  459. return bad_area(regs, address);
  460. /* Try to expand it */
  461. if (unlikely(expand_stack(vma, address)))
  462. return bad_area(regs, address);
  463. good_area:
  464. if (unlikely(access_error(is_write, is_exec, vma)))
  465. return bad_access(regs, address);
  466. /*
  467. * If for any reason at all we couldn't handle the fault,
  468. * make sure we exit gracefully rather than endlessly redo
  469. * the fault.
  470. */
  471. fault = handle_mm_fault(vma, address, flags);
  472. #ifdef CONFIG_PPC_MEM_KEYS
  473. /*
  474. * we skipped checking for access error due to key earlier.
  475. * Check that using handle_mm_fault error return.
  476. */
  477. if (unlikely(fault & VM_FAULT_SIGSEGV) &&
  478. !arch_vma_access_permitted(vma, is_write, is_exec, 0)) {
  479. int pkey = vma_pkey(vma);
  480. up_read(&mm->mmap_sem);
  481. return bad_key_fault_exception(regs, address, pkey);
  482. }
  483. #endif /* CONFIG_PPC_MEM_KEYS */
  484. major |= fault & VM_FAULT_MAJOR;
  485. /*
  486. * Handle the retry right now, the mmap_sem has been released in that
  487. * case.
  488. */
  489. if (unlikely(fault & VM_FAULT_RETRY)) {
  490. /* We retry only once */
  491. if (flags & FAULT_FLAG_ALLOW_RETRY) {
  492. /*
  493. * Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk
  494. * of starvation.
  495. */
  496. flags &= ~FAULT_FLAG_ALLOW_RETRY;
  497. flags |= FAULT_FLAG_TRIED;
  498. if (!fatal_signal_pending(current))
  499. goto retry;
  500. }
  501. /*
  502. * User mode? Just return to handle the fatal exception otherwise
  503. * return to bad_page_fault
  504. */
  505. return is_user ? 0 : SIGBUS;
  506. }
  507. up_read(&current->mm->mmap_sem);
  508. if (unlikely(fault & VM_FAULT_ERROR))
  509. return mm_fault_error(regs, address, fault);
  510. /*
  511. * Major/minor page fault accounting.
  512. */
  513. if (major) {
  514. current->maj_flt++;
  515. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
  516. cmo_account_page_fault();
  517. } else {
  518. current->min_flt++;
  519. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
  520. }
  521. return 0;
  522. }
  523. NOKPROBE_SYMBOL(__do_page_fault);
  524. int do_page_fault(struct pt_regs *regs, unsigned long address,
  525. unsigned long error_code)
  526. {
  527. enum ctx_state prev_state = exception_enter();
  528. int rc = __do_page_fault(regs, address, error_code);
  529. exception_exit(prev_state);
  530. return rc;
  531. }
  532. NOKPROBE_SYMBOL(do_page_fault);
  533. /*
  534. * bad_page_fault is called when we have a bad access from the kernel.
  535. * It is called from the DSI and ISI handlers in head.S and from some
  536. * of the procedures in traps.c.
  537. */
  538. void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
  539. {
  540. const struct exception_table_entry *entry;
  541. /* Are we prepared to handle this fault? */
  542. if ((entry = search_exception_tables(regs->nip)) != NULL) {
  543. regs->nip = extable_fixup(entry);
  544. return;
  545. }
  546. /* kernel has accessed a bad area */
  547. switch (TRAP(regs)) {
  548. case 0x300:
  549. case 0x380:
  550. printk(KERN_ALERT "Unable to handle kernel paging request for "
  551. "data at address 0x%08lx\n", regs->dar);
  552. break;
  553. case 0x400:
  554. case 0x480:
  555. printk(KERN_ALERT "Unable to handle kernel paging request for "
  556. "instruction fetch\n");
  557. break;
  558. case 0x600:
  559. printk(KERN_ALERT "Unable to handle kernel paging request for "
  560. "unaligned access at address 0x%08lx\n", regs->dar);
  561. break;
  562. default:
  563. printk(KERN_ALERT "Unable to handle kernel paging request for "
  564. "unknown fault\n");
  565. break;
  566. }
  567. printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
  568. regs->nip);
  569. if (task_stack_end_corrupted(current))
  570. printk(KERN_ALERT "Thread overran stack, or stack corrupted\n");
  571. die("Kernel access of bad area", regs, sig);
  572. }