<div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">When page fault happens on VMALLOC_START~VMALLOC_END, why do_translation_fault does not fill Page table entry ?</div>
<div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
Does the least size of vmalloc is more than 1 MB?</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
413 #ifdef CONFIG_MMU</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">414 static int __kprobes</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
415 do_translation_fault(unsigned long addr, unsigned int fsr,</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">416 struct pt_regs *regs)</div>
<div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">417 {</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
418 unsigned int index;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">419 pgd_t *pgd, *pgd_k;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
420 pud_t *pud, *pud_k;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">421 pmd_t *pmd, *pmd_k;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
422</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">423 if (addr < TASK_SIZE)</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
424 return do_page_fault(addr, fsr, regs);</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">425</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
426 if (user_mode(regs))</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">427 goto bad_area;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
428</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">429 index = pgd_index(addr);</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
430</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">431 /*</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
432 * FIXME: CP15 C1 is write only on ARMv3 architectures.</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">433 */</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
434 pgd = cpu_get_pgd() + index;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">435 pgd_k = init_mm.pgd + index;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
436</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">437 if (pgd_none(*pgd_k))</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
438 goto bad_area;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">439 if (!pgd_present(*pgd))</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
440 set_pgd(pgd, *pgd_k);</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">441</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
442 pud = pud_offset(pgd, addr);</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">443 pud_k = pud_offset(pgd_k, addr);</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
444</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">445 if (pud_none(*pud_k))</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)">
446 goto bad_area;</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)"><div>447 if (!pud_present(*pud))</div><div>448 set_pud(pud, *pud_k);</div>
<div>449</div><div>450 pmd = pmd_offset(pud, addr);</div><div>451 pmd_k = pmd_offset(pud_k, addr);</div><div>452</div><div>453 #ifdef CONFIG_ARM_LPAE</div><div>454 /*</div><div>455 * Only one hardware entry per PMD with LPAE.</div>
<div>456 */</div><div>457 index = 0;</div><div>458 #else</div><div>459 /*</div><div>460 * On ARM one Linux PGD entry contains two hardware entries (see page</div><div>461 * tables layout in pgtable.h). We normally guarantee that we always</div>
<div>462 * fill both L1 entries. But create_mapping() doesn't follow the rule.</div><div>463 * It can create inidividual L1 entries, so here we have to call</div><div>464 * pmd_none() check for the entry really corresponded to address, not</div>
<div>465 * for the first of pair.</div><div>466 */</div><div>467 index = (addr >> SECTION_SHIFT) & 1;</div><div>468 #endif</div><div>469 if (pmd_none(pmd_k[index]))</div><div>470 goto bad_area;</div>
<div>471</div><div>472 copy_pmd(pmd, pmd_k);</div><div>473 return 0;</div><div>474</div><div>475 bad_area:</div><div>476 do_bad_area(addr, fsr, regs);</div><div>477 return 0;</div><div>478 }</div>
</div><div style="font-family:Arial,sans-serif;font-size:13px;line-height:18px;background-color:rgb(255,255,255)"><br></div><br class="Apple-interchange-newline">