fault.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  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/system.h>
  35. #include <asm/pgtable.h>
  36. #include <asm/irq.h>
  37. #include <asm/mmu_context.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 int_code,
  117. int signr, unsigned long address)
  118. {
  119. if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
  120. return;
  121. if (!unhandled_signal(current, signr))
  122. return;
  123. if (!printk_ratelimit())
  124. return;
  125. printk("User process fault: interruption code 0x%lX ", int_code);
  126. print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
  127. printk("\n");
  128. printk("failing address: %lX\n", address);
  129. show_regs(regs);
  130. }
  131. /*
  132. * Send SIGSEGV to task. This is an external routine
  133. * to keep the stack usage of do_page_fault small.
  134. */
  135. static noinline void do_sigsegv(struct pt_regs *regs, long int_code,
  136. int si_code, unsigned long trans_exc_code)
  137. {
  138. struct siginfo si;
  139. unsigned long address;
  140. address = trans_exc_code & __FAIL_ADDR_MASK;
  141. current->thread.prot_addr = address;
  142. current->thread.trap_no = int_code;
  143. report_user_fault(regs, int_code, SIGSEGV, address);
  144. si.si_signo = SIGSEGV;
  145. si.si_code = si_code;
  146. si.si_addr = (void __user *) address;
  147. force_sig_info(SIGSEGV, &si, current);
  148. }
  149. static noinline void do_no_context(struct pt_regs *regs, long int_code,
  150. unsigned long trans_exc_code)
  151. {
  152. const struct exception_table_entry *fixup;
  153. unsigned long address;
  154. /* Are we prepared to handle this kernel fault? */
  155. fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN);
  156. if (fixup) {
  157. regs->psw.addr = fixup->fixup | PSW_ADDR_AMODE;
  158. return;
  159. }
  160. /*
  161. * Oops. The kernel tried to access some bad page. We'll have to
  162. * terminate things with extreme prejudice.
  163. */
  164. address = trans_exc_code & __FAIL_ADDR_MASK;
  165. if (!user_space_fault(trans_exc_code))
  166. printk(KERN_ALERT "Unable to handle kernel pointer dereference"
  167. " at virtual kernel address %p\n", (void *)address);
  168. else
  169. printk(KERN_ALERT "Unable to handle kernel paging request"
  170. " at virtual user address %p\n", (void *)address);
  171. die("Oops", regs, int_code);
  172. do_exit(SIGKILL);
  173. }
  174. static noinline void do_low_address(struct pt_regs *regs, long int_code,
  175. unsigned long trans_exc_code)
  176. {
  177. /* Low-address protection hit in kernel mode means
  178. NULL pointer write access in kernel mode. */
  179. if (regs->psw.mask & PSW_MASK_PSTATE) {
  180. /* Low-address protection hit in user mode 'cannot happen'. */
  181. die ("Low-address protection", regs, int_code);
  182. do_exit(SIGKILL);
  183. }
  184. do_no_context(regs, int_code, trans_exc_code);
  185. }
  186. static noinline void do_sigbus(struct pt_regs *regs, long int_code,
  187. unsigned long trans_exc_code)
  188. {
  189. struct task_struct *tsk = current;
  190. unsigned long address;
  191. struct siginfo si;
  192. /*
  193. * Send a sigbus, regardless of whether we were in kernel
  194. * or user mode.
  195. */
  196. address = trans_exc_code & __FAIL_ADDR_MASK;
  197. tsk->thread.prot_addr = address;
  198. tsk->thread.trap_no = int_code;
  199. si.si_signo = SIGBUS;
  200. si.si_errno = 0;
  201. si.si_code = BUS_ADRERR;
  202. si.si_addr = (void __user *) address;
  203. force_sig_info(SIGBUS, &si, tsk);
  204. }
  205. static noinline void do_fault_error(struct pt_regs *regs, long int_code,
  206. unsigned long trans_exc_code, int fault)
  207. {
  208. int si_code;
  209. switch (fault) {
  210. case VM_FAULT_BADACCESS:
  211. case VM_FAULT_BADMAP:
  212. /* Bad memory access. Check if it is kernel or user space. */
  213. if (regs->psw.mask & PSW_MASK_PSTATE) {
  214. /* User mode accesses just cause a SIGSEGV */
  215. si_code = (fault == VM_FAULT_BADMAP) ?
  216. SEGV_MAPERR : SEGV_ACCERR;
  217. do_sigsegv(regs, int_code, si_code, trans_exc_code);
  218. return;
  219. }
  220. case VM_FAULT_BADCONTEXT:
  221. do_no_context(regs, int_code, trans_exc_code);
  222. break;
  223. default: /* fault & VM_FAULT_ERROR */
  224. if (fault & VM_FAULT_OOM) {
  225. if (!(regs->psw.mask & PSW_MASK_PSTATE))
  226. do_no_context(regs, int_code, trans_exc_code);
  227. else
  228. pagefault_out_of_memory();
  229. } else if (fault & VM_FAULT_SIGBUS) {
  230. /* Kernel mode? Handle exceptions or die */
  231. if (!(regs->psw.mask & PSW_MASK_PSTATE))
  232. do_no_context(regs, int_code, trans_exc_code);
  233. else
  234. do_sigbus(regs, int_code, trans_exc_code);
  235. } else
  236. BUG();
  237. break;
  238. }
  239. }
  240. /*
  241. * This routine handles page faults. It determines the address,
  242. * and the problem, and then passes it off to one of the appropriate
  243. * routines.
  244. *
  245. * interruption code (int_code):
  246. * 04 Protection -> Write-Protection (suprression)
  247. * 10 Segment translation -> Not present (nullification)
  248. * 11 Page translation -> Not present (nullification)
  249. * 3b Region third trans. -> Not present (nullification)
  250. */
  251. static inline int do_exception(struct pt_regs *regs, int access,
  252. unsigned long trans_exc_code)
  253. {
  254. struct task_struct *tsk;
  255. struct mm_struct *mm;
  256. struct vm_area_struct *vma;
  257. unsigned long address;
  258. unsigned int flags;
  259. int fault;
  260. if (notify_page_fault(regs))
  261. return 0;
  262. tsk = current;
  263. mm = tsk->mm;
  264. /*
  265. * Verify that the fault happened in user space, that
  266. * we are not in an interrupt and that there is a
  267. * user context.
  268. */
  269. fault = VM_FAULT_BADCONTEXT;
  270. if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
  271. goto out;
  272. address = trans_exc_code & __FAIL_ADDR_MASK;
  273. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
  274. flags = FAULT_FLAG_ALLOW_RETRY;
  275. if (access == VM_WRITE || (trans_exc_code & store_indication) == 0x400)
  276. flags |= FAULT_FLAG_WRITE;
  277. retry:
  278. down_read(&mm->mmap_sem);
  279. fault = VM_FAULT_BADMAP;
  280. vma = find_vma(mm, address);
  281. if (!vma)
  282. goto out_up;
  283. if (unlikely(vma->vm_start > address)) {
  284. if (!(vma->vm_flags & VM_GROWSDOWN))
  285. goto out_up;
  286. if (expand_stack(vma, address))
  287. goto out_up;
  288. }
  289. /*
  290. * Ok, we have a good vm_area for this memory access, so
  291. * we can handle it..
  292. */
  293. fault = VM_FAULT_BADACCESS;
  294. if (unlikely(!(vma->vm_flags & access)))
  295. goto out_up;
  296. if (is_vm_hugetlb_page(vma))
  297. address &= HPAGE_MASK;
  298. /*
  299. * If for any reason at all we couldn't handle the fault,
  300. * make sure we exit gracefully rather than endlessly redo
  301. * the fault.
  302. */
  303. fault = handle_mm_fault(mm, vma, address, flags);
  304. if (unlikely(fault & VM_FAULT_ERROR))
  305. goto out_up;
  306. /*
  307. * Major/minor page fault accounting is only done on the
  308. * initial attempt. If we go through a retry, it is extremely
  309. * likely that the page will be found in page cache at that point.
  310. */
  311. if (flags & FAULT_FLAG_ALLOW_RETRY) {
  312. if (fault & VM_FAULT_MAJOR) {
  313. tsk->maj_flt++;
  314. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
  315. regs, address);
  316. } else {
  317. tsk->min_flt++;
  318. perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
  319. regs, address);
  320. }
  321. if (fault & VM_FAULT_RETRY) {
  322. /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk
  323. * of starvation. */
  324. flags &= ~FAULT_FLAG_ALLOW_RETRY;
  325. goto retry;
  326. }
  327. }
  328. /*
  329. * The instruction that caused the program check will
  330. * be repeated. Don't signal single step via SIGTRAP.
  331. */
  332. clear_tsk_thread_flag(tsk, TIF_PER_TRAP);
  333. fault = 0;
  334. out_up:
  335. up_read(&mm->mmap_sem);
  336. out:
  337. return fault;
  338. }
  339. void __kprobes do_protection_exception(struct pt_regs *regs, long pgm_int_code,
  340. unsigned long trans_exc_code)
  341. {
  342. int fault;
  343. /* Protection exception is suppressing, decrement psw address. */
  344. regs->psw.addr -= (pgm_int_code >> 16);
  345. /*
  346. * Check for low-address protection. This needs to be treated
  347. * as a special case because the translation exception code
  348. * field is not guaranteed to contain valid data in this case.
  349. */
  350. if (unlikely(!(trans_exc_code & 4))) {
  351. do_low_address(regs, pgm_int_code, trans_exc_code);
  352. return;
  353. }
  354. fault = do_exception(regs, VM_WRITE, trans_exc_code);
  355. if (unlikely(fault))
  356. do_fault_error(regs, 4, trans_exc_code, fault);
  357. }
  358. void __kprobes do_dat_exception(struct pt_regs *regs, long pgm_int_code,
  359. unsigned long trans_exc_code)
  360. {
  361. int access, fault;
  362. access = VM_READ | VM_EXEC | VM_WRITE;
  363. fault = do_exception(regs, access, trans_exc_code);
  364. if (unlikely(fault))
  365. do_fault_error(regs, pgm_int_code & 255, trans_exc_code, fault);
  366. }
  367. #ifdef CONFIG_64BIT
  368. void __kprobes do_asce_exception(struct pt_regs *regs, long pgm_int_code,
  369. unsigned long trans_exc_code)
  370. {
  371. struct mm_struct *mm = current->mm;
  372. struct vm_area_struct *vma;
  373. if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
  374. goto no_context;
  375. down_read(&mm->mmap_sem);
  376. vma = find_vma(mm, trans_exc_code & __FAIL_ADDR_MASK);
  377. up_read(&mm->mmap_sem);
  378. if (vma) {
  379. update_mm(mm, current);
  380. return;
  381. }
  382. /* User mode accesses just cause a SIGSEGV */
  383. if (regs->psw.mask & PSW_MASK_PSTATE) {
  384. do_sigsegv(regs, pgm_int_code, SEGV_MAPERR, trans_exc_code);
  385. return;
  386. }
  387. no_context:
  388. do_no_context(regs, pgm_int_code, trans_exc_code);
  389. }
  390. #endif
  391. int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write)
  392. {
  393. struct pt_regs regs;
  394. int access, fault;
  395. regs.psw.mask = psw_kernel_bits;
  396. if (!irqs_disabled())
  397. regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT;
  398. regs.psw.addr = (unsigned long) __builtin_return_address(0);
  399. regs.psw.addr |= PSW_ADDR_AMODE;
  400. uaddr &= PAGE_MASK;
  401. access = write ? VM_WRITE : VM_READ;
  402. fault = do_exception(&regs, access, uaddr | 2);
  403. if (unlikely(fault)) {
  404. if (fault & VM_FAULT_OOM)
  405. return -EFAULT;
  406. else if (fault & VM_FAULT_SIGBUS)
  407. do_sigbus(&regs, pgm_int_code, uaddr);
  408. }
  409. return fault ? -EFAULT : 0;
  410. }
  411. #ifdef CONFIG_PFAULT
  412. /*
  413. * 'pfault' pseudo page faults routines.
  414. */
  415. static int pfault_disable;
  416. static int __init nopfault(char *str)
  417. {
  418. pfault_disable = 1;
  419. return 1;
  420. }
  421. __setup("nopfault", nopfault);
  422. struct pfault_refbk {
  423. u16 refdiagc;
  424. u16 reffcode;
  425. u16 refdwlen;
  426. u16 refversn;
  427. u64 refgaddr;
  428. u64 refselmk;
  429. u64 refcmpmk;
  430. u64 reserved;
  431. } __attribute__ ((packed, aligned(8)));
  432. int pfault_init(void)
  433. {
  434. struct pfault_refbk refbk = {
  435. .refdiagc = 0x258,
  436. .reffcode = 0,
  437. .refdwlen = 5,
  438. .refversn = 2,
  439. .refgaddr = __LC_CURRENT_PID,
  440. .refselmk = 1ULL << 48,
  441. .refcmpmk = 1ULL << 48,
  442. .reserved = __PF_RES_FIELD };
  443. int rc;
  444. if (!MACHINE_IS_VM || pfault_disable)
  445. return -1;
  446. asm volatile(
  447. " diag %1,%0,0x258\n"
  448. "0: j 2f\n"
  449. "1: la %0,8\n"
  450. "2:\n"
  451. EX_TABLE(0b,1b)
  452. : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc");
  453. return rc;
  454. }
  455. void pfault_fini(void)
  456. {
  457. struct pfault_refbk refbk = {
  458. .refdiagc = 0x258,
  459. .reffcode = 1,
  460. .refdwlen = 5,
  461. .refversn = 2,
  462. };
  463. if (!MACHINE_IS_VM || pfault_disable)
  464. return;
  465. asm volatile(
  466. " diag %0,0,0x258\n"
  467. "0:\n"
  468. EX_TABLE(0b,0b)
  469. : : "a" (&refbk), "m" (refbk) : "cc");
  470. }
  471. static DEFINE_SPINLOCK(pfault_lock);
  472. static LIST_HEAD(pfault_list);
  473. static void pfault_interrupt(unsigned int ext_int_code,
  474. unsigned int param32, unsigned long param64)
  475. {
  476. struct task_struct *tsk;
  477. __u16 subcode;
  478. pid_t pid;
  479. /*
  480. * Get the external interruption subcode & pfault
  481. * initial/completion signal bit. VM stores this
  482. * in the 'cpu address' field associated with the
  483. * external interrupt.
  484. */
  485. subcode = ext_int_code >> 16;
  486. if ((subcode & 0xff00) != __SUBCODE_MASK)
  487. return;
  488. kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++;
  489. if (subcode & 0x0080) {
  490. /* Get the token (= pid of the affected task). */
  491. pid = sizeof(void *) == 4 ? param32 : param64;
  492. rcu_read_lock();
  493. tsk = find_task_by_pid_ns(pid, &init_pid_ns);
  494. if (tsk)
  495. get_task_struct(tsk);
  496. rcu_read_unlock();
  497. if (!tsk)
  498. return;
  499. } else {
  500. tsk = current;
  501. }
  502. spin_lock(&pfault_lock);
  503. if (subcode & 0x0080) {
  504. /* signal bit is set -> a page has been swapped in by VM */
  505. if (tsk->thread.pfault_wait == 1) {
  506. /* Initial interrupt was faster than the completion
  507. * interrupt. pfault_wait is valid. Set pfault_wait
  508. * back to zero and wake up the process. This can
  509. * safely be done because the task is still sleeping
  510. * and can't produce new pfaults. */
  511. tsk->thread.pfault_wait = 0;
  512. list_del(&tsk->thread.list);
  513. wake_up_process(tsk);
  514. } else {
  515. /* Completion interrupt was faster than initial
  516. * interrupt. Set pfault_wait to -1 so the initial
  517. * interrupt doesn't put the task to sleep. */
  518. tsk->thread.pfault_wait = -1;
  519. }
  520. put_task_struct(tsk);
  521. } else {
  522. /* signal bit not set -> a real page is missing. */
  523. if (tsk->thread.pfault_wait == -1) {
  524. /* Completion interrupt was faster than the initial
  525. * interrupt (pfault_wait == -1). Set pfault_wait
  526. * back to zero and exit. */
  527. tsk->thread.pfault_wait = 0;
  528. } else {
  529. /* Initial interrupt arrived before completion
  530. * interrupt. Let the task sleep. */
  531. tsk->thread.pfault_wait = 1;
  532. list_add(&tsk->thread.list, &pfault_list);
  533. set_task_state(tsk, TASK_UNINTERRUPTIBLE);
  534. set_tsk_need_resched(tsk);
  535. }
  536. }
  537. spin_unlock(&pfault_lock);
  538. }
  539. static int __cpuinit pfault_cpu_notify(struct notifier_block *self,
  540. unsigned long action, void *hcpu)
  541. {
  542. struct thread_struct *thread, *next;
  543. struct task_struct *tsk;
  544. switch (action) {
  545. case CPU_DEAD:
  546. case CPU_DEAD_FROZEN:
  547. spin_lock_irq(&pfault_lock);
  548. list_for_each_entry_safe(thread, next, &pfault_list, list) {
  549. thread->pfault_wait = 0;
  550. list_del(&thread->list);
  551. tsk = container_of(thread, struct task_struct, thread);
  552. wake_up_process(tsk);
  553. }
  554. spin_unlock_irq(&pfault_lock);
  555. break;
  556. default:
  557. break;
  558. }
  559. return NOTIFY_OK;
  560. }
  561. static int __init pfault_irq_init(void)
  562. {
  563. int rc;
  564. if (!MACHINE_IS_VM)
  565. return 0;
  566. rc = register_external_interrupt(0x2603, pfault_interrupt);
  567. if (rc)
  568. goto out_extint;
  569. rc = pfault_init() == 0 ? 0 : -EOPNOTSUPP;
  570. if (rc)
  571. goto out_pfault;
  572. service_subclass_irq_register();
  573. hotcpu_notifier(pfault_cpu_notify, 0);
  574. return 0;
  575. out_pfault:
  576. unregister_external_interrupt(0x2603, pfault_interrupt);
  577. out_extint:
  578. pfault_disable = 1;
  579. return rc;
  580. }
  581. early_initcall(pfault_irq_init);
  582. #endif /* CONFIG_PFAULT */