fault.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. /*
  2. * arch/s390/mm/fault.c
  3. *
  4. * S390 version
  5. * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6. * Author(s): Hartmut Penner (hp@de.ibm.com)
  7. * Ulrich Weigand (uweigand@de.ibm.com)
  8. *
  9. * Derived from "arch/i386/mm/fault.c"
  10. * Copyright (C) 1995 Linus Torvalds
  11. */
  12. #include <linux/kernel_stat.h>
  13. #include <linux/perf_event.h>
  14. #include <linux/signal.h>
  15. #include <linux/sched.h>
  16. #include <linux/kernel.h>
  17. #include <linux/errno.h>
  18. #include <linux/string.h>
  19. #include <linux/types.h>
  20. #include <linux/ptrace.h>
  21. #include <linux/mman.h>
  22. #include <linux/mm.h>
  23. #include <linux/compat.h>
  24. #include <linux/smp.h>
  25. #include <linux/kdebug.h>
  26. #include <linux/init.h>
  27. #include <linux/console.h>
  28. #include <linux/module.h>
  29. #include <linux/hardirq.h>
  30. #include <linux/kprobes.h>
  31. #include <linux/uaccess.h>
  32. #include <linux/hugetlb.h>
  33. #include <asm/asm-offsets.h>
  34. #include <asm/pgtable.h>
  35. #include <asm/irq.h>
  36. #include <asm/mmu_context.h>
  37. #include <asm/facility.h>
  38. #include "../kernel/entry.h"
  39. #ifndef CONFIG_64BIT
  40. #define __FAIL_ADDR_MASK 0x7ffff000
  41. #define __SUBCODE_MASK 0x0200
  42. #define __PF_RES_FIELD 0ULL
  43. #else /* CONFIG_64BIT */
  44. #define __FAIL_ADDR_MASK -4096L
  45. #define __SUBCODE_MASK 0x0600
  46. #define __PF_RES_FIELD 0x8000000000000000ULL
  47. #endif /* CONFIG_64BIT */
  48. #define VM_FAULT_BADCONTEXT 0x010000
  49. #define VM_FAULT_BADMAP 0x020000
  50. #define VM_FAULT_BADACCESS 0x040000
  51. static unsigned long store_indication;
  52. void fault_init(void)
  53. {
  54. if (test_facility(2) && test_facility(75))
  55. store_indication = 0xc00;
  56. }
  57. static inline int notify_page_fault(struct pt_regs *regs)
  58. {
  59. int ret = 0;
  60. /* kprobe_running() needs smp_processor_id() */
  61. if (kprobes_built_in() && !user_mode(regs)) {
  62. preempt_disable();
  63. if (kprobe_running() && kprobe_fault_handler(regs, 14))
  64. ret = 1;
  65. preempt_enable();
  66. }
  67. return ret;
  68. }
  69. /*
  70. * Unlock any spinlocks which will prevent us from getting the
  71. * message out.
  72. */
  73. void bust_spinlocks(int yes)
  74. {
  75. if (yes) {
  76. oops_in_progress = 1;
  77. } else {
  78. int loglevel_save = console_loglevel;
  79. console_unblank();
  80. oops_in_progress = 0;
  81. /*
  82. * OK, the message is on the console. Now we call printk()
  83. * without oops_in_progress set so that printk will give klogd
  84. * a poke. Hold onto your hats...
  85. */
  86. console_loglevel = 15;
  87. printk(" ");
  88. console_loglevel = loglevel_save;
  89. }
  90. }
  91. /*
  92. * Returns the address space associated with the fault.
  93. * Returns 0 for kernel space and 1 for user space.
  94. */
  95. static inline int user_space_fault(unsigned long trans_exc_code)
  96. {
  97. /*
  98. * The lowest two bits of the translation exception
  99. * identification indicate which paging table was used.
  100. */
  101. trans_exc_code &= 3;
  102. if (trans_exc_code == 2)
  103. /* Access via secondary space, set_fs setting decides */
  104. return current->thread.mm_segment.ar4;
  105. if (user_mode == HOME_SPACE_MODE)
  106. /* User space if the access has been done via home space. */
  107. return trans_exc_code == 3;
  108. /*
  109. * If the user space is not the home space the kernel runs in home
  110. * space. Access via secondary space has already been covered,
  111. * access via primary space or access register is from user space
  112. * and access via home space is from the kernel.
  113. */
  114. return trans_exc_code != 3;
  115. }
  116. static inline void report_user_fault(struct pt_regs *regs, long signr)
  117. {
  118. if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
  119. return;
  120. if (!unhandled_signal(current, signr))
  121. return;
  122. if (!printk_ratelimit())
  123. return;
  124. printk(KERN_ALERT "User process fault: interruption code 0x%X ",
  125. regs->int_code);
  126. print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
  127. printk(KERN_CONT "\n");
  128. printk(KERN_ALERT "failing address: %lX\n",
  129. regs->int_parm_long & __FAIL_ADDR_MASK);
  130. show_regs(regs);
  131. }
  132. /*
  133. * Send SIGSEGV to task. This is an external routine
  134. * to keep the stack usage of do_page_fault small.
  135. */
  136. static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
  137. {
  138. struct siginfo si;
  139. report_user_fault(regs, SIGSEGV);
  140. si.si_signo = SIGSEGV;
  141. si.si_code = si_code;
  142. si.si_addr = (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK);
  143. force_sig_info(SIGSEGV, &si, current);
  144. }
  145. static noinline void do_no_context(struct pt_regs *regs)
  146. {
  147. const struct exception_table_entry *fixup;
  148. unsigned long address;
  149. /* Are we prepared to handle this kernel fault? */
  150. fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN);
  151. if (fixup) {
  152. regs->psw.addr = fixup->fixup | PSW_ADDR_AMODE;
  153. return;
  154. }
  155. /*
  156. * Oops. The kernel tried to access some bad page. We'll have to
  157. * terminate things with extreme prejudice.
  158. */
  159. address = regs->int_parm_long & __FAIL_ADDR_MASK;
  160. if (!user_space_fault(regs->int_parm_long))
  161. printk(KERN_ALERT "Unable to handle kernel pointer dereference"
  162. " at virtual kernel address %p\n", (void *)address);
  163. else
  164. printk(KERN_ALERT "Unable to handle kernel paging request"
  165. " at virtual user address %p\n", (void *)address);
  166. die(regs, "Oops");
  167. do_exit(SIGKILL);
  168. }
  169. static noinline void do_low_address(struct pt_regs *regs)
  170. {
  171. /* Low-address protection hit in kernel mode means
  172. NULL pointer write access in kernel mode. */
  173. if (regs->psw.mask & PSW_MASK_PSTATE) {
  174. /* Low-address protection hit in user mode 'cannot happen'. */
  175. die (regs, "Low-address protection");
  176. do_exit(SIGKILL);
  177. }
  178. do_no_context(regs);
  179. }
  180. static noinline void do_sigbus(struct pt_regs *regs)
  181. {
  182. struct task_struct *tsk = current;
  183. struct siginfo si;
  184. /*
  185. * Send a sigbus, regardless of whether we were in kernel
  186. * or user mode.
  187. */
  188. si.si_signo = SIGBUS;
  189. si.si_errno = 0;
  190. si.si_code = BUS_ADRERR;
  191. si.si_addr = (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK);
  192. force_sig_info(SIGBUS, &si, tsk);
  193. }
  194. static noinline void do_fault_error(struct pt_regs *regs, int fault)
  195. {
  196. int si_code;
  197. switch (fault) {
  198. case VM_FAULT_BADACCESS:
  199. case VM_FAULT_BADMAP:
  200. /* Bad memory access. Check if it is kernel or user space. */
  201. if (regs->psw.mask & PSW_MASK_PSTATE) {
  202. /* User mode accesses just cause a SIGSEGV */
  203. si_code = (fault == VM_FAULT_BADMAP) ?
  204. SEGV_MAPERR : SEGV_ACCERR;
  205. do_sigsegv(regs, si_code);
  206. return;
  207. }
  208. case VM_FAULT_BADCONTEXT:
  209. do_no_context(regs);
  210. break;
  211. default: /* fault & VM_FAULT_ERROR */
  212. if (fault & VM_FAULT_OOM) {
  213. if (!(regs->psw.mask & PSW_MASK_PSTATE))
  214. do_no_context(regs);
  215. else
  216. pagefault_out_of_memory();
  217. } else if (fault & VM_FAULT_SIGBUS) {
  218. /* Kernel mode? Handle exceptions or die */
  219. if (!(regs->psw.mask & PSW_MASK_PSTATE))
  220. do_no_context(regs);
  221. else
  222. do_sigbus(regs);
  223. } else
  224. BUG();
  225. break;
  226. }
  227. }
  228. /*
  229. * This routine handles page faults. It determines the address,
  230. * and the problem, and then passes it off to one of the appropriate
  231. * routines.
  232. *
  233. * interruption code (int_code):
  234. * 04 Protection -> Write-Protection (suprression)
  235. * 10 Segment translation -> Not present (nullification)
  236. * 11 Page translation -> Not present (nullification)
  237. * 3b Region third trans. -> Not present (nullification)
  238. */
  239. static inline int do_exception(struct pt_regs *regs, int access)
  240. {
  241. struct task_struct *tsk;
  242. struct mm_struct *mm;
  243. struct vm_area_struct *vma;
  244. unsigned long trans_exc_code;
  245. unsigned long address;
  246. unsigned int flags;
  247. int fault;
  248. if (notify_page_fault(regs))
  249. return 0;
  250. tsk = current;
  251. mm = tsk->mm;
  252. trans_exc_code = regs->int_parm_long;
  253. /*
  254. * Verify that the fault happened in user space, that
  255. * we are not in an interrupt and that there is a
  256. * user context.
  257. */
  258. fault = VM_FAULT_BADCONTEXT;
  259. if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
  260. goto out;
  261. address = trans_exc_code & __FAIL_ADDR_MASK;
  262. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
  263. flags = FAULT_FLAG_ALLOW_RETRY;
  264. if (access == VM_WRITE || (trans_exc_code & store_indication) == 0x400)
  265. flags |= FAULT_FLAG_WRITE;
  266. down_read(&mm->mmap_sem);
  267. #ifdef CONFIG_PGSTE
  268. if (test_tsk_thread_flag(current, TIF_SIE) && S390_lowcore.gmap) {
  269. address = __gmap_fault(address,
  270. (struct gmap *) S390_lowcore.gmap);
  271. if (address == -EFAULT) {
  272. fault = VM_FAULT_BADMAP;
  273. goto out_up;
  274. }
  275. if (address == -ENOMEM) {
  276. fault = VM_FAULT_OOM;
  277. goto out_up;
  278. }
  279. }
  280. #endif
  281. retry:
  282. fault = VM_FAULT_BADMAP;
  283. vma = find_vma(mm, address);
  284. if (!vma)
  285. goto out_up;
  286. if (unlikely(vma->vm_start > address)) {
  287. if (!(vma->vm_flags & VM_GROWSDOWN))
  288. goto out_up;
  289. if (expand_stack(vma, address))
  290. goto out_up;
  291. }
  292. /*
  293. * Ok, we have a good vm_area for this memory access, so
  294. * we can handle it..
  295. */
  296. fault = VM_FAULT_BADACCESS;
  297. if (unlikely(!(vma->vm_flags & access)))
  298. goto out_up;
  299. if (is_vm_hugetlb_page(vma))
  300. address &= HPAGE_MASK;
  301. /*
  302. * If for any reason at all we couldn't handle the fault,
  303. * make sure we exit gracefully rather than endlessly redo
  304. * the fault.
  305. */
  306. fault = handle_mm_fault(mm, vma, address, flags);
  307. if (unlikely(fault & VM_FAULT_ERROR))
  308. goto out_up;
  309. /*
  310. * Major/minor page fault accounting is only done on the
  311. * initial attempt. If we go through a retry, it is extremely
  312. * likely that the page will be found in page cache at that point.
  313. */
  314. if (flags & FAULT_FLAG_ALLOW_RETRY) {
  315. if (fault & VM_FAULT_MAJOR) {
  316. tsk->maj_flt++;
  317. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
  318. regs, address);
  319. } else {
  320. tsk->min_flt++;
  321. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1,
  322. regs, address);
  323. }
  324. if (fault & VM_FAULT_RETRY) {
  325. /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk
  326. * of starvation. */
  327. flags &= ~FAULT_FLAG_ALLOW_RETRY;
  328. down_read(&mm->mmap_sem);
  329. goto retry;
  330. }
  331. }
  332. /*
  333. * The instruction that caused the program check will
  334. * be repeated. Don't signal single step via SIGTRAP.
  335. */
  336. clear_tsk_thread_flag(tsk, TIF_PER_TRAP);
  337. fault = 0;
  338. out_up:
  339. up_read(&mm->mmap_sem);
  340. out:
  341. return fault;
  342. }
  343. void __kprobes do_protection_exception(struct pt_regs *regs)
  344. {
  345. unsigned long trans_exc_code;
  346. int fault;
  347. trans_exc_code = regs->int_parm_long;
  348. /* Protection exception is suppressing, decrement psw address. */
  349. regs->psw.addr = __rewind_psw(regs->psw, regs->int_code >> 16);
  350. /*
  351. * Check for low-address protection. This needs to be treated
  352. * as a special case because the translation exception code
  353. * field is not guaranteed to contain valid data in this case.
  354. */
  355. if (unlikely(!(trans_exc_code & 4))) {
  356. do_low_address(regs);
  357. return;
  358. }
  359. fault = do_exception(regs, VM_WRITE);
  360. if (unlikely(fault))
  361. do_fault_error(regs, fault);
  362. }
  363. void __kprobes do_dat_exception(struct pt_regs *regs)
  364. {
  365. int access, fault;
  366. access = VM_READ | VM_EXEC | VM_WRITE;
  367. fault = do_exception(regs, access);
  368. if (unlikely(fault))
  369. do_fault_error(regs, fault);
  370. }
  371. #ifdef CONFIG_64BIT
  372. void __kprobes do_asce_exception(struct pt_regs *regs)
  373. {
  374. struct mm_struct *mm = current->mm;
  375. struct vm_area_struct *vma;
  376. unsigned long trans_exc_code;
  377. trans_exc_code = regs->int_parm_long;
  378. if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
  379. goto no_context;
  380. down_read(&mm->mmap_sem);
  381. vma = find_vma(mm, trans_exc_code & __FAIL_ADDR_MASK);
  382. up_read(&mm->mmap_sem);
  383. if (vma) {
  384. update_mm(mm, current);
  385. return;
  386. }
  387. /* User mode accesses just cause a SIGSEGV */
  388. if (regs->psw.mask & PSW_MASK_PSTATE) {
  389. do_sigsegv(regs, SEGV_MAPERR);
  390. return;
  391. }
  392. no_context:
  393. do_no_context(regs);
  394. }
  395. #endif
  396. int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write)
  397. {
  398. struct pt_regs regs;
  399. int access, fault;
  400. regs.psw.mask = psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK;
  401. if (!irqs_disabled())
  402. regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT;
  403. regs.psw.addr = (unsigned long) __builtin_return_address(0);
  404. regs.psw.addr |= PSW_ADDR_AMODE;
  405. regs.int_code = pgm_int_code;
  406. regs.int_parm_long = (uaddr & PAGE_MASK) | 2;
  407. access = write ? VM_WRITE : VM_READ;
  408. fault = do_exception(&regs, access);
  409. if (unlikely(fault)) {
  410. if (fault & VM_FAULT_OOM)
  411. return -EFAULT;
  412. else if (fault & VM_FAULT_SIGBUS)
  413. do_sigbus(&regs);
  414. }
  415. return fault ? -EFAULT : 0;
  416. }
  417. #ifdef CONFIG_PFAULT
  418. /*
  419. * 'pfault' pseudo page faults routines.
  420. */
  421. static int pfault_disable;
  422. static int __init nopfault(char *str)
  423. {
  424. pfault_disable = 1;
  425. return 1;
  426. }
  427. __setup("nopfault", nopfault);
  428. struct pfault_refbk {
  429. u16 refdiagc;
  430. u16 reffcode;
  431. u16 refdwlen;
  432. u16 refversn;
  433. u64 refgaddr;
  434. u64 refselmk;
  435. u64 refcmpmk;
  436. u64 reserved;
  437. } __attribute__ ((packed, aligned(8)));
  438. int pfault_init(void)
  439. {
  440. struct pfault_refbk refbk = {
  441. .refdiagc = 0x258,
  442. .reffcode = 0,
  443. .refdwlen = 5,
  444. .refversn = 2,
  445. .refgaddr = __LC_CURRENT_PID,
  446. .refselmk = 1ULL << 48,
  447. .refcmpmk = 1ULL << 48,
  448. .reserved = __PF_RES_FIELD };
  449. int rc;
  450. if (pfault_disable)
  451. return -1;
  452. asm volatile(
  453. " diag %1,%0,0x258\n"
  454. "0: j 2f\n"
  455. "1: la %0,8\n"
  456. "2:\n"
  457. EX_TABLE(0b,1b)
  458. : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc");
  459. return rc;
  460. }
  461. void pfault_fini(void)
  462. {
  463. struct pfault_refbk refbk = {
  464. .refdiagc = 0x258,
  465. .reffcode = 1,
  466. .refdwlen = 5,
  467. .refversn = 2,
  468. };
  469. if (pfault_disable)
  470. return;
  471. asm volatile(
  472. " diag %0,0,0x258\n"
  473. "0:\n"
  474. EX_TABLE(0b,0b)
  475. : : "a" (&refbk), "m" (refbk) : "cc");
  476. }
  477. static DEFINE_SPINLOCK(pfault_lock);
  478. static LIST_HEAD(pfault_list);
  479. static void pfault_interrupt(struct ext_code ext_code,
  480. unsigned int param32, unsigned long param64)
  481. {
  482. struct task_struct *tsk;
  483. __u16 subcode;
  484. pid_t pid;
  485. /*
  486. * Get the external interruption subcode & pfault
  487. * initial/completion signal bit. VM stores this
  488. * in the 'cpu address' field associated with the
  489. * external interrupt.
  490. */
  491. subcode = ext_code.subcode;
  492. if ((subcode & 0xff00) != __SUBCODE_MASK)
  493. return;
  494. kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++;
  495. if (subcode & 0x0080) {
  496. /* Get the token (= pid of the affected task). */
  497. pid = sizeof(void *) == 4 ? param32 : param64;
  498. rcu_read_lock();
  499. tsk = find_task_by_pid_ns(pid, &init_pid_ns);
  500. if (tsk)
  501. get_task_struct(tsk);
  502. rcu_read_unlock();
  503. if (!tsk)
  504. return;
  505. } else {
  506. tsk = current;
  507. }
  508. spin_lock(&pfault_lock);
  509. if (subcode & 0x0080) {
  510. /* signal bit is set -> a page has been swapped in by VM */
  511. if (tsk->thread.pfault_wait == 1) {
  512. /* Initial interrupt was faster than the completion
  513. * interrupt. pfault_wait is valid. Set pfault_wait
  514. * back to zero and wake up the process. This can
  515. * safely be done because the task is still sleeping
  516. * and can't produce new pfaults. */
  517. tsk->thread.pfault_wait = 0;
  518. list_del(&tsk->thread.list);
  519. wake_up_process(tsk);
  520. } else {
  521. /* Completion interrupt was faster than initial
  522. * interrupt. Set pfault_wait to -1 so the initial
  523. * interrupt doesn't put the task to sleep.
  524. * If the task is not running, ignore the completion
  525. * interrupt since it must be a leftover of a PFAULT
  526. * CANCEL operation which didn't remove all pending
  527. * completion interrupts. */
  528. if (tsk->state == TASK_RUNNING)
  529. tsk->thread.pfault_wait = -1;
  530. }
  531. put_task_struct(tsk);
  532. } else {
  533. /* signal bit not set -> a real page is missing. */
  534. if (tsk->thread.pfault_wait == -1) {
  535. /* Completion interrupt was faster than the initial
  536. * interrupt (pfault_wait == -1). Set pfault_wait
  537. * back to zero and exit. */
  538. tsk->thread.pfault_wait = 0;
  539. } else {
  540. /* Initial interrupt arrived before completion
  541. * interrupt. Let the task sleep. */
  542. tsk->thread.pfault_wait = 1;
  543. list_add(&tsk->thread.list, &pfault_list);
  544. set_task_state(tsk, TASK_UNINTERRUPTIBLE);
  545. set_tsk_need_resched(tsk);
  546. }
  547. }
  548. spin_unlock(&pfault_lock);
  549. }
  550. static int __cpuinit pfault_cpu_notify(struct notifier_block *self,
  551. unsigned long action, void *hcpu)
  552. {
  553. struct thread_struct *thread, *next;
  554. struct task_struct *tsk;
  555. switch (action) {
  556. case CPU_DEAD:
  557. case CPU_DEAD_FROZEN:
  558. spin_lock_irq(&pfault_lock);
  559. list_for_each_entry_safe(thread, next, &pfault_list, list) {
  560. thread->pfault_wait = 0;
  561. list_del(&thread->list);
  562. tsk = container_of(thread, struct task_struct, thread);
  563. wake_up_process(tsk);
  564. }
  565. spin_unlock_irq(&pfault_lock);
  566. break;
  567. default:
  568. break;
  569. }
  570. return NOTIFY_OK;
  571. }
  572. static int __init pfault_irq_init(void)
  573. {
  574. int rc;
  575. rc = register_external_interrupt(0x2603, pfault_interrupt);
  576. if (rc)
  577. goto out_extint;
  578. rc = pfault_init() == 0 ? 0 : -EOPNOTSUPP;
  579. if (rc)
  580. goto out_pfault;
  581. service_subclass_irq_register();
  582. hotcpu_notifier(pfault_cpu_notify, 0);
  583. return 0;
  584. out_pfault:
  585. unregister_external_interrupt(0x2603, pfault_interrupt);
  586. out_extint:
  587. pfault_disable = 1;
  588. return rc;
  589. }
  590. early_initcall(pfault_irq_init);
  591. #endif /* CONFIG_PFAULT */