From: zhongjiang@huawei.com (zhong jiang)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] mm: Do not look up the next level table when large page exist.
Date: Wed, 25 Jul 2018 23:21:59 +0800 [thread overview]
Message-ID: <1532532119-59955-1-git-send-email-zhongjiang@huawei.com> (raw)
show_pte can show the kernel page table and user page table. user
page table is totally four level table. but kernel page table can
be a large page. Therefore, it need to check the page table.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
arch/arm64/mm/fault.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 1b40676..a397a54 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -169,13 +169,13 @@ void show_pte(unsigned long addr)
pudp = pud_offset(pgdp, addr);
pud = READ_ONCE(*pudp);
pr_cont(", pud=%016llx", pud_val(pud));
- if (pud_none(pud) || pud_bad(pud))
+ if (pud_none(pud) || pud_bad(pud) || pud_sect(pud))
break;
pmdp = pmd_offset(pudp, addr);
pmd = READ_ONCE(*pmdp);
pr_cont(", pmd=%016llx", pmd_val(pmd));
- if (pmd_none(pmd) || pmd_bad(pmd))
+ if (pmd_none(pmd) || pmd_bad(pmd) || pmd_sect(pmd))
break;
ptep = pte_offset_map(pmdp, addr);
--
1.7.12.4
next reply other threads:[~2018-07-25 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 15:21 zhong jiang [this message]
2018-07-25 16:53 ` [RFC] mm: Do not look up the next level table when large page exist Catalin Marinas
2018-07-26 1:51 ` zhong jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532532119-59955-1-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).